pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MirrorX <mirrorx@gmail.com>
To: pgsql-admin@postgresql.org
Subject: system is swapping (not actively), why?
Date: Tue, 3 Jan 2012 01:44:23 -0800 (PST)
Message-ID: <1325583863316-5116515.post@n5.nabble.com> (raw)

good morning to all and happy new year!

i am facing the following situation; there is a server which is using 2-5GB
of swap very often (almost all the time) and i cannot figure out why. i can
provide any information you find useful and i will start what i think is
more relevant to my 'problem'.

-os -> CentOS release 5.6 (Final)
-the server is a dedicated db server with nothing else running there
-postgres version -> 9.0.5
-shared_buffers -> 15 GB

-vm.swapiness = 0

free -m
             total       used       free     shared    buffers     cached
Mem:         64445      61505       2940          0        159      59989
-/+ buffers/cache:       1356      63089
Swap:        32767       1868      30899

vmstat -n -S M 10 5
procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id
wa st
 4  0   1867   1533    161  61345    0    0   682   164    0    0  9  1 86 
4  0
 1  0   1867   1286    161  61643    0    0 17932  3224 9776 9957  5  1 94 
0  0
 3  0   1867   1119    161  61802    0    0 12877 13080 3297 2580  5  1 95 
0  0
 2  0   1867    929    162  62006    0    0 12386  9406 5871 5749  5  1 94 
0  0
 3  0   1867    652    162  62190    0    0 13134  4912 6531 6157  8  1 91 
0  0

as you can see from above the si/so are always 0 (i have run it for many
iterations and they are always 0) so the system is not actively swapping,
but still, why does it use the swap?
i have found online in some relevant threads/articles that there are some
operating systems that prefer to swap out the memory from the shared_buffers
that is not used. as i can see when inspecting the pg_buffercache, there are
3-5 GB with usagecount=0. could this be the case? 

thx in advance for any advice

--
View this message in context: http://postgresql.1045698.n5.nabble.com/system-is-swapping-not-actively-why-tp5116515p5116515.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



view thread (6+ messages)  latest in thread

Message-ID: <1325583863316-5116515.post@n5.nabble.com>
Permalink:  ../1325583863316-5116515.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1325583863316-5116515.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mirrorx@gmail.com
  Subject: Re: system is swapping (not actively), why?
  In-Reply-To: <1325583863316-5116515.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox