archive mirror
 help / color / mirror / Atom feed
From: Dominik Kubla <>
To: Stephen Satchell <>
Subject: Re: Swap performance statistics in 2.6 -- which /proc file has it?
Date: Wed, 10 Dec 2003 11:34:16 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Stephen Satchell wrote:

> How does sampling free pages give you an accurate measurement of swap
> activity?  If I look at the free-page count at one-minute intervals, the
> system can, and WILL, inhale and exhale pages at a frightening clip, and
> there is no way I can see that sampling free-page count in a
> low-overhead way will do the trick.

First keep in mind that the Linux kernel uses paging instead of swapping 
out whole processes. So all you really are interested in is the sum of free 
pages and cache pages, because this is the amount of memory not yet used be 
running processes.

Second: If you happen to have a memory shortage, resulting in memory pages 
being paged out to disk, you will want to check with iostat the overall 
activity of the disk(s) your swap space (or rather paging space would be 
more accurate) is located.  If you have lots of paging activity you will 
want to have one or more otherwise idle disks (and on a different i/o path 
if possible) to put your swap space on ('iostat -x' is your friend).

If your system is continously paging, you will most likley need to add 
memory if you are concerned with performance, but that is also depending on 
the kind of work load your system has.

> How does vmstat disk-swap activity?  Looking at the source for vmstat in
> procps-2.0.11 I see how they do it for 2.4 kernels, but the part for 2.5
> kernels doesn't seem to try to pick up swap statistics at all -- because
> there are none to get?

First: you'll need sysstat installed (latest version appears to be 5.0). 
Forget about procps, it is not capable of what you need.

Second: as i tried to explain above, the collection of swap statistics is 
pretty much useless anyway. You need to look at pageing and i/o activity of 
the system as a whole.

   Dominik Kubla
Those who can make you believe absurdities can make you commit
atrocities.    (Francois Marie Arouet aka Voltaire, 1694-1778)

  reply	other threads:[~2003-12-10 10:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2003-12-08 19:29 ` balance interrupts Len Brown
2003-12-08 20:00   ` Julien Oster
2003-12-08 20:02     ` Julien Oster
2003-12-08 21:46     ` Len Brown
2003-12-09  3:51   ` Bob
2003-12-09  5:11     ` Stephen Satchell
2003-12-09 13:19     ` Swap performance statistics in 2.6 -- which /proc file has it? Stephen Satchell
2003-12-09 13:56       ` Richard B. Johnson
2003-12-09 14:46         ` Stephen Satchell
2003-12-09 15:25           ` Richard B. Johnson
2003-12-09 19:53             ` Dominik Kubla
2003-12-09 20:24               ` Richard B. Johnson
2003-12-10 10:18                 ` Dominik Kubla
2003-12-10  1:28               ` Stephen Satchell
2003-12-10 10:34                 ` Dominik Kubla [this message]
2003-12-10 13:06                   ` Answer to Swap performance statistics in 2.6 -- which /proc file has it Stephen Satchell

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).