Thread: PostgreSQL 9.3 abd CentOS 7 memory usage
Hello all,
I have a question regarding the memory usage I'm seeing in one of my servers. This servers was recently installed using CentOS 7 and PostgreSQL 9.3
The server has 128GB of ram and we've configured postgresql.conf to use as much memory as it can (it's a dedicate postgres server after all)
What we're seeing is that even at high peaks of load the server doesn't consume more than 14GB, increasing the load doesn't increase ram usage equally. We find this odd since we've other servers that are CentOS 6.5 and postgres 9.3 and postgres 8.4, and all use all the ram available.
This particular server was a CentOS 6.5 and postgres 9.1 before and was able to use all 128GB of ram, now it doesn't for some reason.
I know that shared memory usage in postgres was changed on 9.3 from sys v to posix so changing things like shmmax and the like aren't needed anymore (although we've trying changing those to no effect)
We've even seen out of memory errors on postgres logs a few times when the server is just using something like 8GB out of 128GB of ram
Has anyone experienced a similar issue or have seen weird memory usage patrons with CentOS 7?
I know that shared memory usage in postgres was changed on 9.3 from sys v to posix so changing things like shmmax and the like aren't needed anymore (although we've trying changing those to no effect)
We've even seen out of memory errors on postgres logs a few times when the server is just using something like 8GB out of 128GB of ram
Has anyone experienced a similar issue or have seen weird memory usage patrons with CentOS 7?
That's negative, zone_reclaim_mode is disabled in this server
On Oct 12, 2014, at 10:33 AM, Elías David <elias.moreno.tec@gmail.com> wrote:I know that shared memory usage in postgres was changed on 9.3 from sys v to posix so changing things like shmmax and the like aren't needed anymore (although we've trying changing those to no effect)
We've even seen out of memory errors on postgres logs a few times when the server is just using something like 8GB out of 128GB of ram
Has anyone experienced a similar issue or have seen weird memory usage patrons with CentOS 7?
Any chance zone reclaim mode is enabled?cat /proc/sys/vm/zone_reclaim_mode
> From: Elías David <elias.moreno.tec@gmail.com> >To: Jeff Frost <jeff@pgexperts.com> >Cc: pgsql-admin <pgsql-admin@postgresql.org> >Sent: Monday, 13 October 2014, 0:55 >Subject: Re: [ADMIN] PostgreSQL 9.3 abd CentOS 7 memory usage > > > >That's negative, zone_reclaim_mode is disabled in this server > I guess posting a little more info from that server might give us more to go on. The output of "cat /proc/meminfo", "free-tm", "sysctl -a | grep 'vm.'", "ps -axo pid,user,args,pmem --sort pmem" and as the postgres user "ulimit -a" mighthelp.
On Oct 13, 2014, at 2:06 AM, Glyn Astill <glynastill@yahoo.co.uk> wrote: > >> From: Elías David <elias.moreno.tec@gmail.com> >> To: Jeff Frost <jeff@pgexperts.com> >> Cc: pgsql-admin <pgsql-admin@postgresql.org> >> Sent: Monday, 13 October 2014, 0:55 >> Subject: Re: [ADMIN] PostgreSQL 9.3 abd CentOS 7 memory usage >> >> >> >> That's negative, zone_reclaim_mode is disabled in this server >> > > > I guess posting a little more info from that server might give us more to go on. The output of "cat /proc/meminfo", "free-tm", "sysctl -a | grep 'vm.'", "ps -axo pid,user,args,pmem --sort pmem" and as the postgres user "ulimit -a" mighthelp. postgresql.conf and the log entries showing the out of memory condition would also be helpful.
postgresql.conf and the log entries showing the out of memory condition would also be helpful.
On Oct 13, 2014, at 2:06 AM, Glyn Astill <glynastill@yahoo.co.uk> wrote:
>
>> From: Elías David <elias.moreno.tec@gmail.com>
>> To: Jeff Frost <jeff@pgexperts.com>
>> Cc: pgsql-admin <pgsql-admin@postgresql.org>
>> Sent: Monday, 13 October 2014, 0:55
>> Subject: Re: [ADMIN] PostgreSQL 9.3 abd CentOS 7 memory usage
>>
>>
>>
>> That's negative, zone_reclaim_mode is disabled in this server
>>
>
>
> I guess posting a little more info from that server might give us more to go on. The output of "cat /proc/meminfo", "free -tm", "sysctl -a | grep 'vm.'", "ps -axo pid,user,args,pmem --sort pmem" and as the postgres user "ulimit -a" might help.
Am 12. Oktober 2014 19:33:18 MESZ, schrieb "Elías David" <elias.moreno.tec@gmail.com>: >Hello all, > >I have a question regarding the memory usage I'm seeing in one of my >servers. This servers was recently installed using CentOS 7 and >PostgreSQL >9.3 > >The server has 128GB of ram and we've configured postgresql.conf to use >as >much memory as it can (it's a dedicate postgres server after all) > >What we're seeing is that even at high peaks of load the server doesn't >consume more than 14GB, increasing the load doesn't increase ram usage >equally. We find this odd since we've other servers that are CentOS 6.5 >and >postgres 9.3 and postgres 8.4, and all use all the ram available. > >This particular server was a CentOS 6.5 and postgres 9.1 before and was >able to use all 128GB of ram, now it doesn't for some reason. > >I know that shared memory usage in postgres was changed on 9.3 from sys >v >to posix so changing things like shmmax and the like aren't needed >anymore >(although we've trying changing those to no effect) > >We've even seen out of memory errors on postgres logs a few times when >the >server is just using something like 8GB out of 128GB of ram > >Has anyone experienced a similar issue or have seen weird memory usage >patrons with CentOS 7? What's the on-disk size of your databases and can you estimate the actual working set? How long is this system up and beingqueried? I have seen similar when upgrading from 8.4 to 9.3 on Solaris 10, Postgres running in zones. I could not yet investigatefurther and performance is perfect still.
Am 13.10.2014 um 20:12 schrieb Elías David:
>> I have seen similar when upgrading from 8.4 to 9.3 on Solaris 10, Postgres running in zones. I could not yet investigate further and performance is perfect still.
Ok, here it goes:ccs1cl --> 41 MBdb_otrs_ub --> 14 MBelmap --> 207 MBelmap_int --> 182 MBinvent_equi --> 532 MBinvent_equi_fc --> 114 MBjasper --> 13 MBnetasis --> 23 MBotrs --> 361 MBpatint --> 615 MBseg_alt --> 75 MBseg_alt_par --> 75 MBThe average of transactions are around 85 per second and several of the databases (jasper, patint, elmap...) are accessed everyday, 365 days a year (it's part of an offering from the company that runs the services every single day of the year). Right now the system has been up for 17 days.
So, that sums up to 2,2GB of databases (is that the right unit? MB?) ... so even IF all of the data was read and stored in buffers that would not cause a significant amount of memory used data on a 128GB machine, When you look at "top" output, what the value for "cached" (5th line on the very right)?
Right now that value is:
6288536 cached Mem
I'm thinking the same about that the sum of the databases isn't enough to use all the memory, but I want to be sure
Am 13.10.2014 um 20:12 schrieb Elías David:>> What's the on-disk size of your databases and can you estimate the actual working set? How long is this system up and being queried?>> I have seen similar when upgrading from 8.4 to 9.3 on Solaris 10, Postgres running in zones. I could not yet investigate further and performance is perfect still.Ok, here it goes:ccs1cl --> 41 MBdb_otrs_ub --> 14 MBelmap --> 207 MBelmap_int --> 182 MBinvent_equi --> 532 MBinvent_equi_fc --> 114 MBjasper --> 13 MBnetasis --> 23 MBotrs --> 361 MBpatint --> 615 MBseg_alt --> 75 MBseg_alt_par --> 75 MBThe average of transactions are around 85 per second and several of the databases (jasper, patint, elmap...) are accessed everyday, 365 days a year (it's part of an offering from the company that runs the services every single day of the year). Right now the system has been up for 17 days.
So, that sums up to 2,2GB of databases (is that the right unit? MB?) ... so even IF all of the data was read and stored in buffers that would not cause a significant amount of memory used data on a 128GB machine, When you look at "top" output, what the value for "cached" (5th line on the very right)?