[CentOS] What is eating up Swap

Tue Dec 10 14:27:29 UTC 2013
Peter Eckel <lists at eckel-edv.de>

Hi Götz, 

On Dec 10, 2013, at 15:01 , Götz Reinicke - IT Koordinator <goetz.reinicke at filmakademie.de> wrote:

> Hi,
> 
> recently I noticed, that one of our webservers is using swap space,
> while there is plenty of physical ram available.
> 
> free -m
>             total       used       free     shared    buffers     cached
> Mem:          8118       2014       6103          0         85        261
> -/+ buffers/cache:       1667       6450
> Swap:         8197         77       8119
> 
> 
> It's not that much, but why?

my first idea would be that RAM usage was higher temporarily, which led to some pages being swapped out, and those pages haven't been used since so they were never swapped in again. 

> Any ideas how to debug that? Thanks for any hint and suggestion.

/proc/*/smaps is a starting point. It's fairly easy to write a little script that adds the values in the Swap: lines for each process and calculates swap usage per process. 

Bests, 

  Peter.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.centos.org/pipermail/centos/attachments/20131210/af572354/attachment-0004.sig>