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 User

 
 
LinkBack Thread Tools
 
Old 04-04-2012, 09:35 AM
Roger Leigh
 
Default how to increase space for tmpfs /tmp

On Wed, Apr 04, 2012 at 12:14:43PM +0300, Andrei POPESCU wrote:
> On Mi, 04 apr 12, 09:38:44, Roger Leigh wrote:
> >
> > It would normally be cleaned on boot anyway, so I think we can
> > avoid putting this in the Release Notes if we clean it automatically.
>
> Isn't this dangerous? (It's unclear to me if /tmp is cleaned in squeeze
> by default or not)

It is, along with /var/run and /var/lock. See
/etc/init.d/mountall-bootclean.sh and /lib/init/bootclean.sh.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120404093512.GA30121@codelibre.net">http://lists.debian.org/20120404093512.GA30121@codelibre.net
 
Old 04-04-2012, 06:33 PM
Martin Steigerwald
 
Default how to increase space for tmpfs /tmp

Am Donnerstag, 29. März 2012 schrieb Javier Vasquez:
> So yes, one needs to be careful, not to oversize your tmpfs. That's
> completely true, but the limit is not physical RAM, it is actually
> RAM+Swap, as I mentioned before.
>
> On this thread, it is asked about how to got with huge files to be
> handled by tmpfs, well, debian still gives the option to set /tmp as a
> regular partition for example, but if you also have enough swap space,
> then by setting the right tmpfs size, you can still get away with it
> through tmpfs. Actually in this case I suggested 2g or even 3g for
> tmpfs, which was discarded because it sounded dangerous at first by
> looking only at RAM, and not considering at all the available swap,
> which in my mind and experience is a mistake.

Only thing with this could be that swapping in my observation has a quite
high I/O priority. When I have my students in my Linux performance
analysis & tuning trainings test to allocate lots of memory, more than
physical RAM the Linux machine responds quite jerky and I get much higher
latencies.

Thus when I access something from a tmpfs that it is swap I might have
higher latency for my usual workloads. And it might even be faster to just
read it from disk. But then everything from the tmpfs that is in physical
RAM is accessed way faster as from disk as well. I.e. I let the kernel
decide and autotune for my workload.

IMHO it might be better to size / use tmpfs in a way that only uses swap
rarely or seldom. But your mileage may vary.

Or it might be wise to reduce the priority of swapping for tmpfs
filesystem, but I am not sure whether that would be feasible to implement
to the kernel.

--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201204042033.44628.Martin@lichtvoll.de">http://lists.debian.org/201204042033.44628.Martin@lichtvoll.de
 
Old 04-04-2012, 06:36 PM
Martin Steigerwald
 
Default how to increase space for tmpfs /tmp

Am Dienstag, 3. April 2012 schrieb Roger Leigh:
> On Tue, Apr 03, 2012 at 11:16:08AM +0200, Vincent Lefevre wrote:
> > On 2012-03-24 11:00:49 -0600, Javier Vasquez wrote:
> > > You can always configure as you wish. Take a look at:
> > >
> > > /etc/default/tmpfs
> >
> > The file says:
> >
> > # NOTE: This file is deprecated. Please see rcS(5) for details on
> > how # to configure tmpfs size limits.
>
> It's still perfectly fine to use this file. The only reason
> it's deprecated is that there's now a better way to define
> limits (just add an entry to /etc/fstab like for any other
> filesystem). But if you want to use it, feel free. As and
> when it is obsoleted, we'll automatically create fstab
> entries for you (should we decide to do that). The advantage
> of the fstab method is that it's compatible with all other
> init systems.

Hehe, I added a fstab entry for /tmp as I switched to systemd.

systemd: doesn´t respect RAMTMP=yes in /etc/default/rcS
http://bugs.debian.org/666182

Ciao,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201204042036.24121.Martin@lichtvoll.de">http://lists.debian.org/201204042036.24121.Martin@lichtvoll.de
 
Old 04-04-2012, 06:38 PM
Martin Steigerwald
 
Default how to increase space for tmpfs /tmp

Am Dienstag, 3. April 2012 schrieb Roger Leigh:
> On Sat, Mar 24, 2012 at 06:00:23PM -0300, Henrique de Moraes Holschuh
wrote:
> > On Sat, 24 Mar 2012, Joey Hess wrote:
> > > Edit /etc/default/rcS, set RAMTMP=no, reboot. Or, set TMPDIR to
> > > point to something like $HOME/tmp
> >
> > You don't need to reboot because of the size change.
> >
> > "mount -o remount,size=<desired size> /tmp" works, at least for
> > increasing size. One of the good things of a tmpfs is that you can
> > resize it dynamically.
> >
> > > You may also consider filing a bug, since the more people report
> > > problems with Debian's new, absurdly small /tmp, the more likely it
> > > is to get fixed.
> >
> > Hmm, yes, it can certaily be raised by popular demand. But what
> > would probably help more is a set of profiles of /tmp sizes based on
> > the amount of system ram to provide the initial default size.
>
> I noticed yesterday that Fedora is planning to go for using
> tmpfs on /tmp as well.
>
> http://www.phoronix.com/scan.php?page=news_item&px=MTA4MTg
>
> http://fedoraproject.org/wiki/Features/tmp-on-tmpfs
>
> Note that the latter has useful advice and notes in the Q&A
> section which does pertain to the problems discussed in this
> thread. It's clear that some of the problems will be fixed
> as they are additionally found in Fedora, particularly WRT
> the storage of large files on /tmp. It also notes that a
> number of other distributions are also picking this up as
> well, e.g. Ubuntu and Arch, so we are by no means alone in
> implementing this.

I like the notion to just use /var/tmp for anything big by default. Of
course this means changing applications like for example K3b, which uses
/tmp for temporary images by default. At least it does here.

--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201204042038.42961.Martin@lichtvoll.de">http://lists.debian.org/201204042038.42961.Martin@lichtvoll.de
 
Old 04-05-2012, 12:15 AM
Scott Ferguson
 
Default how to increase space for tmpfs /tmp

On 05/04/12 04:38, Martin Steigerwald wrote:
> Am Dienstag, 3. April 2012 schrieb Roger Leigh:
>> On Sat, Mar 24, 2012 at 06:00:23PM -0300, Henrique de Moraes Holschuh
> wrote:
>>> On Sat, 24 Mar 2012, Joey Hess wrote:
>>>> Edit /etc/default/rcS, set RAMTMP=no, reboot. Or, set TMPDIR to
>>>> point to something like $HOME/tmp
>>>
>>> You don't need to reboot because of the size change.
>>>
>>> "mount -o remount,size=<desired size> /tmp" works, at least for
>>> increasing size. One of the good things of a tmpfs is that you can
>>> resize it dynamically.
>>>
>>>> You may also consider filing a bug, since the more people report
>>>> problems with Debian's new, absurdly small /tmp, the more likely it
>>>> is to get fixed.
>>>
>>> Hmm, yes, it can certaily be raised by popular demand. But what
>>> would probably help more is a set of profiles of /tmp sizes based on
>>> the amount of system ram to provide the initial default size.
>>
>> I noticed yesterday that Fedora is planning to go for using
>> tmpfs on /tmp as well.
>>
>> http://www.phoronix.com/scan.php?page=news_item&px=MTA4MTg
>>
>> http://fedoraproject.org/wiki/Features/tmp-on-tmpfs
>>
>> Note that the latter has useful advice and notes in the Q&A
>> section which does pertain to the problems discussed in this
>> thread. It's clear that some of the problems will be fixed
>> as they are additionally found in Fedora, particularly WRT
>> the storage of large files on /tmp. It also notes that a
>> number of other distributions are also picking this up as
>> well, e.g. Ubuntu and Arch, so we are by no means alone in
>> implementing this.
>
> I like the notion to just use /var/tmp for anything big by default.

Doesn't that require manually deleting files when they're no longer
required?

> Of course this means changing applications like for example K3b, which uses
> /tmp for temporary images by default. At least it does here.
>
Likewise on Squeeze. /tmp/kde-$user
Easily changed:-
K3B (2.0.1) => Settings => Configure K3b.... => Miscellaneous settings



Kind regards

--
Iceweasel/Firefox/Chrome/Chromium/Iceape/IE extensions for finding
answers to questions about Debian:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F7CE434.7010104@gmail.com">http://lists.debian.org/4F7CE434.7010104@gmail.com
 
Old 04-05-2012, 01:41 AM
Bob Proulx
 
Default how to increase space for tmpfs /tmp

Scott Ferguson wrote:
> Martin Steigerwald wrote:
> > I like the notion to just use /var/tmp for anything big by default.
>
> Doesn't that require manually deleting files when they're no longer
> required?

Of course that is no different from /tmp which is the same until
rebooted and I only reboot for kernel security upgrades. In between
those reboots it is no different and a system can go for a long time
without rebooting.

I always set up automated tmp cleaners on /tmp and /var/tmp.

Bob
 
Old 04-05-2012, 03:22 AM
Scott Ferguson
 
Default how to increase space for tmpfs /tmp

On 05/04/12 11:41, Bob Proulx wrote:
> Scott Ferguson wrote:
>> Martin Steigerwald wrote:
>>> I like the notion to just use /var/tmp for anything big by default.
>>
>> Doesn't that require manually deleting files when they're no longer
>> required?
>
> Of course that is no different from /tmp which is the same until
> rebooted and I only reboot for kernel security upgrades. In between
> those reboots it is no different and a system can go for a long time
> without rebooting.

