Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Andreas Kretschmer
Am 20.12.2017 um 17:24 schrieb Tomas Vondra: That means if you have all 50 connections active, they may easily consume 100% of memory, because 50 * 2 is 100. It's even easier if the connections are executing complex queries, because each query may use multiple work_mem buffers. So 2% seems a bi

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Scott Marlowe
On Wed, Dec 20, 2017 at 9:25 AM, Andreas Kretschmer wrote: > > > Am 20.12.2017 um 16:08 schrieb mark: >> >> postgresql process used over 70% of memory and occuered OOM. >> what should I do to deal with this problem? > > > https://www.postgresql.org/docs/current/static/kernel-resources.html > 18.4.

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 9:59:24 AM PST David G. Johnston wrote: > On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > > IIRC work_mem is a PER CONNECTION setting, > > ​The docs for this setting clearly state that a single connection/session > can itself use multiple times this values for a sing

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread David G. Johnston
On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > IIRC work_mem is a PER CONNECTION setting, > ​The docs for this setting clearly state that a single connection/session can itself use multiple times this values for a single query. https://www.postgresql.org/docs/10/static/runtime-config-resource.htm

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 11:08:51 PM PST mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. > momery size is 16GB. > postgresql process used over 70% of memory and occuered OOM. > what should I do to deal with this problem? IIRC wo

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Andreas Kretschmer
Am 20.12.2017 um 16:08 schrieb mark: postgresql process used over 70% of memory and occuered OOM. what should I do to deal with this problem? https://www.postgresql.org/docs/current/static/kernel-resources.html 18.4.4. Linux Memory Overcommit Regards, Andreas -- 2ndQuadrant - The PostgreSQL

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Tomas Vondra
On 12/20/2017 04:08 PM, mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. That means if you have all 50 connections active, they may easily consume 100% of memory, because 50 * 2 is 100. It's even easier if the connections are executing