[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cache in RAM / linux kernel
On Tue, Feb 02, 1999 at 05:25:54PM +0200, Alex Shnitman wrote:
> Hey.
Hi there, Alex. Long time no talk.
> Question to any Linux kernel hacker out there, before I go and bug
> linux-kernel. I have a pretty low-RAM box and I notice that with 2.2
> about one-third of the RAM is used for caching, even though swap is
> excessively used making speed very low. It has 32 MB of RAM, and many
> users run stuff on it -- look at the free output:
Ah! Finally. Somebody else seeing this.
I've been trying to persuade some people in linux-kernel that I'm feeling my
machine is swapping too much, but I just can't come up with accurate figures
(I'll try to measure it sooner or later, though).
Ever since 2.1.something it started doing this. After I complained directly
to Linus at 2.2.0pre9, some changes were made (check the diffs - a few lines
added here and there, and some lines moved around - nothing major) and 2.2.0
was far better (not to attribute this change to my e-mail to Linus, that
was probably never read - it was also sent to the linux-kernel mailing
list).
Anyway, I still feel 2.2.1 doesn't handle swap quite as well as 2.0.36 used
to. The machine is generally faster, but when doing "memory intensive tasks"
(note - memory intensive on a 16mb machine is practically anything), I'm
feeling needless swapping.
> My question -- is the parameter tunable (i.e. can I tell the kernel
> how much RAM to use for cache)? Where can I find it?
No. It was removed. The other comment you got on the list from Vadim
Smelyansky is, as far as I know, incorrect. It used to be tunable in
previous versions, but somewhere along the way all support for limiting the
buffer cache and swap cache sizes was removed. The proc files are still
there, but nothing from them is actually being used. That's true for around
2.2.0pre-something, when I actually went over the sources looking for these
variables.
Can you somehow show that the new kernel is slower doing certain things than
less recent kernels? If we come up with a detailed report, they might
listen... (I would have tried 'fixing' this myself, but I really know
nothing about the mm sub-system, and I don't have any time to invest in
learning it).
Nimrod