Mailinglist Archive: opensuse-factory (715 mails)
| < Previous | Next > |
Re: [opensuse-factory] Warning / ANNOUNCE : upcoming changes in upstream systemd regarding /media, /tmp and /var/run | /var/lock
- From: Claudio Freire <klaussfreire@xxxxxxxxx>
- Date: Wed, 28 Mar 2012 11:40:19 -0300
- Message-id: <CAGTBQpb2us2uAeqnyRt5wy9QFx5sAZP3J=bbr8DEPqK9-k765g@mail.gmail.com>
On Wed, Mar 28, 2012 at 4:48 AM, Freek de Kruijf <f.de.kruijf@xxxxxxxxx> wrote:
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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx
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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx
| < Previous | Next > |