On Wed, Mar 28, 2012 at 4:48 AM, Freek de Kruijf <f.de.kruijf@gmail.com> wrote:
Wouldn't that mean that you don't need a few 100GB /tmp partition? So you trade a large /tmp partition for a large swap partition? The remaining question than is: what is more efficient?
Certainly it's far more efficient to have a 100G /tmp. When it's a partition for /tmp, it does not contend for RAM with other processes, except for write caching (which means it will still use available RAM to avoid writing to disk if possible). Not only that, but access patterns will be optimized for disk access, which will probably mean transfers around 20MB/s under a mixed load (sequential and random). When it's just swap, tmpfs will contend with other processes, possibly pushing process memory to disk far more frequently. This decreases those processes' performance, but it also results in the possibility of runaway processes: processes that require 50G of RAM will get an OOM when running without swap, but when using a 100G swap partition will get the request granted happily, and the performance drop that entails. Remember a thrashing system is usually only recoverable with a hard reset. Now, even under ideal conditions (where no process pages are swapped to disk and only tmpfs memory is swapped), the VM system is not optimized for this situation. Access patterns will most certainly be random, resulting in transfer speeds of 1MB/s or less. So... what's the best option? Ie: tmpfs is only useful for really small tmpfs partitions. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org