Swap Never Ever Used in 2.4.7-10smp kernel (RH 7.2)

From: Bob Dilworth (bdilworth_at_mco.edu)
Date: 12/31/03


Date: Wed, 31 Dec 2003 13:40:51 -0500

Hi All!

I have a server running Linux kernel 2.4.7-10smp - Red Hat 7.2 - (this
OS version required as per the main app that runs on the server). The
box has 3 gig of mameory and I set up the max amount of swap Red Hat
allows - I believe it's ~ 2 gig.

Anyway, I monitor memory and swap usage (hourly snapshots) and I've
never ever seen swap used at all. I do notice, however, that kswapd is
busy; top shows its time currently at 95.6.

I've done some research and it appears that this version of the kernel
MAY have somekind of VM bug but I'm not sure. I'm also not sure if the
system is not swapping to disk because it's never needed to. At any
rate, here's the top few lines of top:

   1:36pm up 57 days, 3:17, 1 user, load average: 0.81, 1.30, 1.39
278 processes: 277 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 27.5% user, 1.0% system, 0.0% nice, 70.5% idle
CPU1 states: 4.2% user, 10.2% system, 0.0% nice, 85.0% idle
Mem: 3090676K av, 3085264K used, 5412K free, 60K shrd, 99848K
buff
Swap: 2097112K av, 0K used, 2097112K free 2374512K
cached

   PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
18606 egate 9 0 9532 9532 4388 D 32.9 0.3 0:01 stciqmgrd.exe
18577 egate 16 0 1220 1220 836 R 10.2 0.0 0:02 top
  1262 egate 9 0 283M 283M 40952 S 0.3 9.3 206:32 stccb.exe
31155 egate 9 0 9000 9000 2844 S 0.1 0.2 3:06 stcbob.exe
18603 egate 9 0 9532 9532 4388 S 0.1 0.3 0:00 stciqmgrd.exe
     1 root 8 0 520 520 452 S 0.0 0.0 0:07 init
     2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
     3 root 19 19 0 0 0 SWN 0.0 0.0 0:27
ksoftirqd_CPU0
     4 root 19 19 0 0 0 SWN 0.0 0.0 0:27
ksoftirqd_CPU1
     5 root 9 0 0 0 0 SW 0.0 0.0 95:06 kswapd

Is it normal to never, ever use swap space? Any thoughts on the matter
would be greatly appreciated.

Thanks in Advance!!!!

Bob Dilworth
Medical College of Ohio
Toledo, Ohio
bdilworth@mco.edu



Relevant Pages

  • Re: vm_thread_new: kstack allocation failed with vm.kmem_size="1536M"
    ... I am certainly icreasing the limits not decreasing them, ... Note that these machines have no swap - but then since the system runs fine ... the machine was expanded to 8 gig of real memory it no longer needs the ...
    (freebsd-stable)
  • Re: How much drive space for Linux?
    ... It is generally recommended to have twice as much swap ... >> space as you have RAM. ... Sounds like 4 gig is not enough. ... >> make the attempt to install it and see whether it fits. ...
    (linux.redhat.install)
  • Re: Swap of 4 Gigs
    ... and all of you for your advices. ... Gig RAM and mantain the "rule" of having the swap doubles the RAM. ...
    (Ubuntu)
  • RE: swap byte size?!
    ... When I had 2 gig of swap for my 1 gig system, I hardly ever went to swap ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: Swap space
    ... > twice the amount of RAM if you need to capture a dump for debugging. ... > If you won't ever be doing that, you may not need so much swap. ... least the size of physical memory. ...
    (freebsd-questions)