Re: Moving /tmp to tmpfs makes it useless
- To: Salvo Tomaselli <firstname.lastname@example.org>
- Cc: email@example.com
- Subject: Re: Moving /tmp to tmpfs makes it useless
- From: Goswin von Brederlow <firstname.lastname@example.org>
- Date: Fri, 01 Jun 2012 13:26:41 +0200
- Message-id: <email@example.com>
- In-reply-to: <firstname.lastname@example.org> (Salvo Tomaselli's message of "Fri, 25 May 2012 11:49:49 +0200")
- References: <CAOVenEo+CT6Ou_vHq8HvuCz1NdW0Ogq5UqxMZh-4Qkw4e01CsA@mail.gmail.com> <email@example.com> <1337938886.14895.389.camel@pi0307572> <firstname.lastname@example.org>
Salvo Tomaselli <email@example.com> writes:
>> Because paging out a couple Gigabytes is veeeeeery different from
>> writing a couple Gigabytes to disk, of course.
> Yes because writing that on disk will only block the thread performing the
> write, not every thread that tries to allocate memory.
Wrong. The thread doing the write will just write to cache and not block
at all. That is until you run out of cache. And then any thread that
needs to allocate memory will block until such a time as some dirty
memory is written.
Now with multiple cores it becomes a bit more complex since then you
have seperate queues. So only one core might block anything needing
memory on that core.
If anyone wants to experience that then write out some GB of data over
NFS. After a short while processes will hang while others keep running.