Multi-thread parallel computing

Parallel computing is a process of decomposing a task into several small tasks and executing them collaboratively to complete the solution, which is an effective way to enhance the ability to solve complex problems and improve performance. The emergence of multi-core computers has changed the situation that parallel computing only serves supercomputers and computer clusters. Nowadays, with the development of multi-core microprocessors, the very popular personal PC also has the ability of parallel computing.

Parallel computing can be implemented in many ways, including multi-process, multi-thread and other ways. For multi-core computers, this paper mainly discusses multi-threaded parallel computing (or multi-core parallel computing). Parallel computing technology can decompose a task into multiple threads, which can be run by multiple CPU cores in parallel, so as to make full and more efficient use of multi-core computing resources, thereby reducing the solving time of a single problem, saving costs, and meeting the needs of solving problems with larger scale or higher accuracy requirements.

Geographic Spatial Analysis has the common characteristics of complex algorithm logic and large data scale, which is a compute-intensive and data-intensive function. Through parallel computing, it can make full use of multi-core computing resources, thus greatly reducing the analysis time and improving performance. Currently, SuperMap provides parallel computing capabilities for many analysis functions, including Raster Analysis, Hydrological Analysis, Network Analysis, and Topology Preprocessing. The rest of this article focuses on how to set the number of threads for parallel computing and the interfaces that support parallel computing.

The following figure shows the CPU usage of an "Extract Contour" analysis performed on an ordinary quad-core personal computer with parallel computing support. When one thread is used for analysis, the CPU utilization is low, and only one CPU is involved in the operation. When the number of parallel threads is set to 4, all four CPU cores are involved in the operation, and the CPU utilization can reach up to 100%.

Remark

  1. Different analysis functions have different performance improvements. There are also differences in the degree of performance improvement among different platforms and hardware configurations.
  2. Parallel computing supports Windows Bit32 and Bit64 platforms.
  3. Due to the relatively long Read/Write Data time of the database engine, the overall performance improvement is not as significant as that of the file-based engine.

Related content