Skip to contentSkip to conversation

Swapping broken on 2.6.9? Limit Page Cache growth?

DISCUSSION Jon Florence 2 participants 3 messages Jul 11, 2005

lore
Share & tools
lore
#0 lore raw

Hi,
I have got a box running 2.6.9-1.667smp (FC3) with 1GB of Physical memory & 1GB of swap. I run 2 test programs on the box. The first one mmaps 800M of memory and mlocks it. The second one tries to allocate 500M of memory in 100K chunks and frees it in the end. However, when the 2nd program runs, my free swap memory as reported by "top" drops to zero and OOM kicks in killing my first program. This appears to be incorrect as I had expected the 2nd program to start swapping. If I run the same 2 programs on similar hardware but with 2.4.20, I have no problems. The 2nd program swaps as expected. Can anyone plz suggest what I can do to remedy the situation or is this a known bug?

Also I seem to be having another problem with the page cache. I am running Samba on a server with similar hardware as above (FC3). As soon as I get large reads and/or writes, the page cache grows really huge, causing OOM to kick in again. Is there is a way to limit page cache growth or force VM to reclaim memory from page cache? I did find an old patch which seems like it would work but didnt see much follow up.

http://linux.derkeiler.com/Mailing-Lists/Kernel/2003-08/5747.html

Thanks in advance for any help!
Jon

#1 lore raw
Quoted 2 lines · Jon Florence

Hi,
I have got a box running 2.6.9-1.667smp (FC3)

That's a Red Hat kernel so you should take it up with them, not the LKML.

-Doug

#2 lore raw

Yes but I was having the same problems when I ran the tests on stock 2.6.10 & 2.6.11 kernels so it isnt limited to redhat only.

Quoted 10 lines · Douglas McNaught
Quoted 2 lines · Jon Florence

Hi,
I have got a box running 2.6.9-1.667smp (FC3)

That's a Red Hat kernel so you should take it up with them, not the LKML.

-Doug