On Thu, Apr 12, 2012 at 4:09 AM, PHILIP TULLY <[email protected]> wrote:
> I was using the following to show how much swap space was being used it
> is either not working or there is nothing allocated to swap.
>
> for pid in `ps -ef|grep ora| awk '{print $2}'`; do echo -n "Pid: $pid
> "; cat /proc/$pid/smaps |grep -i swap| awk '{SUM += $2} END {print "SUM:
> " SUM " kB (" SUM/1024 " MB)"}'; done
>
You're only looking at the oracle processes there. I feed the output
of "head /proc/[0-9]*/smaps" into CMS Pipelines to show me the
breakdown per process.
Whatever smaps claims the process is holding out there, it's an
allocated swap slot. It is possible for a page to be both resident and
swapped out (assume Shane hints at that with "lazy"). As long as the
page is not modified by the process after swap-in or swap-out, the
swap slot remains valid (and means Linux can take the resident page
away without swap-out). With the swap slot not referenced in this
situation, z/VM will eventually page it out.
Using the recipe, I just learned that console-kit-deamon was
responsible for half my swap usage. When I killed that (does nothing I
need, afaics) Linux freed up half of the swap slots. Unfortunately
z/VM still holds the VDISK pages, until I get my TRIM/390 support
(Martin?)
Rob
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/