9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 on PC - memory and swap
@ 1997-07-23 17:43 David
  0 siblings, 0 replies; 2+ messages in thread
From: David @ 1997-07-23 17:43 UTC (permalink / raw)


> Loading a version of 9pccpudisk, I get the following message:

> 	2531 free pages, 10124K bytes, swap 55564K, highwater 504K, headroom
> 628K

> a "cat /dev/swap" yields:

> 	641/2531 memory 0/11360 swap

> on an idle CPU/auth server.

> I've not bothered with the details before, but now I'm curious.
> Evidently, the swap value in the kernel message is displayed
> incorrectly, specially in view of the fact that swap has not been
> enabled at the time the kernel loads.

> Given that the CPU server has 16 meg of RAM, I'd also be curious as to
> why only 2531K remains available.  Pointers to reading material are
> welcome.

The numbers in /dev/swap are in units of pages, and on a PC
the page size is 4K.  [Aside: why is there no /dev/pagesize?]

So, 2531 * 4K = 10124K, ie of the 16M that you have, 10M is
available for user processes.  The other 6M is kept by
the kernel for its text and data space, in-kernel bitmap
storage, scsi and ethernet buffers, stream blocks, etc etc...

According to /dev/swap you have 11360*4K = 45440K available
for swap.  If you add 10124K, you get 55564K, the value printed
at startup.  This number represents the total amount of
virtual memory available when swapping is enabled (and
when the swap partition is >= BY2PG*conf.nswap).  See
pageinit() in /sys/src/9/port/page.c, where the message
is printed...




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [9fans] Plan 9 on PC - memory and swap
@ 1997-07-23 13:05 Lucio
  0 siblings, 0 replies; 2+ messages in thread
From: Lucio @ 1997-07-23 13:05 UTC (permalink / raw)


Loading a version of 9pccpudisk, I get the following message:

	2531 free pages, 10124K bytes, swap 55564K, highwater 504K, headroom
628K

a "cat /dev/swap" yields:

	641/2531 memory 0/11360 swap

on an idle CPU/auth server.

I've not bothered with the details before, but now I'm curious.
Evidently, the swap value in the kernel message is displayed
incorrectly, specially in view of the fact that swap has not been
enabled at the time the kernel loads.

Given that the CPU server has 16 meg of RAM, I'd also be curious as to
why only 2531K remains available.  Pointers to reading material are
welcome.
--
Lucio de Re (lucio@proxima.alt.za)
Disclaimer: I'm working at getting my opinions to agree with me.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-07-23 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-23 17:43 [9fans] Plan 9 on PC - memory and swap David
  -- strict thread matches above, loose matches on Subject: below --
1997-07-23 13:05 Lucio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).