Subject: Interesting operational differences between NetBSD/cobalt and NetBSD/i386
To: None <port-cobalt@netbsd.org>
From: Ian Spray <cobalt@minimal.cx>
List: port-cobalt
Date: 10/08/2003 10:08:55
(This is mainly me thinking out loud, so all corrections and URLs to basic
guides/system internals info are *most* welcome)

Ok, so bear in mind that this is observational, and is not backed up by any
sort of source code examination, but in the process of setting up an x86
machine so I can start proper debugging on my Qube I tried messing with the
load on the system to see what happened (server specs at the end of the
email).

This is an example of what I see on my Qube:

load averages:  1.52,  1.49,  1.15
47 processes:  43 sleeping, 3 stopped, 1 on processor
CPU states:  0.5% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.5% idle
Memory: 89M Act, 31M Inact, 372K Wired, 14M Exec, 73M File, 29M Free
Swap: 260M Total, 10M Used, 250M Free

One of the things that has bugged me from the outset is that the file cache
will grow at the expense of system swap - ie: when there is a need for more
RAM the file cache is not cleared out, but instead swap gets used.

Admittedly the Pentium box was running 1.6.1, but I decided to give it a
hard time and (using the ports tree) tried building Apache 1.3.28, bash2 and
vim 6.1 at the same time, and ran top in a fourth wscons terminal.  I don't
have the exact figures to hand, but the load was way up at around 6.45 and
the system was bouncing around the end of RAM, with varying amounts of 10MB
(a big gcc job just finished) to 454KB free.  During this time the file
cache varied between 31MB and 20MB, and the system *always* stole RAM from
the file cache before it went into swap.  Swap was used, but to a grand
total of 140KB, which I take as being a lag in freeing up file cache.

Now I could be way off the mark here and the VM system might have hideous
complexities that prevent things from working 'as I think they should' on
the Qube, and I could easily have missed the whole point of the file cache
(please, correct me and help me learn !) but the behaviour of the Qube
doesn't change regardless of the state of soft dependancies, which I
initially thought the File entry in top was on about.  It could also be that
I need to run lots of instances are Apache/imapd/named/ssh etc. on the x86
to lock the file cache pages as worth saving - that will happen but it'll
not be immediate as I'm still setting things up an evening at a time.

The only difference in the drive layout is that I have the Linux boot
partition, 260MB swap and the rest as root for the Qube (in hindsight a
mistake, as it takes *ages* to reboot - around 15 minutes to check the
file system) and the x86 had a 256MB root, 256MB swap and the rest as /usr.

Qube2 Specs: 192MB RAM, 120GB h/drive (soft dep), 260MB swap, NetBSD 1.6
x86 Specs:   PIII 450MHz, 64MB RAM, 20GB h/drive (soft_dep), 256MB swap,
             NetBSD 1.6.1

TTFN,
-- 
ian.
PGP Fingerprint: D170 35A3 C858 6E85 9B5B  1557 4CD5 6F6F E176 2D0A