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 > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 05-17-2011, 07:48 PM
Nirbheek Chauhan
 
Default rfc: use of the /run directory

On Wed, May 18, 2011 at 12:50 AM, Panagiotis Christopoulos
<pchrist@gentoo.org> wrote:
> On 23:58 Tue 17 May * * , Nirbheek Chauhan wrote:
>> ...
>> I'd add that if we want /run to be on tmpfs, /var/run and /tmp should
>> both be on tmpfs by default. I've been doing this manually for a year,
>> and so have other distributions.
>>
>
> Hi,
>
> A quick look at the size of my desktop's /tmp is:
>
> spirit@Vereniki ~ $ du -sh /tmp/
> 641M * */tmp/
> spirit@Vereniki ~ $
>
> Maybe it's just me (cause of the way I'm using /tmp, eg. I use that dir
> to unpack sources of packages I want to temporarily look inside and
> for anything else *temporary*, also some programs (eg. browsers) use it
> for temporary storage) but if there are others like me, I don't
> think we'd like to do this in RAM space (tmpfs). For /run and /var/run
> dirs it's ok I suppose.
>

Maybe you should use /var/tmp for that? Or ~/tmp/ ?

OTOH, we could use an rc.conf configuration variable to control
whether /tmp is mounted as tmpfs.

--
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team
 
Old 05-17-2011, 08:00 PM
Olivier Crte
 
Default rfc: use of the /run directory

On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>
> OTOH, we could use an rc.conf configuration variable to control
> whether /tmp is mounted as tmpfs.

Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
think we should facilitate it in any way.

--
Olivier Crte
tester@gentoo.org
Gentoo Developer
 
Old 05-17-2011, 08:07 PM
Michał Górny
 
Default rfc: use of the /run directory

On Tue, 17 May 2011 16:00:41 -0400
Olivier Crête <tester@gentoo.org> wrote:

> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> > Maybe you should use /var/tmp for that? Or ~/tmp/ ?
> >
> > OTOH, we could use an rc.conf configuration variable to control
> > whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I
> don't think we should facilitate it in any way.

I always thought we're having two separate temporary directories
because /tmp is for small data (i.e. suitable for tmpfs) while /var/tmp
is for larger one.

--
Best regards,
Michał Górny
 
Old 05-17-2011, 08:11 PM
Amadeusz Żołnowski
 
Default rfc: use of the /run directory

Excerpts from Olivier Crête's message of Tue May 17 22:00:41 +0200 2011:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
> > Maybe you should use /var/tmp for that? Or ~/tmp/ ?
> >
> > OTOH, we could use an rc.conf configuration variable to control
> > whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I
> don't think we should facilitate it in any way.

I think he just meant that /var/tmp should be used for bigger temporary
stuff. This how I use it. /tmp for tiny temporary stuff and /var/tmp/
for bigger which would be good to have preserved between reboots. And
this is somehow correct with FHS afaik.


--
Amadeusz Żołnowski

PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5
 
Old 05-17-2011, 08:20 PM
Panagiotis Christopoulos
 
Default rfc: use of the /run directory

On 01:18 Wed 18 May , Nirbheek Chauhan wrote:
> ...
> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>
Yes, I can do that. But the real question here, from my perspective, is
why we need /run, /var/run or /tmp on tmpfs. "Other distros do it" is
not an answer. Yes, I needed those dirs on tmpfs twice in my life, once
when I was building a cluster with diskless nodes (with / on readonly
NFS) and once more when I was working with an "LTSP" alike system,
but these were exceptions, at that time.
As I don't have the knowledge for this and I currently don't have the
time to google/search it myself, can someone explain why other linux
distibutions / Unix systems (wikipedia says that Solaris had /tmp on
tmpfs from 1994) started putting directories on tmpfs and technically
speaking what an average user would benefit from having /run, /tmp etc.
directories on tmpfs?

--
Panagiotis Christopoulos ( pchrist )
( Gentoo Lisp Project )
 
