Limiting program swap
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?
Signature · 3 lines
-bill davidsen ([email protected]) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Quoted 3 lines · Bill Davidsen
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
Quoted 11 lines · Bill Davidsen
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
Quoted 4 lines · Bill Davidsen
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.
Signature · 1 line
Jesper Juhl
Quoted 7 lines · Jesper Juhl
Quoted 4 lines · Bill Davidsen
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/swappinessknob 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