FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 06-01-2012, 11:42 AM
Goswin von Brederlow
 
Default Moving /tmp to tmpfs makes it useless

Salvo Tomaselli <tiposchi@tiscali.it> writes:

>> So what? If you write to a normal file system, it goes into the page
>> cache, which is pretty much the same as writing into tmpfs.
> tmpfs will make it stay forever in the RAM, caches are flushed to disk and
> their space can be used for new things.
> - Ted

No, tmpfs will be swapped out if you don't use a file for a while but
something else uses memory, including IO caching. The difference to a
disk based filesystem is that most disk based filesystems force the
write out after a short wait (1-60s).

MfG
Goswin



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87vcjbl0ma.fsf@frosties.localnet">http://lists.debian.org/87vcjbl0ma.fsf@frosties.localnet
 
Old 06-01-2012, 11:44 AM
Goswin von Brederlow
 
Default Moving /tmp to tmpfs makes it useless

Josselin Mouette <joss@debian.org> writes:

> Le vendredi 25 mai 2012 Ã* 16:01 +0300, Uoti Urpala a écrit :
>> There is one significant difference though. When you read data back to
>> memory from swap, the kernel does not remember that it already exists on
>> disk; when the data is evicted from memory again, it is unnecessarily
>> rewritten to disk rather than just dropped. Thus, if you do multiple
>> read iterations through a large set of data (which does not fit in
>> memory) on tmpfs, each iteration does disk read AND write rather than
>> just read.
>
> I donâ??t know enough of the kernel innards, but it sounds to me that if a
> previously swapped page hasnâ??t been modified, it should be kept on swap
> *and* memory as long as possible.
>
> If it does not, it sounds like a bug, but it would indeed lead to the
> behavior you describe for this specific usage pattern.

Linux certainly has a notion of cached swap, i.e. pages from swap that
are also unmodified in memory. As long as you have enough swap the
kernel should not reap the swapped data and know that it is already on
disk when it wants to evict the page.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87r4tzl0ik.fsf@frosties.localnet">http://lists.debian.org/87r4tzl0ik.fsf@frosties.localnet
 

Thread Tools




All times are GMT. The time now is 12:33 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org