SUMMARY: Free memory

From: Trubkina I. (asa@mmk.ru)
Date: Tue Mar 24 1998 - 04:49:17 CST


Original question:

> Where can I get information about MECHANISM of physical memory
utilization in Solaris?
> How to view memory utilization - I knew (sar,vmstat,top,swap).
> I wonder why after some processes "freemem" don't renew.

Sorry for my nonsense "bombarding" of sun-managers-list...
It was unintentionally.
I wanted quickly to find out about it too much.
And I did't review any sunsite at first.

Thanks for all info...
........................................................................
From: Eugene Kramer <eugene@uniteq.com>

As to freemem, I guess, you refer to vmstat output. Memory in Solaris
will not get free if noone needs it. So this parameter does not
increase when a process goes away. If, for example, the same executable
is requested again, it can be fetched from the memory rather than from
the disk.
........................................................................
From: birger@sdata.no (Birger Wathne)

Read Adrian Cockroft's tuning articles in SunWorld Online. The latest issue
has a pointer to some neat memory tools. But you should also read earlier
performance tuning articles to get the whole picture before you try these
tools. Otherwise you may end up even more confused....

http://www.sun.com/sunworldonline/

In general: The kernel only starts scanning actively for new free pages
when the amount of free RAM drops below a kernel variable called LOTSFREE.
Until then, pages are left in memory. If they are needed, they will be
reclaimed,
but if the same application gets restarted the kernel knows that those
pages are already in RAM. Saves a lot of paging activity for processes that
get
started frequently.
........................................................................
From: Roland Grefer <btirg@ui.uis.doleta.gov>

It could as well not just depend on the operating system, but on the
compiler you are using or the whoever developed the program has used. Some
compilers do not implicitly free memory that had been allocated but is no
longer used after program termination.
........................................................................
From: Brent Parish <bparish@pfn.com>

If you can get ahold of any of Adrian Cockrofts articles (he writes for =
Sun), he has a specific article on how the free memory and page scanner =
daemon run. Im sorry, I don't know the URL to that article, but here =
are some of his writings dealing with memory:
http://www.sun.com/sunworldonline/common/swol-backissues-columns.html#perf
........................................................................
From: Peter Polasek <pete@cobra.brass.com>

I assume that your concern is that you don't see the free physical memory
in vmstat going to a large value when memory intensive processes are
no longer running. This is very typical behavior when a system has been
up for a long time. The OS will allocate physical memory to even inactive
processes when there is not a high demand for memory. If the free
memory in vmstat is above ~5Mb (with default settings) and the 'sr'
column is 0, then there is no reason for concern. You can see the total
memory size (virtual and swap) for each process by looking at the 'SZ'
field in the 'ps -elf' output. You determine which process is using
the physical memory by looking at the '%MEM' column of the /usr/ucb/ps
-auwx
output ('/usr/ucb/ps -auwx | sort -nr +3 | head -20' will sort the
processes
by physical memory use). If you see a high 'sr' value and/or a small
memory
free, then you need more physical memory. You can use the above ps
commands
to identify the hog processes.
........................................................................
From: "Darryl V. Pace" <dpace@tacticsus.com>

After a process runs on a Solaris machine, the process is cached in
memory for some certain amount of time...I can't remember if it's
cached for a specified time period, or if it's purged from memory
when another process requests the memory space it's using. At any
rate, this is why freemem doesn't report a drop in memory usage
immediately after a process finishes running.
........................................................................
From: Colin_Melville@mastercard.com

Point your web browser at:
http://www.sun.com/sunworldonline/swol-03-1998/swol-03-perf.html

Adrian Cockroft has an article there on sizing memory in Solaris. You can
also search the Sunworld Online archives for more
information.
........................................................................
>From julienlim@rocketmail.com

Check http://www.dataman.ml/cgi-bin/sunmanagers and
there's probably information posted.

Also check out the sunsolve.sun.com website and
perhaps get Adrian Cockcroft's performance book.
........................................................................
From: olovyann@pfizer.com (Oleg Olovyannikov)

Recomended books :
"Configuration and Capacity Planning for Solaris Servers," by Brian L.
Wong,
Sun Microsystems Press, 1997
"Unix Internals, The New Frontiers," by Uresh Vahalia, Prentice Hall, 1996.

FAQs on http://sunsolve.sun.com :
Document ID: 1325 SYNOPSIS: A description of Hardware Memory Management
Document ID: 1326 SYNOPSIS: A description of virtual cache
Document ID: 1204 SYNOPSIS: Layers of the Virtual Memory System
Document ID: 1327 SYNOPSIS: A description of How Solaris handles Physical
Address Cache
Document ID: 1230 SYNOPSIS: Three Virtual Memory Perfomance Monitors
Document ID: 1204 SYNOPSIS: Layers of the Virtual Memory System
........................................................................



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:34 CDT