Old 05-17-2011, 08:23 PM
Rich Freeman
 
Default rfc: use of the /run directory

2011/5/17 Olivier Crte <tester@gentoo.org>:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
>> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>>
>> OTOH, we could use an rc.conf configuration variable to control
>> whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
> think we should facilitate it in any way.

I've run my system this way for ages - even back when I had 2GB of RAM
running kde, samba, mythtv, mysql, and apache. Usually not a problem.
Unfortunately the kernel swapping logic isn't perfect, which can
cause it to bog down if you're compiling something like chromium or
openoffice.

When you think about it tmpfs on swap should be no slower than ext3.
If anything it should be faster since it doesn't need to journal. In
practice it doesn't always work this way, but I'd consider this a bug.
With a filesystem, anything you write ends up on disk within 30
seconds or whatever. With a tmpfs, some of the stuff you write ends
up on disk, and the kernel has more freedom with how it goes about
doing this.

Then problem comes when the kernel decides to swap out mysql or
whatever in order to hang onto some pages full of .so files or
whatever from your latest build.

Rich
 
Old 05-17-2011, 08:28 PM
Michał Górny
 
Default rfc: use of the /run directory

On Tue, 17 May 2011 23:20:59 +0300
Panagiotis Christopoulos <pchrist@gentoo.org> wrote:

> As I don't have the knowledge for this and I currently don't have the
> time to google/search it myself, can someone explain why other linux
> distibutions / Unix systems (wikipedia says that Solaris had /tmp on
> tmpfs from 1994) started putting directories on tmpfs and technically
> speaking what an average user would benefit from having /run, /tmp
> etc. directories on tmpfs?

For me, the most important advantage is that files get removed whenever
the system crashes for some reason. It's just simpler (and more error
prone) to have them gone automagically than to add services to remove
all of them on each boot.

--
Best regards,
Michał Górny
 
Old 05-17-2011, 08:35 PM
James Cloos
 
Default rfc: use of the /run directory

>>>>> "WH" == William Hubbs <williamh@gentoo.org> writes:

WH> Once /run is in place,

WH> /var/run will be a symbolic link to /run and /var/lock will
WH> be a symbolic link to /run/lock.

There are files which need to be in /var/lock and which should
survive a reboot, so it is not a good idea to make /var/lock
a symlink to /run/lock.

(And I don't just mean .keep files.)

-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
 
Old 05-17-2011, 08:40 PM
Markos Chandras
 
Default rfc: use of the /run directory

On Tue, May 17, 2011 at 04:35:00PM -0400, James Cloos wrote:
> >>>>> "WH" == William Hubbs <williamh@gentoo.org> writes:
>
> WH> Once /run is in place,
>
> WH> /var/run will be a symbolic link to /run and /var/lock will
> WH> be a symbolic link to /run/lock.
>
> There are files which need to be in /var/lock and which should
> survive a reboot, so it is not a good idea to make /var/lock
> a symlink to /run/lock.
>
> (And I don't just mean .keep files.)
>
> -JimC
> --
> James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
>
James,

Can you please provide some examples that require /var/lock to survive a
reboot?

Regards,
--
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
 
Old 05-17-2011, 08:54 PM
Olivier Crte
 
Default rfc: use of the /run directory

On Tue, 2011-05-17 at 23:20 +0300, Panagiotis Christopoulos wrote:
> Yes, I can do that. But the real question here, from my perspective, is
> why we need /run, /var/run or /tmp on tmpfs. "Other distros do it" is
> not an answer.

The main reason is that you want /run to be writable super early in the
boot process, before even / has been fscked and re-mounted. That means
you can do stuff like starting udevd in parallel with fsck of / which
means faster boot. This is one of the things required to get 1 second
boot.

See http://lwn.net/Articles/436012/

--
Olivier Crte
tester@gentoo.org
Gentoo Developer
 

Thread Tools




All times are GMT. The time now is 01:34 AM.

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