Well, this is very interesting and I didn't know it.
HOWEVER, there's still something amiss. Or at least there was the other
day. Let me explain:
I've been having on and off problems with my ISP. Things like not being
able to connect, dropped connections, slow tranfers over supposedly fast
connections, etc. On Wed it was being particularly slow all of a sudden
and I thought to myself "What if someone hacked into my server and is
tranferring files or something?". So as part of my checking around I
tried to do a "who" on the server--and I got a "memory exhausted"
message. I had an uptime of about 50 days until then and was down to 2
MB. I don't know what the cache and buffer values were. I messed with
this a bit and then decided to reboot. No ISP problems since (although
that could easily be coincidence). Now I'm back down to ~2 MB but "who"
works correctly.
In any case the "memory exhausted" message needs an explanation.
Ray Olszewski wrote:
>
> At 12:06 PM 6/12/99 -0700, David Rysdam wrote [in part]:
>
> >No, I'm definitely leaking memory. From 18 MB free to 2 MB free in
> >about 3 days.
> >
> >What's weird is no processes seem to be taking an undue amount of RAM.
> >I just have high "cached" and "buffered" values (11 and 13
> >respectively). I'm getting this info from 'cat /proc/meminfo'.
> >
> >When I reboot the same processes are running but the free memory shoots
> >back up.
>
> This is normal Linux behavior; it's not a memory leak. It's exactly what
> Frank was trying to explain to you in his response. I'll try with a bit more
> detail.
>
> When a process finishes running (or releases a resource), the kernel will,
> if possible, leave that process or resource in memory, in effect betting
> that if you used it one, you'll want to use it again soon. Such memory
> (depending on what it's holding) can be classified as "cached" or
> "buffered". But if a new process needs eome memory, the kernel will reassign
> some of this memory (using a dump-the-oldest-stuff-first algorithm, I think)
> to the new process. It's available, just not *quite* free.
>
> To see what's going on, run "free" and look at the difference between the
> "free" entey on the first line and the one below it on the "+/- buffers"
> line. The difference is the amount that's holding old stuff against future
> uses but available if needed for something new.
>
> When you reboot, of course, free memory seems to "shoot up" because the
> buffered processes and data have been lost. Now the program or data will
> have to be read afresh from the hard disk before it is run or accessed, a
> slower process than using the RAM buffer.
>
> BTW, to see how much this approach can improve perfoemance, try accessing a
> file from something slow like a CD. As an example, if I make 2 copies of the
> same bootdisk image, running dd separately for each one, the first will take
> about 3 times as long as the second. The difference is that for the second,
> the bootdisk image is already buffered in memory.
>
> ------------------------------------"Never tell me the odds!"---
> Ray Olszewski -- Han Solo
> Palo Alto, CA 94303-3603 [EMAIL PROTECTED]
> ----------------------------------------------------------------
--
My public encryption key is available from
www.az.com/~drysdam/crypt/rysdam.gpg.html
and of course www.keyserver.net