* SUMMARY: memory allocation
@ 1999-05-12 17:59 Tony Warner
0 siblings, 0 replies; 2+ messages in thread
From: Tony Warner @ 1999-05-12 17:59 UTC (permalink / raw)
To: tru64-unix-managers
Thanks to the people who responded so quickly!
Basically, I was looking for a break down of real memory
usage.
Most people came back with using 'ps avx'.
this is nice since it sorts by physical memory use!
another good one was 'vmstat -P'.
This is just what I was looking for. Also, a couple of people
explained that the o/s uses as much memory as is can for
the currently running processes. Therefore, "Free Memory" is
a somewhat misleading number. It will often be quite low even
when there is very little running on the machine. The o/s
allocates memory as it is requested by processes.
--
There were some hints for kernel tuning, as well...
------------
Tony,
Take a look that the tuning and performance manual. There are
instructions there for looking at the kernel structures. You
can also install Performance Manager (pmgr), top (freeware, see
the archives for locations), or vmubc from Compaq :
ftp://gatekeeper.dec.com/pub/Digital/vmubc.tar.Z
among other places.
The usual suspect is vm-ubcmaxpercent which is the kernel
param that controls how much memory the vm system is allowed to
use for i/o buffers and such. The default value is 100%. This
memory won't be released until another process requires it.
Alan Davis
------------
and ...
------------
Odds are it's the filesystem cache, which be default is set to a max of
50% of physical memory. There's a parameter in sysconfigtab to change
it,
in the vm subsystem, of course. I'm not sure what it is offhand, but it
is in the system tuning and configuration manual. Technically, this
memory *should* be reclaimed by the system as it is needed, but of
course,
it does take some time to flush the cache, so performance is degraded.
Changing to 20 percent should solve your problem, and still leave a
reasonable sized cache.
Andrew
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Andrew Busch | email : a.busch@qut.edu.au
|
------------
*********************************************************************
Tony Warner Tony.Warner@gat.com
General Atomics (619) 455-4285
*********************************************************************
^ permalink raw reply [flat|nested] 2+ messages in thread
* SUMMARY, memory allocation
@ 1995-04-07 0:44 chu
0 siblings, 0 replies; 2+ messages in thread
From: chu @ 1995-04-07 0:44 UTC (permalink / raw)
To: tru64-unix-managers
My original question was about not being able to allocate a large
amount of memory from a program. Thanks to Alan Rollow and Fabrice Cuq
for their incredibly fast response, I was able to check the one thing
that I missed: the per process limits. (This is something that makes
one feel kinda stupid after he realizes the obvious.)
While my default data size limit was already at 128 MB, appearantly
enough of it was used up by something or another so that I could not
allocate 80 MB more of data space within the program. Upping the data
size limit allowed me to run the program.
Alan's reply:
V1.3 and V1.2 used a doubling allocation algorithm for
virtual memory. For example if malloc uses sbrk to get
1 MB initially, it will want 2 MB next, then 4 MB and
so on. Your 80 MB is probably up in the range of asking
for 128 MB in addition to what's already been allocated
and is running up against the data size limit.
Use the shell built-in to check the datasize limit and
see if you can raise it. The system data size looked
big enough for most things, so the dfldsiz is probably
the initial limit for the shell.
In V2.0 the doubling algorithm is replaced by one that
uses a constant size, which is much more friendly for
large allocations.
In my case, I boiled down my problem to a simple program with a single
malloc call and upped the number of bytes until it returned NULL. So
each time the program was run, it only called malloc once. But it is
good to remember the doubling behavior for other parts of the program.
thanks for the responses.
eugene
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-05-12 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-12 17:59 SUMMARY: memory allocation Tony Warner
-- strict thread matches above, loose matches on Subject: below --
1995-04-07 0:44 SUMMARY, " chu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox