[Date Prev][Date Next]
Re: slapadd filching memory
Andrew Findlay wrote:
On Mon, Nov 10, 2003 at 09:58:51AM -0600, Jon Roberts wrote
The problem is that the memory is not released, neither during the
slapadd (which would've helped), nor after the process is completed,
(successfully or not). Starting and stopping slapd does nothing. I have
to restart the machine to get the memory back. I fiddled with DB cache
values (4 Mb in a single block seemed to work best); that helped
efficiency somewhat but memory keeps disappearing in the same manner.
Free memory is wasted memory. What you are seeing is just the normal
operation of a modern operating system. If there is nothing better to
do with it, almost all memory will get used as page cache in the hope
that it avoids having to do a physical disk operation in the future.
The memory is available for instant re-use as all the OS has to do is
to invalidate some entries in the page cache.
Thanks for the response. I believe I understand this point, but...
If I ran a reasonably sized slapadd job when free memory was available,
it ran without performance problems. However, when I did several such
smaller loads that each took a fraction of remaining free memory,
eventually I got a system that has trouble doing *anything* at all until
I rebooted it. In other words, if this memory is still available then on
this system the re-use of memory isn't at all "instant"; it happens
slowly and in small increments. If that's normal, I don't know how a
service could operate over significant periods of time without hitting
the same wall.
Don't worry about free memory. If you are having performance problems
you need to look at other things such as page in/out rates, and BDB
It may not be a need for "free" memory per se, but the performance issue
I witnessed was definitely tied to memory use. I don't experience the
same behavior with other applications and commands, which I can observe
freeing memory upon or near completion. On the other hand, I accept that
this may be OS related; I will take a closer look at paging. Thanks again.