Re: Moving /tmp to tmpfs makes it useless
- To: Salvo Tomaselli <email@example.com>
- Cc: firstname.lastname@example.org
- Subject: Re: Moving /tmp to tmpfs makes it useless
- From: Goswin von Brederlow <email@example.com>
- Date: Fri, 01 Jun 2012 13:26:41 +0200
- Message-id: <firstname.lastname@example.org>
- In-reply-to: <email@example.com> (Salvo Tomaselli's message of "Fri, 25 May 2012 11:49:49 +0200")
- References: <CAOVenEo+CT6Ou_vHq8HvuCz1NdW0Ogq5UqxMZh-4Qkw4e01CsA@mail.gmail.com> <firstname.lastname@example.org> <1337938886.14895.389.camel@pi0307572> <email@example.com>
Salvo Tomaselli <firstname.lastname@example.org> 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.