[comp.sys.hp] swap space for diskless clients

ac1@rosemary.cs.reading.ac.uk (Andrew Cunningham) (05/05/90)

In article <1990Apr30.024120.20924@comp.vuw.ac.nz> andy@comp.vuw.ac.nz (Andy Bond) writes:
>I'm trying to find the total swap space available for a diskless
>HP300.  If I look at nswap in the kernel, its value is zero, whereas
>for a disked HP300 it is correct.  This seems understandable since the
>HP300's share swap space on a server (which returns the correct nswap
>value), but none the less, isn't too helpful.
>
The total swap on the server is divided amongst the cnodes in a shared
cluster; no c-node has a limit short of the total; thus all the space
is available for any given cnode.  

[Unless you have local swap; then each node can swap to its local
disk, and to a remote disk as well, i think, which makes things much 
more complex for your purposes...]


>I really want to get total and free swap space used in a cluster by
>all the diskless clients as well as the disked server (providing the
>swap space).  I could look through the proc table on each cluster host
>but this seems a somewhat long-winded approach.
>
as already suggested, monitor is your friend when trying to do this.

This munges the information held on the server about what swap is
being used by each cnode.  

Hope this is useful

AndyC

>Thanks for any help,
>andy
Andrew Cunningham			 	JANET:ac1@uk.ac.reading.cs.csug
SNAIL: Dept. of Computer Science, Whiteknights, READING RG6 2AX
FROM UselessCapitals IMPORT Disclaimer;
"Sodomy non sapiens" (Buggered if I know)  -Terry Pratchett "Mort"

dale@hpfcmgw.HP.COM (Dale McCluskey) (05/08/90)

Andrew Cunningham (ac1@rosemary.cs.reading.ac.uk) writes:
...
> The total swap on the server is divided amongst the cnodes in a shared
> cluster; no c-node has a limit short of the total; thus all the space
> is available for any given cnode.  

This is true unless "maxswapchunks" has been set for a particular client.
This is a kernel parameter that is documented in an appendix to the 
System Administration manual.  The parameter is enforced on the client, 
which allows for different clients to have different limits.

> [Unless you have local swap; then each node can swap to its local
> disk, and to a remote disk as well, i think, which makes things much 
> more complex for your purposes...]

If a client has local swap, that's all it can swap to; it can't use both
the local disk and the server's swap space.

I'll echo what others have said: "monitor" is the tool of choice for 
looking into this stuff - the "K" screen will be particularly helpful 
in this case.

							Dale


The above comments are from me, not HP.  They should *not* be taken as
an official statement by HP.

andy@comp.vuw.ac.nz (Andy Bond) (05/08/90)

In article <1080149@hpfcmgw.HP.COM> dale@hpfcmgw.HP.COM (Dale McCluskey) writes:
[...]
>I'll echo what others have said: "monitor" is the tool of choice for 
>looking into this stuff - the "K" screen will be particularly helpful 
>in this case.

Since my initial query, I have had several email messages recommending
I use monitor.  I agree that it is very useful, but it addresses a
different problem than that which faces me.  Let me explain ...

I am extending rstatd for use in a multi-vendor network so that it
will return, among other things, statistics of virtual and real memory
usage.  Since rstatd is an RPC based routine, I require it to perform
queries efficiently with as little impact on the local host as
possible.  Since a lot of other information is being gathered from the
kernel at this time, I want to know how to obtain this memory usage
information from the kernel.  On our 835, I can obtain the required
information via:

Used Real Memory = _physmem - _total.t_free
Free Real Memory = _total.t_free

Used Virtual Memory = _nswap - _total.t_vm
Free Virtual Memory = _total.t_vm

(BTW, I know that t_vm isn't exact but at least it's in the ball park)

On our HP300 cluster, the virtual memory values don't get me what I
want to know.  Each node (diskless clients and server), reports
_total.t_vm correctly for the local node, but only the server knows
_nswap (which really doesn't help as it doesn't know the usage of the
diskless nodes).  I want some way of locally (this is important, I
don't want to be remotely getting _total.t_vm for all the nodes)
finding the amount of space left on the swap device that each client
uses (since they're shared, it's probably going to fairly large).

I hope this clears up any confusion.

thanks for any help,
andy
--
Internet: andy@comp.vuw.ac.nz      |    Andy Bond, Dept. of Computer Science
Phone:    (04) 721-000 ext. 8144   |    Victoria University
Fax:      (04) 712-070             |    P.O. Box 600, Wellington, New Zealand
		   Beware the fury of a patient man