tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Willig Reimund <Willig.Reimund () gdr ! de>
To: tru64-unix-managers
Subject: SUMMARY: memory usage
Date: Thu, 24 Sep 1998 07:13:23 +0000	[thread overview]
Message-ID: <96078721912066.tru64-unix-managers.marc@archive.invalid> (raw)

Hello alpha,
i got two answers, which are appended to this mail. I think its better
for understanding than summarize it with my own words!

question was:
> Hello hello,
> does anyone has a short answer (if possible?) for the following
> question, which came up while reading the "Digital Unix Sytem Tuning and
> Configuration" Handbook:
> 
> Wired memory (static and dynamic):
> the handbook figures out, that the static wired memory part reserves
> physical memory to hold opertaing system data and text, system tables,
> the metadata buffer cache ..., while the dynamically wired memory
> contains "dynamically allocated data structures. This memory pool growth
> according to the demands and has a default limit of 80%.
> 
> question: which are these data structures and where is the difference
> berween this memory pool and the memory allocated by user-processes,
> which should reside in virtual memory?




1. thank you  Alexander
The answer is UBC which stands for
Unified Buffer Cache, which generaly
is not needed when using AdvFS.

You can safely redused it to 10% of
real memory. This actualy caches
filesystem data, which actualy is not
needed when you have advfs, since
it has it's own memory reservation
field in the kernel. 

So, to sum up: reducing the ubc 
values, saves you from purchasing
more memory, since it is able to
fool you 'cause it uses up to 100%
of real memory (which results in heavy
paging indicating 0% memory available),
and from draining system resources
due to page-ins and page-outs.

2. thank you Lars
"Wired memory" is (virtually)physical memory. This means that the
virtual adress is the same as the physical adress and it is never paged
out.

"Static wired memory" is thus how much physical memory is set aside for
the operating system kernel at boot(never ever paged out).

"Dynamic wired memory" is memory allocated by the kernel that it dont
want to page out. I have seen it in DECNet/OSI, increasing when the
number of OSI associations increase. Dynamic wired memory can be
unwired(available for paging) again as opposed to the static.

"Virtual memory" is memory where adress translation takes place. You
never know the physical position of a virtual adress. It may jump
around.

However, you can wire pages of your own by means of eg.: plock(2) or
mlock(3). 

The program below:
#include <sys/mman.h>

int page=8192;
int npages=1024;

main()
{
        char *p = (char*)malloc(page*npages);
        if (mlock(p, page*npages)<0)
                perror("mlock");
        pause();
}

when run as root, it is seen that it causes exactly 1024 pages to be
wired (vmstat 2)

  r  w  u  act  free wire fault cow zero react pin pout  in  sy  cs  us 
sy  id
  2 68 22   24K  19K 7438   61    0   61    0    0    0  42 335 317 
29   5  66
  2 68 22   24K  19K 7438  440   42  270    0  122    0  14  74 270  
6   1  93
  2 68 22   24K  19K 7438   61    0   61    0    0    0  15  74 279  
7   1  92
  2 68 22   24K  19K 7438   61    0   61    0    0    0  15 110 278  
7   1  92
  2 68 22   24K  19K 7438   64    0   61    0    0    0  11  81 269 
36   1  63
  2 68 22   24K  19K 7438   61    0   61    0    0    0  33 106 315  
7   1  92
  2 68 22   24K  19K 7438   61    0   61    0    0    0  22  62 292  
7   1  92
here---->
  2 69 22   24K  18K 8462   99   14 1091    0   12    0  15  87 270 
21   4  75
  2 69 22   24K  18K 8462   62    0   62    0    0    0  12  75 274  
7   1  92
  2 69 22   24K  18K 8462   62    0   62    0    0    0   9  45 266  
7   1  92
  2 69 22   24K  18K 8462   62    0   62    0    0    0  10  79 269  
7   1  92
  2 68 22   24K  19K 7438   62    0   62    0    0    0  11  62 264 
21   2  77
  2 68 22   24K  19K 7438   61    0   61    0    0    0  13  85 273  
7   1  92
 
 






 mit freundlichen Gruessen
          Reimund Willig
------------------------------------------
e-mail: willig.reimund@gdr.de
       tel: +49-5205-941747
      fax: +49-5205-941725
  ** Schwer ist leicht was **
-----------------------------------------

                 reply	other threads:[~1998-09-24  7:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox