[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: TMPDIR - Do we also need a drive backed TPMDIR ?



On Thu, 2016-07-21 at 21:22 +0200, Gabor Gombas wrote:
> On Thu, Jul 21, 2016 at 04:06:26PM +0300, Dmitry Bogatov wrote:
> 
> > For example, I, as happy owner of 8GB RAM, is perfectly fine with 3GB
> > in /tmp, because I actually use less then 1Gb. On other hand, would I
> > start 50 instances of Firefox, Gimp and other stuff, I would object
> > putting 3GB in my /tmp, since it would make system swap.
> 
> I don't quite buy your argument. If you want to write 3GB to disk, then
> you need to write 3GB to disk - it's the same amount of data, whether
> you call it "filesystem" or "swap". But if you use a real filesystem to
> store that data, then you will also have to deal metadata, which needs
> to be protected from crashes so you want to flush caches from time to
> time, which is expensive. tmpfs does not have such requirements, so it
> should give you better performance. I guess someone should measure it...

I'm not sure the performance comparison is quite as simple as this.
Commonly used filesystems try to avoid fragmentation of files, but
AFAIK there's nothing to prevent fragmentation of tmpfs files in swap.
So reading a file back from swap can involve more seeks than doing the
same from a filesystem.

Ben.

-- 

Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: