BUG #7889: Memory Issue in OSX Mountain Lion

From: rodrigo(dot)garcia(at)cross-join(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7889: Memory Issue in OSX Mountain Lion
Date: 2013-02-17 22:39:55
Message-ID: E1U7Ctn-0000yz-1f@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7889
Logged by: Rodrigo Garcia
Email address: rodrigo(dot)garcia(at)cross-join(dot)com
PostgreSQL version: 9.2.2
Operating system: Darwin 12.2.1 - OSX Mountain Lion
Description:

Recently we've migrated from Oracle 10g to PostgreSQL 9.2.2.

Our problem is related to memory consumption, we've a mac mini server
mountain lion server with 16 gb of RAM, each PostgreSQL server process is
consuming the RAM defined in shared_buffers (shouldn't this be a shared
memory???) resulting in the following memory consumption (top command):

PhysMem: 2438M wired, 5816M active, 7663M inactive, 16G used, 458M free

We're forced to detected when the memory is below a threshold and invoque
the "purge" command at OS level. This brings performance issues because
we're clearing out not only OS cache but also disk cache data that we think
PostgreSQL uses.

Here is the top -o rsize in the system (shared_buffers = 512MB,work_mem =
32MB,maintenance_work_mem = 256MB):

PID COMMAND %CPU TIME #TH #WQ #PORT #MRE RPRVT RSHRD RSIZE

4125 postgres 0.0 12:08.75 1 0 9 81 25M 558M 575M

86560 postgres 0.0 34:43.97 1 0 9 81 25M 558M 575M

38534 postgres 32.9 11:03.16 1/1 0 9 80 26M+ 558M 575M+

57374 postgres 0.0 17:00.25 1 0 9 81 25M 558M 572M

84932 postgres 8.6 06:33.90 1 0 9 77 21M 558M 564M

61888 postgres 0.0 06:43.98 1 0 9 77 21M 558M 564M

14401 postgres 0.0 03:58.94 1 0 9 77 21M 558M 564M

84952 postgres 5.3 06:36.73 1/1 0 9 77 21M 558M 564M+

84927 postgres 0.0 06:09.82 1 0 9 77 20M 558M 563M

84936 postgres 0.0 04:04.06 1 0 9 77 19M 558M 562M

73230 postgres 0.0 12:37.65 1 0 9 59 1360K 558M 538M

73229 postgres 0.0 02:06.01 1 0 9 63 5568K 558M 512M

477 Finder 0.1 12:08.66 5 4 222+ 777+ 391M- 10M- 418M+

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2013-02-18 08:57:01 Re: BUG #7883: "PANIC: WAL contains references to invalid pages" on replica recovery
Previous Message Piotr T. Tokarski 2013-02-17 22:11:59 Automated start of the service under Windows 7