Resource Requirement
pgpool-II 4.1.5 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 7. Performance Considerations | Next |
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.
7.1.1.1. Shared Memory Requirement
Here is a formula to calculate the shared memory requirement.
Shared memory requirement (in bytes) = num_init_children * max_pool * 17408
For example if you have num_init_children = 32 (the default) and max_pool = 4 (the default), then you will need 32 * 4 * 17408 = 2228224 bytes = 2.1 MB.
If you plan to use in memory query cache (see Section 5.12 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.
7.1.1.2. Process Memory Requirement
Here is a formula to calculate the process memory requirement.
Process memory requirement in total (in mega bytes) = num_init_children * 5
For example if you have num_init_children = 32 (the default), you will need 160MB.
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.