[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bdflush or others affecting disk cache



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" <maillist@jasonlim.com>
To: <debian-isp@lists.debian.org>
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
>



Reply to: