Hello Robert, robert infotility com wrote:
Hi Leos, thanks a lot for your reply, it's very informative.About a year ago we found an issue with RHEL 3 AS, which we considered serious - however, when I called Red Hat support, I was assuerd that the behaviour was absolutely normal. What happened was a server with 4 CPUs, 2 GB RAM and 2 GB swap, which started swapping terribly after some disk activity appeared, and kept swapping ever since then, until we rebooted it.OK, you've got a lot of memory and swap -- this suggests there is more to solving this problem than just increasing the system resources ....
Sure, that's what I found, too. Unfortunatelly the official Red Hat support told me something else - as long as the server did not crash, it was not anything they were going to event start thinking about to solve for me, because it was not a wrong behaviour (from their point of view). :-(
We solved it by turning off the swap - fortunatelly we had enough RAM. This way the RAM does not get filled with disk cache and the application is not forced to slow down due to swapping and everything works fine. When we tried this application on RHEL 4, it worked much better - no swapping, even with heavy disk activity.Can you please clarify one thing? You wrote: "When we tried this application on RHEL 4, it worked much better" -- was swapping enabled but not used, or was it disabled?
The swapping was enabled and the kernel used it in a much more reasonable way in RHEL 4 (from my point of view) - the RAM was used for the disk cache only when it was not needed for running the applications. I can imagine scenario where it would be better to prefer RAM to be used as a disk cache, however I am sure that most real world scenarios benefit from the default RHEL 4 approach much more than they possibly could benefit from the default RHEL 3 approach.
I especially hated the fact that RHEL 3 did not reclaim the RAM to be used by the applications even when it did not need the disk cache content for several hours - it simply kept a big part of RAM wasted!
Last thing to note: I did my tests on some RHEL 4 beta release, because the final RHEL 4 was not available yet - it was about a year ago.
Leos