From: | Reid Thompson <reid(dot)thompson(at)ateb(dot)com> |
---|---|
To: | Jeremy Carroll <jeremy(dot)carroll(at)networkedinsights(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Memory reporting on CentOS Linux |
Date: | 2009-08-14 19:43:04 |
Message-ID: | 1250278984.31292.43.camel@raker.ateb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Fri, 2009-08-14 at 14:00 -0400, Jeremy Carroll wrote:
> I am confused about what the OS is reporting for memory usage on
> CentOS 5.3 Linux. Looking at the resident memory size of the
> processes. Looking at the resident size of all postgres processes, the
> system should be using around 30Gb of physical ram. I know that it
> states that it is using a lot of shared memory. My question is how to
> I determine how much physical RAM postgres is using at any point in
> time?
>
> This server has 24Gb of ram, and is reporting that 23GB is free for
> use. See calculation below
>
> (Memory Total – Used) + (Buffers + Cached) = Free Memory
> (24675740 – 24105052) + (140312 + 22825616) = 23,536,616 or ~23
> Gigabytes
>
you're using cached swap in your calculation ( 22825616 ) swap is not
RAM -- it's disk
>
> So if my server has 23Gb of ram that is free for use, why is postgres
> reporting resident sizes of 30GB? Shared memory is reporting the same
> values, so how is the OS reporting that only 1Gb of RAM is being used?
you have 570688k free RAM + 140312k buffers RAM
This looks to me like the OS is saying that you are using 24105052k used
>
> Help?
>
> top - 12:43:41 up 2 days, 19:04, 2 users, load average: 4.99, 4.81,
> 4.33
> Tasks: 245 total, 4 running, 241 sleeping, 0 stopped, 0 zombie
> Cpu(s): 26.0%us, 0.0%sy, 0.0%ni, 73.9%id, 0.1%wa, 0.0%hi, 0.0%
> si, 0.0%st
> Mem: 24675740k total, 24105052k used, 570688k free, 140312k
> buffers
> Swap: 2097144k total, 272k used, 2096872k free, 22825616k
> cached
> ---------------------
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
> COMMAND
> 19469 postgres 15 0 8324m 7.9g 7.9g S 0.0 33.7 0:54.30 postgres:
> writer process
>
> 29763 postgres 25 0 8329m 4.5g 4.5g R 99.8 19.0 24:53.02 postgres:
> niadmin database x.x.x.49(51136) UPDATE
> 29765 postgres 25 0 8329m 4.4g 4.4g R 99.8 18.8 24:42.77 postgres:
> niadmin database x.x.x.49(51138) UPDATE
> 31778 postgres 25 0 8329m 4.2g 4.2g R 99.5 17.8 17:56.95 postgres:
> niadmin database x.x.x.49(51288) UPDATE
> 31779 postgres 25 0 8329m 4.2g 4.2g R 99.1 17.8 17:59.62 postgres:
> niadmin database x.x.x.49(51289) UPDATE
> 31780 postgres 23 0 8329m 4.1g 4.1g R 100.1 17.5 17:52.53
> postgres: niadmin database x.x.x.49(51290) UPDATE
> 19467 postgres 15 0 8320m 160m 160m S 0.0 0.7
> 0:00.24 /opt/PostgreSQL/8.3/bin/postgres
> -D /opt/PostgreSQL/8.3/data
> 19470 postgres 15 0 8324m 2392 1880 S 0.0 0.0 0:01.72 postgres:
> wal writer process
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Carroll | 2009-08-14 20:20:58 | Re: Memory reporting on CentOS Linux |
Previous Message | Tom Lane | 2009-08-14 18:37:24 | Re: freezing tuples ( was: Why is vacuum_freeze_min_age 100m? ) |