Announcement

Collapse
No announcement yet.

Fedora 18 Will Stick To Using Tmpfs

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Ericg View Post
    Actually not that insane, confusing yes since theyre both named tmp but the idea works for those program who break FHS by storing large files in /tmp AND also dont respect $TMPDIR
    The fact that they are both named tmp is the thing that bothers me the least.

    The fact that you two are thinking it's a viable solution suprises me. Moving around important pieces of infrastructure, just to get a browser plugin functioning under every circumstance and to use a TMP variable that points to a tmpfs fs, is not a good idea.

    The elegance of using a seperate dedicated fs for /tmp was (for me) to enable noexec and friends, and to prevent misbehaving programs filling my root partition. This utterly fails right now because of a browser plugin -_-' dumping it's entire RTMP stream to disk...

    Comment


    • #17
      Originally posted by Rexilion View Post
      The fact that they are both named tmp is the thing that bothers me the least.

      The fact that you two are thinking it's a viable solution suprises me. Moving around important pieces of infrastructure, just to get a browser plugin functioning under every circumstance and to use a TMP variable that points to a tmpfs fs, is not a good idea.

      The elegance of using a seperate dedicated fs for /tmp was (for me) to enable noexec and friends, and to prevent misbehaving programs filling my root partition. This utterly fails right now because of a browser plugin -_-' dumping it's entire RTMP stream to disk...
      Recent version of flash don't do that anymore (at least on my pc there are no flash* files in /tmp when flash videos are running). And for larger files or files that should survive a reboot there's /var/tmp.
      Last edited by droste; 12-08-2012, 11:59 AM.

      Comment


      • #18
        Originally posted by Rexilion View Post
        The elegance of using a seperate dedicated fs for /tmp was (for me) to enable noexec and friends, and to prevent misbehaving programs filling my root partition. This utterly fails right now because of a browser plugin -_-' dumping it's entire RTMP stream to disk...
        So, the elegance of using tmpfs is to have misbehaving programs fill your entire RAM instead of your root partition? I fail to see the logic in that. Again it seems like you can't have a third option, it's either one or the other.

        Comment


        • #19
          Originally posted by droste
          Recent version of flash don't do that anymore (at least on my pc there are no flash* files in /tmp when flash videos are running). And for larger files or files that should survive a reboot there's /var/tmp.
          The files are not visible in /tmp because flash creates them and then deletes them immediatly, but keeping it's fd's open. If you do a 'lsof -p $PID' where $PID contains the process handling the flash files you will see a reference to '/tmp/Flash-<numbershere> (deleted)'. These fd's can be accessed by /proc/$PID/$FD.

          Sidenote, free size of the partition which holds /tmp shrinks.

          I use the '$PID and $FD trick' in a script so VLC can open these files on my parents computer. They start the flash app in the browser, press pause to let it buffer the video and click on a script. VLC then opens mentioning the fd and then they click on it to display the video in full screen at full quality.

          If I let Flash render the video it's choppy and skippy, since everything is apparently done on the CPU. While VLC offloads it to the GPU (nouveau!). So the computer is able to meet today's demands. However, things have turned out bad when it comes to video streaming.

          Originally posted by GreatEmerald
          So, the elegance of using tmpfs is to have misbehaving programs fill your entire RAM instead of your root partition? I fail to see the logic in that. Again it seems like you can't have a third option, it's either one or the other.
          I did not say or imply that. I said it would be an elegant solution if there were no such programs exhibiting this behaviour. And if they (mistakenly) did, the consequences would not be huge since I limit tmpfs usage to about 25% of system RAM.

          However, Flash is doing this on purpose and I cannot make it change it's behaviour unless I apply the '/tmp/tmp' trick which is IMHO not 'nice'.

          Comment


          • #20
            Originally posted by Rexilion View Post
            I use the '$PID and $FD trick' in a script so VLC can open these files on my parents computer. They start the flash app in the browser, press pause to let it buffer the video and click on a script. VLC then opens mentioning the fd and then they click on it to display the video in full screen at full quality.
            That's pretty clever. I typically don't need that when dealing with YouTube, as VLC can open its streams directly, but it's an interesting way of doing it for unsupported websites.


            Originally posted by Rexilion View Post
            However, Flash is doing this on purpose and I cannot make it change it's behaviour unless I apply the '/tmp/tmp' trick which is IMHO not 'nice'.
            Oh, so you mean that you'd rather save some disk space while sacrificing some RAM if possible, but if not, have it write to disk? But then doesn't that happen already when using tmpfs with a swap partition/file?

            And of course, the trick is not nice, but then your case is fairly isolated. There are few people with old PCs that use tmpfs and watch Flash videos. And since Flash is proprietary, not much can be done about it (unless you switch to Gnash/Lightspark).

            Comment


            • #21
              Originally posted by GreatEmerald View Post
              And since Flash is proprietary, not much can be done about it (unless you switch to Gnash/Lightspark).
              Edit the binary and replace every instance of "/tmp/" with "/flv/"?

              Comment


              • #22
                Originally posted by GreatEmerald View Post
                That's pretty clever. I typically don't need that when dealing with YouTube, as VLC can open its streams directly, but it's an interesting way of doing it for unsupported websites.
                The weird thing is: Youtube vids work smooth on this box (this is the only known exception to me), albeit on low quality.

                Originally posted by GreatEmerald View Post
                Oh, so you mean that you'd rather save some disk space while sacrificing some RAM if possible, but if not, have it write to disk? But then doesn't that happen already when using tmpfs with a swap partition/file?
                No, it's not a space issue. Compared to the previous OS that was preinstalled on this box, Ubuntu is using about 20% (probably even less) for it's OS data files.

                It's not an issue that data will (eventually) be written to disk. If I keep my tmpfs @ 25%, there is a very small chance data will be written to disk unless an OOM situation occurs. So it will only happen if some program starts eating insane amounts of RAM. When this box is booted, it uses about 125MB of RAM.

                And I don't mind if it starts swapping pages to disk. It's just undesirable since the system becames somewhat unresponsive when said situation occurs if memory runs out.

                Originally posted by GreatEmerald View Post
                And of course, the trick is not nice, but then your case is fairly isolated. There are few people with old PCs that use tmpfs and watch Flash videos. And since Flash is proprietary, not much can be done about it (unless you switch to Gnash/Lightspark).
                Using tmpfs as /tmp is not the default for Ubuntu (if I'm not mistaken), so that is a valid point.

                Aside from that, I don't agree with my usecase being isolated. If you google the bugreports of SSE2 being used in Adobe Flash player (for Linux only(!)). You will see many, many, many bugreports on Ubuntu Launchpad and on Adobe's own website (Bugbase or something?). So that implies that many people are still using old HW for this exact purpose.

                Comment


                • #23
                  Originally posted by Rexilion View Post
                  The fact that you two are thinking it's a viable solution suprises me. Moving around important pieces of infrastructure, just to get a browser plugin functioning under every circumstance and to use a TMP variable that points to a tmpfs fs, is not a good idea.
                  "moving around" is a bit of an overstatement considering any sane program doesnt hardcode /tmp/foo/bar/ it does $TMPDIR/foo/bar so it really doesnt matter where $TMPDIR resides, you could point it at a 777 folder under /home if you really wanted to do. The same goes for "viable solution" <--- overstatement. I dont think its a viable solution, its a hack plain and simple but considering we cant patch and recompile flash...our options are limited.

                  Comment


                  • #24
                    Originally posted by GreatEmerald View Post
                    But then doesn't that happen already when using tmpfs with a swap partition/file?
                    tmpfs can go to swap, so this is what happens.
                    Hence, if you have a swap partition, you can use /tmp in tmpfs with low memory. It still will be faster.

                    Comment

                    Working...
                    X