I'm going to have to disagree with the above poster. This VM behavior is not ideal and is really counter-productive. 2.4.x saw lot's of VM work to improve performance over broad ranges of work-load. The problems occur when changes are made for corner-cases and some more mainstream workloads suffer.
anyway, not to belabor the point here, but 2.4 has seen almost constant improvement in VM (and scheduler as well). I didn't see performance improve to acceptable levels until about 2.4.23/24. You will want to upgrade your kernel to the latest (2.4.26 as I write this) and you should see a vast improvement in VM behavior. on your question of running w/o swap space I will answer: NOT ON YOUR LIFE! you should *never* run any kind of server w/o swap unless you don't mind processes randomly dying because OOM killer decides they should go for the sake of the system... so, for the sake of your sanity (and the security of your system) upgrade to 2.4.26 and re-enable swap! good luck, Dave On Mon, Apr 19, 2004 at 08:27:35PM +0800 or thereabouts, Jason Lim wrote: > Followup: interesting results. > > I've now tried removing the swap altogther (swapoff) and the server > appears to be running much smoother and faster. > > Here is the new top info: > > 212 processes: 210 sleeping, 2 running, 0 zombie, 0 stopped > CPU states: 8.4% user, 32.2% system, 0.9% nice, 58.2% idle > Mem: 1027212K av, 1015440K used, 11772K free, 0K shrd, 186196K > buff > Swap: 0K av, 0K used, 0K free 370588K > cached > > by the way, most of the processes are httpd and mysql (this is a hosting > server). > > I'm somewhat concerned about having no swap though... any side-effects of > running with no swap? As expected, most of the swapped data reverted to > RAM by reducing the cache size (by approximately the amount that was used > by swap). > > Hope someone can shed some light on this. I'm looking at the results, but > can't understand why it is swapping so aggressively... to the point that > it is running itself out of RAM for active programs to increase cache > size. > > Jas > > ----- Original Message ----- > From: "Jason Lim" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, 19 April, 2004 7:31 AM > Subject: bdflush or others affecting disk cache > > > > Hi all, > > > > I've been banging my head on this one for a while now on a 2.4.20 > system. > > Here is the output of top: > > > > Mem: 1027212K av, 1018600K used, 8612K free, 0K shrd, 70728K > > buff > > Swap: 2097136K av, 35556K used, 2061580K free 690140K > > cached > > > > > > and the output of free: > > > > total used free shared buffers > cached > > Mem: 1027212 1016256 10956 0 71528 > 683956 > > -/+ buffers/cache: 260772 766440 > > Swap: 2097136 34692 2062444 > > > > > > The problem is that swap usage can grow to 100Mb... yet the buffers and > > cache remain at astoundingly high levels. > > > > I can actually see memory to cache and buffers increasing and at the > same > > time see it increasing swap usage! > > > > What I don't get is why the system... with about 700Mb in cache and 70Mb > > in buffers, is using swap space at all. > > > > I've searched high and low on Google... using phrases like "linux kernel > > proc cache", buffers, bdflush, etc. but I still can't explain this. > > > > Wouldn't it be far, FAR faster for the system to reduce the cache by > about > > 100Mb or so instead of swapping that 100Mb to disk? And note that the > swap > > usage is constantly fluctuating, so you can see the performance problem > > this is causing. Any ideas?! > > > > Thanks in advance. > > > > Jas > > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- ******************************* David Wilk System Administrator Community Internet Access, Inc. [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]