So, um, do that mean yes?

>
> I always set up automated tmp cleaners on /tmp and /var/tmp.

Good to know. Almost as useful as actually saying what or how ;-p

>
> Bob


Kind regards

--
Iceweasel/Firefox/Chrome/Chromium/Iceape/IE extensions for finding
answers to questions about Debian:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F7D0FFA.5070304@gmail.com">http://lists.debian.org/4F7D0FFA.5070304@gmail.com
 
Old 04-05-2012, 07:39 PM
Bob Proulx
 
Default how to increase space for tmpfs /tmp

Scott Ferguson wrote:
> Bob Proulx wrote:
> > Scott Ferguson wrote:
> >> Martin Steigerwald wrote:
> >>> I like the notion to just use /var/tmp for anything big by default.
> >>
> >> Doesn't that require manually deleting files when they're no longer
> >> required?
> >
> > Of course that is no different from /tmp which is the same until
> > rebooted and I only reboot for kernel security upgrades. In between
> > those reboots it is no different and a system can go for a long time
> > without rebooting.
>
> So, um, do that mean yes?

Yes. That means yes that I always set up a tmp cleaner for both /tmp
and /var/tmp. (But that is me. I don't know what Martin does.)

> > I always set up automated tmp cleaners on /tmp and /var/tmp.
>
> Good to know. Almost as useful as actually saying what or how ;-p

I intentionally avoided saying details because you would not believe
how contentious the topic of tmp cleaners really happens to be! If it
seems like a simple topic that is the first clue that it probably
isn't. It is a minefield. I put it firmly into the topic area of
"where angels fear to tread". I know better than to walk there. But
having stepped into it I was already planning the strategy of my
retreat so that I could escape with life and limb intact.

As long as the details are ambiguous then there isn't any surface for
the maligners to attack. There is the presumption of innocence. Or
in this case the presumption of absolute correctness. And yet it is
an area that may be impossible to be absolutely correct. If you study
it in enough detail you may come to the conclusion that it isn't ever
safe to delete any file. You can only add disk space endlessly and
never ever delete anything. For those who come to that conclusion,
sorry, it isn't going to happen.

If you study the problem in enough detail you may conclude that the
only time to delete files is during system boot time. That is
certainly a safe time. The state of the system is known and
controlled. But does that mean that you would schedule a daily reboot
simply to be able to delete files? That would create an unreasonable
situation too. And then we have the problems of absolute correctness
for shutdown and bootup. For those that come to that conclusion that
reboots are required to delete files, sorry, it isn't going to happen.

And so being pragmatic I do set up tmp cleaners. Many things about
life are compromises. The maligners will attack me and call me a bad
person for doing so. I have walked through the fire on that one
before. And yet those attacks against tmp cleaners are impossible to
trigger on my machines. That won't prevent the maligners from trying.
They will construct various situations where the vulnerability exists
and will talk about those cases. That is all very good but those
cases are not my case and they don't apply. If the problem cases do
not apply to you either then there shouldn't be any problem for you to
set up a tmp cleaner either. But that is for you to decide.

To set up a simple tmpcleaner sufficient on your own personal use
simply install the Debian tmpreaper package and then edit the
/etc/tmpreaper.conf file TMPREAPER_DIRS='/tmp/. /var/tmp/.' to add
/var/tmp to the list of directories that it will clean. You would
turn the warning statement there off too.

To start getting up to speed on the issues with tmp cleaners read the
/usr/share/doc/tmpreaper/README.security.gz file that comes with
tmpreaper. Then browse the bug reports for that package:

http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=tmpreaper;dist=unstable

Then read through these references about temporary files:

http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html

http://lcamtuf.coredump.cx/tmp_paper.txt

Additionally reading through various mktemp design notes about how to
create temporary files securely would be useful background on the
other side of things too.

If I didn't scare everyone just a little bit with this then I didn't
write it well enough. There isn't any way to win on this issue.

Bob
 
Old 04-08-2012, 09:55 AM
Jörg-Volker Peetz
 
Default how to increase space for tmpfs /tmp

May I suggest the following command in order to see where files may be hidden?

du -hx --max-depth=1 / | sort -h

It may take a longer time to complete. It only examines the root partition.
It should also show hidden disk usage in case something is mounted on a
directory with files in it.
The command can also be used for mounted partitions, e.g.,

du -hx --max-depth=1 /home | sort -h

On my system the first command shows among other directories

...
4.0K /home
...

and the second command

16K /home/lost+found
...
41G /home

--
Best regards,
Jörg-Volker.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jlrnbe$cmv$1@dough.gmane.org">http://lists.debian.org/jlrnbe$cmv$1@dough.gmane.org
 

Thread Tools




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

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