[comp.unix.ultrix] what are 'missing' pages?

sbw@naucse.UUCP (Steve Wampler) (03/29/90)

I'm having trouble understanding the world.  Could some kind soul
provide some directions?

The world:
	uVAX-III with 16MB main memory and two 20MB swap partitions
	(not on the internal DEC disks but on two SCSI drives).
	Ultrix 2.2 OS.

We've had trouble lately with malloc()'s failing do to
'lack of core' or 'lack of swap space', even though we
are not approaching the total 56 MB above.  It looks
as though (I'm not sure because I don't really know how
to check) this happens when the total virtual memory
of running processes exceeds the amount of physical
memory (16MB).

Is this 'expected' behavior?  We're talking BIG malloc's
by the way - typically 1 to 3 MB.

Here's the output of 'pstat -s'

	11661k used (1357k text), 8781k free, 3240k wasted, 40781k missing
	avail: 13*512k 2*256k 3*128k 7*64k 10*32k 12*16k 269*1k

Now, can someone explain What This All Means?  In particular, since
there is ~40MB 'missing' and since this roughly matches our total
swap space, it makes me think that there *is* no swap space.  In
fact, 'vmstat -S' shows:

 procs     memory                       page      disk  faults          cpu
 r b w   avm  fre  si so  pi  po  fr  de  sr r0 r1 r2 r3  in  sy  cs us sy id
 2 0 0  3257 6833   0  0   0   0   0   0   0  1  0  2  0  71 156  56 12 14 74

See, no swap in's or out.
Here are the (current) sums of the SZ and RSS fields from 'ps -aux'

	   SZ     RSS
	14602	 4792

if that means anything.  Note that the number of resident pages is
quit a bit smaller than physical memory.  (The above total includes
the pages held by page daemon, if that means anything.)

Anyway, if someone can guide me in the true path to enlightenment, I'd
be effusively thankful.
-- 
	Steve Wampler
	{....!arizona!naucse!sbw}
	{sbw@naucse.cse.nau.edu}

grr@cbmvax.commodore.com (George Robbins) (03/29/90)

In article <1963@naucse.UUCP> sbw@naucse.UUCP (Steve Wampler) writes:
> 
> The world:
> 	uVAX-III with 16MB main memory and two 20MB swap partitions
> 	(not on the internal DEC disks but on two SCSI drives).
> 	Ultrix 2.2 OS.
> 
> We've had trouble lately with malloc()'s failing do to
> 'lack of core' or 'lack of swap space', even though we
> are not approaching the total 56 MB above.  It looks
> as though (I'm not sure because I don't really know how
> to check) this happens when the total virtual memory
> of running processes exceeds the amount of physical
> memory (16MB).
> 
> Is this 'expected' behavior?  We're talking BIG malloc's
> by the way - typically 1 to 3 MB.
> 
> Here's the output of 'pstat -s'
> 
> 	11661k used (1357k text), 8781k free, 3240k wasted, 40781k missing
> 	avail: 13*512k 2*256k 3*128k 7*64k 10*32k 12*16k 269*1k

Let's ignore the numbers and check the bases...

1) do you have the second swap area defined in /etc/fstab as a :sw: partition
	type and have a "swapon -a" comand executed in your /etc/rc?  (or
	explicitly specified as "swapon /dev/xxnb", I forget when this changed)

2) do you really have two swap areas define in the system configuration file
	in the "swap on xxnb and xxnb" statement?

3) does the value for physmem in your config file equal or exceed the amount
	of physical memory installed in the machine?

4) do the values of dmmin and dmmax (or their defaults) support a large enough
	virtual memory limit to utilize all the swap space.

5) is a lot of space being wasted for getttys or other non-important processes
	due to vmmin being too small to fit the processes into the initial
	allocation?

If you check out on 1-4, then I'm out of clever suggestions.  Number 5 is more
of a tuning thing that helped me back when I had lots of often inactive gettys
and not much swap space.

> Anyway, if someone can guide me in the true path to enlightenment, I'd
> be effusively thankful.

Me too...  8-)

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (03/30/90)

In article <10426@cbmvax.commodore.com> grr@cbmvax (George Robbins) writes:
>In article <1963@naucse.UUCP> sbw@naucse.UUCP (Steve Wampler) writes:
>> The world:
>> 	uVAX-III with 16MB main memory and two 20MB swap partitions
>> 	(not on the internal DEC disks but on two SCSI drives).
>> 	Ultrix 2.2 OS.
[...]
>> Here's the output of 'pstat -s'
>> 
>> 	11661k used (1357k text), 8781k free, 3240k wasted, 40781k missing
>> 	avail: 13*512k 2*256k 3*128k 7*64k 10*32k 12*16k 269*1k
[...]
>1) do you have the second swap area defined in /etc/fstab as a :sw: partition
>	type and have a "swapon -a" comand executed in your /etc/rc?  (or
>	explicitly specified as "swapon /dev/xxnb", I forget when this changed)
>
>2) do you really have two swap areas define in the system configuration file
>	in the "swap on xxnb and xxnb" statement?
[...]

I only have experience with Ultrix 3.x/UWS 2.x on a DS3100, and I'm
still a novice at that, so this may be way wrong.  But anyway...

First check the things George suggested--make sure that 'swapon' and
'fstab' and your kernel configuration are all correct.  If they are,
and vmstat is showing paging on those devices, then here's something
else to check.

It appears that, for paging statistics and such, Ultrix uses the disk
partition sizes hardwired into the kernel (e.g., in scsi_data.c), not
the values read off the pack.  On my DS3100, I've got a 65 meg paging
area on the b partition of a Hewlett-Packard 600-some meg SCSI drive.
The first time I booted the system with that configuration, with the
HP registering as an "UNKNOWN" generic SCSI drive, everything seemed
to work except 'pstat -s' reported 65 meg missing.  I added an entry
to scsi_data.c for the HP with real values for the b partition,
recompiled, rebooted, and 'pstat -s' looked fine.  I don't have sources
handy, so this is purely phenomenological, but it worked for me...

-Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley)
-Wilson Lab, Cornell University