WarehousePG memory calculator v7.4
This section is adapted from the WarehousePG v7.x documentation
This tool calculates recommended memory limits for WarehousePG environments. It is designed to maximize database memory utilization while maintaining a conservative buffer for Linux kernel operations, ensuring system stability even under high concurrency or heavy workloads.
Note: The content of this page is different to its equivalent in the open source repository https://github.com/warehouse-pg/whpg-docs #
Recommended Max Settings
gp_vmem_protect_limit
Value in MB | configured in postgresql.conf, controlled by the gpconfig command
gpconfig -c gp_vmem_protect_limit -v 6423vm.overcommit_ratio
Percentage | configured in /etc/sysctl.conf
vm.overcommit_ratio = 95Notes
Choose the value for Primary Segments Per Node based on your mirroring strategy. See Overview of Segment Mirroring for more information on group and spread mirroring strategies.
- Given a configuration of 6 primaries and 6 mirrors, we should set Primary Segments Per Node to 6+6=12 when using group mirroring.
- Using the same configuration example for spread mirroring, the value would be 6+2=8.
For more information on memory, please refer to the WarehousePG Memory Overview.
Recommended Configuration
vm.overcommit_ratio
Kernel parameter sets % RAM used for app processes
vm.overcommit_ratio = 97gp_vmem_protect_limit
Memory limit (MB) for an active segment instance
gpconfig -c gp_vmem_protect_limit -v 44714statement_mem
Standard query memory allocation
statement_mem = 804MBmax_statement_mem
Maximum allowable query memory allocation
max_statement_mem = 10485MB