Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread Tom Lane
Christoph Zwerschke writes: > Am 03.12.2011 20:31, schrieb Christoph Zwerschke: >> Then, the corrected sum is 449627320 Bytes, which is only about 2MB less >> than was requested. This remaining discrepancy can probably be explained >> by additional overhead for a PostgreSQL 9.1 64bit server vs. a

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread Christoph Zwerschke
Am 04.12.2011 15:17, schrieb sfr...@snowman.net: Didn't see this get answered... The long-and-short of that there aren't any negative consequences of having it higher, as I understand it anyway, except the risk of greedy apps. In some cases, shared memory can't be swapped out, which makes it a

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread Tomas Vondra
On 4.12.2011 15:06, Stephen Frost wrote: > * Christoph Zwerschke (c...@online.de) wrote: >> (Btw, what negative consequences - if any - does it have if I set >> kernel.shmmax higher as necessary, like all available memory? Does >> this limit serve only as a protection against greedy applications?)

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread sfrost
This message has been digitally signed by the sender. Re___GENERAL__Shared_memory_usage_in_PostgreSQL_9_1.eml Description: Binary data - Hi-Tech Gears Ltd, Gurgaon, India -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread Stephen Frost
* Christoph Zwerschke (c...@online.de) wrote: > (Btw, what negative consequences - if any - does it have if I set > kernel.shmmax higher as necessary, like all available memory? Does > this limit serve only as a protection against greedy applications?) Didn't see this get answered... The long-and

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 18:02, schrieb Christoph Zwerschke: 400 MB = 419430400 Bytes but according to your log the used memory is: buffers = 424669472 Bytes This is a discrepancy of 1.25%. The difference could be explained by taking credit for the descriptors which may not be comprised in the shared_bu

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 20:31, schrieb Christoph Zwerschke: Then, the corrected sum is 449627320 Bytes, which is only about 2MB less than was requested. This remaining discrepancy can probably be explained by additional overhead for a PostgreSQL 9.1 64bit server vs. a PostgreSQL 8.3 32bit server for which

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 13:39, schrieb Christoph Zwerschke: According to that table the usage would be: Connections: 1908000 Bytes Autovac workers: 57240 Bytes Prepared transactions: 0 Bytes Shared disk buffers: 400MB WAL buffers: 16MB Fixed space: 788480 Bytes Sum: 435145336 This is about 16MB less than

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 18:39, schrieb Tom Lane: The long and the short of it is those numbers aren't meant to be exact. If they were, we'd have to complicate the table to distinguish 32 vs 64 bit and possibly other factors, and we'd have to remember to re-measure the values after any code change, neither

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 18:02, schrieb Christoph Zwerschke: The difference could be explained by taking credit for the descriptors which may not be comprised in the shared_buffers setting, even if the shared_buffers value is set in memory units. Looked a bit more into this - the shared_buffers setting in

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Tom Lane
Christoph Zwerschke writes: > ... This is a discrepancy of 1.25%. > The difference could be explained by taking credit for the descriptors > which may not be comprised in the shared_buffers setting, even if the > shared_buffers value is set in memory units. But according to the docs, > the des

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
Am 03.12.2011 15:34, schrieb Tomas Vondra: > Do you need to know an exact value or are you just interested why the > values in docs are not exact? Both. I'm writing an installation script that calculates the necessary IPC memory and increases the limit on the OS level (kernel.shmmax) if needed.

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Tomas Vondra
On 3.12.2011 13:39, Christoph Zwerschke wrote: > For a PostgreSQL 9.1.1 instance, > I have used the following postgresql.conf settings: > > max_connections = 100 > shared_buffers = 400MB > wal_buffers = 16MB > > All the other parameters have been left as default values. > > When I startup the in

[GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-03 Thread Christoph Zwerschke
For a PostgreSQL 9.1.1 instance, I have used the following postgresql.conf settings: max_connections = 100 shared_buffers = 400MB wal_buffers = 16MB All the other parameters have been left as default values. When I startup the instance, I get an error message saying that the shared memory does