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

Re: Moving /tmp to tmpfs makes it useful

Carlos Alberto Lopez Perez <clopez@igalia.com> writes:
> On 26/05/12 19:43, Russ Allbery wrote:
>> Carlos Alberto Lopez Perez <clopez@igalia.com> writes:

>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666096

>> That bug contains little actual information, not even what software was
>> being used.

> Ok... so you want a prove?

I want the bug report to actually be useful, yes.  :)  It's always good to
have a reproducible test case.

> * Open with iceweasel http://vimeo.com/13726978
> * Ensure that is playing with flashplayer (right click on the movie
> should show the typical dialog that includes "about flashplayer"
> * Now launch:
>   watch df -h /tmp/
> * And see how the space used grows.

> *Important*: use "df -h /tmp" NOT "du -hs /tmp", since the flash player
> deletes the file entry from /tmp as soon as it gets the inode allocated.
> I believe this a measure to "prevent" piracy (people ripping the video
> from /tmp)

> See:

> ls -l /proc/$(ps aux|grep libf[l]ashplayer.so|awk '{print $2}')/fd

> And see how there is an entry pointing to /tmp/FlashXXXXXX that appears
> as deleted but you can still access it. Just open /proc/pid/fd/number
> with vlc for example

Thank you!  Those instructions are very good.  I'm copying them to the bug
report so that the bug report contains clear information.

When I did this (on a laptop with 2GB of memory and 2.5GB of swap and a
405MB tmpfs /tmp), the movie exhausted all space in /tmp.  It then kept
playing without any trouble, and the system never started swapping or had
any other performance issues.  However, /tmp was completely full, and
creating any other files in /tmp resulted in errors (which I know can
cause all sorts of problems for other programs that assume they can always
create small files in /tmp).

I didn't continue to play the movie through to the end, so I don't know if
the movie playback would encounter problems at the point at which the
buffered movie exhausted /tmp or if the Flash player would have coped by
windowing the streaming.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: