[S] memory usage

From: Stan Huhman#HuhmanJohn Deere EW <huhman_at_ee.deere.com>
Date: Tue, 21 Nov 1995 14:22:58 -0600

My original post:

I have a DEC 3000/900 with 608MB of memory and 1199MB of swap. I hae seen
swap space under 10% a lot lately, and while I know it is heavily loaded I
did a ps aux | grep R and see the following:

wdee6# ps aux | grep R
USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND
user1 1736 98.0 15.5 705M 94M ttyp0 R 07:40:32 01:49:33 xyzzy
root 0 0.0 6.2 969M 38M ?? R < Nov 10 6:31.83 [kernel idle]
root 10492 0.0 0.2 9.66M 1.3M ?? S Nov 11 0:06.90 pvRm 128 0 6
root 2552 0.0 0.0 744K 304K ttyp5 R + 09:33:05 0:00.07 ps aux
root 2549 0.0 0.0 248K 80K ttyp5 S + 09:33:05 0:00.00 grep R
wdee6#

Well, almost this, I changed a few things to protect the innocent. My question
is this - Why does the [kernel idle] process have 969M of virtual size? and
38M of resident size for that matter. Uptime shows it was booted 3 days ago:

wdee6# uptime
09:55 up 3 days, 17:04, 5 users, load average: 1.01, 1.02, 1.00
wdee6#


The results of swapon are:

wdee6# swapon -s
Swap partition /dev/rz3b (default swap):
    Allocated space: 25088 pages (196MB)
    In-use space: 6991 pages ( 27%)
    Free space: 18097 pages ( 72%)

Swap partition /dev/rz1b:
    Allocated space: 128452 pages (1003MB)
    In-use space: 7162 pages ( 5%)
    Free space: 121290 pages ( 94%)


Total swap allocation:
    Allocated space: 153540 pages (1199MB)
    Reserved space: 93287 pages ( 60%)
    In-use space: 14153 pages ( 9%)
    Available space: 60253 pages ( 39%)
wdee6#

I am using immediate mode swapping here, ie, /sbin/swapdefault does exist.

Yesterday when I looked at this, I saw the kernel idle with 968M 33M of VSZ
& RSS respectively and the user process with 433M & 87M. These are the only
major uers of memory, although the 8 nfsd's have 1.3M of VSZ each. Only vmubc
has more than 1M of RSS. respectively, The total swap allocation yesterday was:

Total swap allocation:
    Allocated space: 153540 pages (1199MB)
    Reserved space: 142543 pages ( 92%)
    In-use space: 14877 pages ( 9%)
    Available space: 10997 pages ( 7%)


Any insight would be appreciated.
Stan Huhman
John Deere Engine Works
Waterloo, Iowa 50701
319 292 8687

I got a variety of answers, none of which really explain this real well to
me, but I think the following quote sheds the best light:

     The [kernel idle] task is special. First it has no user space at all,
    it runs only in kernel space and mode.

     The values for RSS and VSZ of the [kernel idle] task are computed by
     the system in a special mannner:

     RSS: is related to the amount of phys mem needed by the kernel itself
         for its OWN use (e.g. the sizes for the mbufs are included here)

     VSZ: is somehow related to the amount of memory pages inside and
          OUTSIDE the kernel at which the kernel needs and WANTS to have a
          look. This includes (????) all the VSZ of all the processes (in
          MACH, we could say all the Memory Objects)
          Fortunately, this kernel VSZ does NOT need a swap area.
     
     Regards,
                                      Lucien HERCAUD

So it appears not to matter how large they grow, as they aren't indicative
of actual resource consumption. Now if I can only convince my users of
this.... they have a hard time understanding why this kernel idle process
(or kproc on an IBM) is constantly stealing cycles from their jobs!

Thanks to all who responded, you know who you are!
Stan
Received on Tue Nov 21 1995 - 21:52:51 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT