[comp.unix.ultrix] Resource Utilization Query

saus@media-lab.media.mit.edu (Mark Sausville) (10/08/89)

Hardware: VAX 6320
OS:       Ultrix 3.1

How do I find out how my system is doing in regard to the utilization
of physical memory in the machine?  vmstat has the following output:

 procs     memory                       page      disk  faults          cpu
 r b w   avm  fre  re at  pi  po  fr  de  sr r1 r2 r3 r4  in  sy  cs us sy id
 1 0 0   36k 184k   0  1   1   0   0   0   0  0  0  0  0  20 100  18 11  4 85

The memory fields seem to be fairly consistent around the values shown even
when the load is high.

This machine has 128 MB of main memory and has ~160 MB ow swap configured.
Pstat -s shows:

158361k swap configured
	33471k used (2175k text, 0k smem)
	124888k free, 6999k wasted, 2k missing

My guess would have been that the maximum amount of memory which can get
allocated is 128M (phys. mem) + 160M (swap) less kernel space.  Is this right?

I have never seen the avm field anywhere close to 128k.  Why does the
system swap/page when there seems to be lots of free physical memory?

I suspect I'm showing a good deal of ignorance here, but it's true, I am
ignorant.  I'm new to both VAX architecture and Unix/Ultrix guts.  I'm willing
to rtfm, but would prefer a brief elucidation, with references. The man pages
for vmstat and pstat are more than a little cryptic to me.

And another thing: I suspect I'm not getting much out of the second
processor.  Has this been thrown around before?  A while back, when
troubleshooting we turned off the 2nd cpu and didn't notice much of a
hit.  Any pointers to understanding how the 2nd proc gets allocated
tasks and how effective it is?

			Ignorance is NOT bliss,
						Mark.

Mark Sausville                           MIT Media Laboratory
Computer Systems Administrator           Room E15-354
617-253-0325                             20 Ames Street
saus@media-lab.media.mit.edu             Cambridge, MA 02139

alan@shodha.dec.com ( Alan's Home for Wayward Notes File.) (10/09/89)

In article <SAUS.89Oct8103308@media-lab.media.mit.edu>, saus@media-lab.media.mit.edu (Mark Sausville) writes:
> 
> Hardware: VAX 6320
> OS:       Ultrix 3.1
> 
> How do I find out how my system is doing in regard to the utilization
> of physical memory in the machine?  vmstat has the following output:
> 
>  procs     memory                       page      disk  faults          cpu
>  r b w   avm  fre  re at  pi  po  fr  de  sr r1 r2 r3 r4  in  sy  cs us sy id
>  1 0 0   36k 184k   0  1   1   0   0   0   0  0  0  0  0  20 100  18 11  4 85

	vmstat(1) in this sample doesn't say much except that you
	about 92 MB free memory, a fairly idle system and not much
	if any paging I/O.  Oh, and probably a load average of 1 or
	there abouts.  If this is the first line that vmstat printed
	then it's mostly a history of the system since it booted with
	the "procs" and "memory" being current.

	The only way to get any real information is to look at successive
	sample when running vmstat(1) with an argument:

		vmstat 2

	Will print a sample every two seconds.
> 
> The memory fields seem to be fairly consistent around the values shown even
> when the load is high.
> 
> This machine has 128 MB of main memory and has ~160 MB ow swap configured.
> Pstat -s shows:
> 
> 158361k swap configured
> 	33471k used (2175k text, 0k smem)
> 	124888k free, 6999k wasted, 2k missing
>
	This seems consistant with the information displayed by
	vmstat(1).
 
> My guess would have been that the maximum amount of memory which can get
> allocated is 128M (phys. mem) + 160M (swap) less kernel space.  Is this right?
>
	No, at least in the current version of Ultrix.  Currently
	the total virtual memory space available is limited to
	how much page/swap space is configured.  Hopefully this
	will be fixed in a future release.
 
> I have never seen the avm field anywhere close to 128k.  Why does the
> system swap/page when there seems to be lots of free physical memory?

	First a comment on "avm".  This is ACTIVE virtual memory.
	Though I've never looked at the kernel sources to see what 
	gets counted as "active" the fact that you 90 something meg 
	free suggests that you shouldn't be paging at all once
	except to start up a process.  Based on the sample vmstat
	you gave the system doesn't looke it's really paging.  Some
	paging is necessary as part of starting up a process and
	reading the initialized data, but once that is done it should
	be "quiet".
> 
> I suspect I'm showing a good deal of ignorance here, but it's true, I am
> ignorant.  I'm new to both VAX architecture and Unix/Ultrix guts.  I'm willing
> to rtfm, but would prefer a brief elucidation, with references. The man pages
> for vmstat and pstat are more than a little cryptic to me.

	Don't worry as far as I know there isn't really a FM to read
	on this.  I learned most of what I know by dissecting vmstat,
	iostat and a program called mon.
> 
> And another thing: I suspect I'm not getting much out of the second
> processor.  Has this been thrown around before?  A while back, when
> troubleshooting we turned off the 2nd cpu and didn't notice much of a
> hit.  Any pointers to understanding how the 2nd proc gets allocated
> tasks and how effective it is?

	The multi-processor version of Ultrix is asymmetric.  About
	the only thing interesting the slave processor(s) can do is
	run user mode code.  There are handful of system calls that
	can run on a slave, but they aren't that interesting.  I haven't
	looked at the processor scheduling algorithm recently, but
	think that as long as a process is runnable and there is an
	idle processor it will run.

	Remember though that a slave processor can only run user mode
	code.  If your processes make lots of system calls they will
	only keep the master processor busy dealing with the system
	calls.  A user mode CPU bound processes tend to find an idle
	processor if there is one and just run to it's heart's content.
	Multiple CPU bound processes will end up distributing themselves
	between all the available processors (two being the SUPPORTED
	max).

	Iostat(1) should report on the usage of all processors.
> 
> 			Ignorance is NOT bliss,
> 						Mark.

	And there is very little in the way of documentation to
	dispell the ignorance.  Just lots of folklore and black
	magick.  Even the distributed programs for collecting the
	avialable performance information don't tell all they know.
	Ask your DEC sale rep to track down a program called Monitor
	(for ULTRIX) and see if he can arrange to get you a copy.  Give 
	him my name as a starting place...
> 
> Mark Sausville                           MIT Media Laboratory


-- 
Alan Rollow				alan@nabeth.enet.dec.com