Hi Wes, thanks for replying. Yes, I know about the disk cache, and that you can't trust the 'free' in programs like 'top', but in 'free' on line 2, where it says +/- buffers/cache, the last number gives you the actual free bytes, including the ones currently used by the kernel for caching, or at least so I've been told. Now, in the past it has always worked to add up the numbers I mentioned, and the result would come very close to the number in 'free'. In fact I just checked, and after 19 hours of using blackbox WM I have 398 MB free, and the numbers add up. I'm suspect kde2 is the culprit, but what puzzles me is where the memory is, and why it's not showing. Is there a way to dump the kernel's page table, and see which programs use what memory, and if it's possibly the kernel that was sitting on my memory before?! regards Anders On Sat, 20 Oct 2001, Wes Kinard wrote:
It is very likely that you are not taking into account the disk reads. When you access files on disk you read the data into memory which is kept there until marked dirty or the memory is needed. What this gives you is much faster access to that data in the event you need it again before it is paged out. From my experience (mostly with AIX) it is of very little use to judge a system's memory requirements by looking at freemem. Run vmstat or similar tool and observe the swap in/out. I just turned on my laptop with a little over 200MB real memory a few minutes ago. Immediately after login I saw 94808 used and now I'm seeing 99656. All I have run is a few ls' and an "rpm -qpl". The important thing though is that I am showing zeros for si and so via the vmstat command. I'm also showing zero swap used.
Now, do you have a memory leak? I can't tell you that but counting up the memory from a 'ps aux' and comparing to your free memory won't tell you much. Comparing memory usage of programs over time may give you some insight into if/which program may be giving you a problem.
wk
"If you have any trouble sounding condescending, find a Unix user to show you how it's done." -- Scott Adams