Rsync Memory Issues - Kernel 2.4.18 - Box Hangs
jw at pegasys.ws
Wed Jul 10 16:40:02 EST 2002
On Wed, Jul 10, 2002 at 01:50:00PM -0700, Rick Parada wrote:
> Im running a Dell 6450 w/ 4GB of memory, 2 2GB Swap Partitions. Redhat 7.3
> kernel 2.4.18 (kernel.org). It runs our images for our site. We use rsync to
> sync images from a main image box. It runs fine for maybe 4 days untill all
> memory is in cache, and like 7MB of physical memory is free. The box will
> hardly do anything, and cache will just keep going up and up untill no more
> memory is free. Then when I run rsync (a memory hog) at night, kswapd and
> rsync will compete with each other and send the cpu load through the roof.
> Funny thing is the box won't really use swap at all. Then while the box is
> rsyncing I cant even do simple things like SSH to the box. Why did older
> kernels (2.2 kernels) work a whole lot better. Did older kernels swap a lot
> better? Is there anything I can adjust in 2.4.18. Can I flush cache out
> manually some how to return that memory back for use, for applications like
> rsync. If I could do that my problems would be solved, since rsync runs
> great with 1 GB of memory free. ANY HELP Would be much appreciative.
> total used free shared buffers cached
> Mem: 3997300 3918388 78912 0 472364 3056796
> -/+ buffers/cache: 389228 3608072
> Swap: 4192880 2460 4190420
You aren't out of memory. And it probably isn't kswapd but
bounce buffering that is killing you. I'd bet that if you
downgraded to 2GB you'd get snappier response, at least
after 4 days. 4GB is fine as long as you aren't doing lots of io.
The fact that it takes 4 days to get to this state, and that
you aren't paging says to me that you really aren't using
your 4GB except for pagecache.
As for the 2.2 - 2.4 comparison. These are completely
different beasts. 2.4 has major MM changes that are still
.From what i can tell the fix is to either upgrade your
kernel and turn on CONFIG_HIGHIO or only run with 2GB
memory. I don't use RH but it is possible that the HIGHIO
patch may have been applied already and you can turn it on.
Extracted from linux-kernel:
> Subject: Re: Terrible VM in 2.4.11+?
> Date: Wed, 10 Jul 2002 10:49:04 +0200
> From: Jens Axboe <axboe at suse.de>
> Cc: linux-kernel at vger.kernel.org,
> Status: RO
> On Wed, Jul 10 2002, Thomas Tonino wrote:
> > I run a 2 cpu server with 16 disks and around 5
> > megabytes of writes a second. With plain 2.4.18 (using
> > the feral.com qlogic driver) and 2GB ram, this seemed
> > okay. Upgrading to 4GB ram slowed the system down, and
> > normal shell commands became quite unresponsive with
> > 4GB.
> > So we built a second server, with 2.4.19-pre9-aa2 using
> > the qlogic driver in the kernel. That driver needs
> > patching, as it will otherwise get stuck in a 'no handle
> > slots' condition. Used a patch that I posted to
> > linux-scsi a while ago.
> That's probably not just a mm issue, if you use stock
> 2.4.18 with 4GB ram you will spend oodles of time bounce
> buffering i/o. 2.4.19-pre9-aa2 includes the block-highmem
> stuff, which enables direct-to-highmem i/o, if you enabled
> the CONFIG_HIGHIO option.
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync