7.1. Resource Requirement

Pgpool-II does not consume too much resource. However there are minimum requirements for resource. In this section we are going to explain one by one.

7.1.1. Memory Requirement

There are two types of memory usage in Pgpool-II: shared memory and process private memory. The former is allocated at the startup of Pgpool-II main server process and will not be freed until whole Pgpool-II servers shut down. The latter is allocated within each Pgpool-II child process and will be freed at the end of the process. Shared Memory Requirement

Here is a formula to calculate the shared memory requirement.

      Shared memory requirement (in mega bytes) = 10 + num_init_children * max_pool * 0.02

For example if you have num_init_children = 32 (the default) and max_pool = 4 (the default), then you will need 10 + 32 * 4 * 0.02 = 12.6 MB.

If you plan to use in memory query cache (see Section 5.13 for more details) in the shared memory, you will need more RAM for it. See memqcache_total_size and memqcache_max_num_cache for required RAM size.

Note that, however, in Pgpool-II 4.1 or after, even if the in memory query cache is not enabled, it consumes additional 128MB of shared memory, if enable_shared_relcache is enabled (it is enabled by default). Process Memory Requirement

Here is a formula to calculate the process memory requirement.

      Process memory requirement in total (in mega bytes) = num_init_children * 0.16

For example if you have num_init_children = 32 (the default), you will need 5.2MB. Please note that this is minimum memory requirement upon Pgpool-II child process starting up. Once the process runs, it will consume more memory depending on the message packet sizes and other factors. It is recommended to measure the amount of memory actually used by the process before starting production use.

7.1.2. Disk Requirement

Pgpool-II does not consume much disk space. Also it does not require high speed disk because disk I/O traffic caused by Pgpool-II is small. However, if you plan to emit much logs, of course you need disk space for them.