public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Limiting program swap
@ 2004-12-08 19:07 Bill Davidsen
  2004-12-08 19:14 ` Marc-Christian Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bill Davidsen @ 2004-12-08 19:07 UTC (permalink / raw)
  To: linux-kernel

I have several machine of various memory sizes which suffer from really 
poor performance when doing backups. This appears to be because all the 
programs other than the backup quickly get swapped to make room for i/o 
buffers.

Is there some standard portable way to prevent this, either by reserving 
some memory for programs which will not get swapped regardless of i/o 
pressure, or alternatively limiting the total memory used for i/o 
buffers, dcache, and similar things?

I did a crude hack for 2.4.17, but if I'm missing some obvious trick I'd 
rather not do something which can't go in the mainline kernel. Anyone 
care to show me what I missed, or is this just a characteristic of Linux?

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting program swap
  2004-12-08 19:07 Limiting program swap Bill Davidsen
@ 2004-12-08 19:14 ` Marc-Christian Petersen
  2004-12-08 19:35 ` William Lee Irwin III
  2004-12-08 20:45 ` Jesper Juhl
  2 siblings, 0 replies; 5+ messages in thread
From: Marc-Christian Petersen @ 2004-12-08 19:14 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel

On Wednesday 08 December 2004 20:07, Bill Davidsen wrote:

> I did a crude hack for 2.4.17, but if I'm missing some obvious trick I'd
> rather not do something which can't go in the mainline kernel. Anyone
> care to show me what I missed, or is this just a characteristic of Linux?

Maybe you show us your hack?

ciao, Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting program swap
  2004-12-08 19:07 Limiting program swap Bill Davidsen
  2004-12-08 19:14 ` Marc-Christian Petersen
@ 2004-12-08 19:35 ` William Lee Irwin III
  2004-12-08 20:45 ` Jesper Juhl
  2 siblings, 0 replies; 5+ messages in thread
From: William Lee Irwin III @ 2004-12-08 19:35 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel

On Wed, Dec 08, 2004 at 02:07:36PM -0500, Bill Davidsen wrote:
> I have several machine of various memory sizes which suffer from really 
> poor performance when doing backups. This appears to be because all the 
> programs other than the backup quickly get swapped to make room for i/o 
> buffers.
> Is there some standard portable way to prevent this, either by reserving 
> some memory for programs which will not get swapped regardless of i/o 
> pressure, or alternatively limiting the total memory used for i/o 
> buffers, dcache, and similar things?
> I did a crude hack for 2.4.17, but if I'm missing some obvious trick I'd 
> rather not do something which can't go in the mainline kernel. Anyone 
> care to show me what I missed, or is this just a characteristic of Linux?

This appears at least superficially related to
/proc/sys/vm/vfs_cache_pressure in 2.6.x-mm (possibly also mainline)


-- wli

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting program swap
  2004-12-08 19:07 Limiting program swap Bill Davidsen
  2004-12-08 19:14 ` Marc-Christian Petersen
  2004-12-08 19:35 ` William Lee Irwin III
@ 2004-12-08 20:45 ` Jesper Juhl
  2004-12-08 23:12   ` Con Kolivas
  2 siblings, 1 reply; 5+ messages in thread
From: Jesper Juhl @ 2004-12-08 20:45 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel

Bill Davidsen wrote:
> I have several machine of various memory sizes which suffer from really 
> poor performance when doing backups. This appears to be because all the 
> programs other than the backup quickly get swapped to make room for i/o 
> buffers.
> 
> Is there some standard portable way to prevent this, either by reserving 
> some memory for programs which will not get swapped regardless of i/o 
> pressure, or alternatively limiting the total memory used for i/o 
> buffers, dcache, and similar things?
> 

I'm wondering if turning the /proc/sys/vm/swappiness knob would help, 
but I'll honestly admit that I don't know.

-- 
Jesper Juhl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limiting program swap
  2004-12-08 20:45 ` Jesper Juhl
@ 2004-12-08 23:12   ` Con Kolivas
  0 siblings, 0 replies; 5+ messages in thread
From: Con Kolivas @ 2004-12-08 23:12 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Bill Davidsen, linux-kernel

Jesper Juhl writes:

> Bill Davidsen wrote:
>> I have several machine of various memory sizes which suffer from really 
>> poor performance when doing backups. This appears to be because all the 
>> programs other than the backup quickly get swapped to make room for i/o 
>> buffers.
>> 
>> Is there some standard portable way to prevent this, either by reserving 
>> some memory for programs which will not get swapped regardless of i/o 
>> pressure, or alternatively limiting the total memory used for i/o 
>> buffers, dcache, and similar things?
>> 
> 
> I'm wondering if turning the /proc/sys/vm/swappiness knob would help, 
> but I'll honestly admit that I don't know.

No, there comes a point where the vm pressure overrides the value of 
swappiness and we start swapping. It is better in 2.6.7 and before with 
issues yet to be resolved in the latest mainline trees. My tree (-ck) has a 
slightly different tuning and a hard maplimit option for just such a reason 
but are unlikely to be of interest to the mainline maintainers so I've never 
promoted them.

Cheers,
Con


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-08 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-08 19:07 Limiting program swap Bill Davidsen
2004-12-08 19:14 ` Marc-Christian Petersen
2004-12-08 19:35 ` William Lee Irwin III
2004-12-08 20:45 ` Jesper Juhl
2004-12-08 23:12   ` Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox