Memory Management Overview
Sufficient memory is important for GaussDB(DWS) running. Effective utilization of the memory helps improve service query performance.
The resource pool is a collection of system resources managed by GaussDB(DWS), responsible for distributing and managing task resources running in it.
On a GaussDB(DWS) node, the memory on the host is shared among all running processes, including the OS processes, GaussDB(DWS) instance processes, and other application processes. The administrator must monitor the memory shared between GaussDB(DWS) and non-GaussDB(DWS) processes.
- "Host memory" represents the total memory, that is the physical memory RAM on the server. (On a Linux server, the host memory includes the swap cache as well. As GaussDB(DWS) uses precise memory management, here only the physical memory RAM is included in the host memory.) The physical memory RAM is shared by GaussDB(DWS) processes and all other processes running on the host. Some programs may occupy a large volume of resources. You can resolve the problem by adjusting the number of DNs on each node or increasing the physical memory.
- If the node is deployed with a CN, the CN and DNs share the memory occupied by GaussDB(DWS).
- On each DN, the memory occupied by the DN is shared in a resource pool.
- Concurrent SQL statements (represented by small blue blocks in the figure) running in the resource pools share the memory occupied by the resource pool.
- The query optimizer generates an execution plan containing a series of tasks (or operators, as shown in the figure). Task operators, such as table scanning or joining operators, process data records and generate an interim result set. All operators in a query share the memory occupied by the query statement.
Configuring Host Memory
Host memory is the memory shared by all programs on a server. You can increase the physical memory by adding RAM to the server.
Generally, the physical memory and OS configuration are managed by system administrators.