Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Moving tmp to RAM - Performance Increase

  1. #1
    Join Date
    Jul 2007
    Beans
    168
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Moving tmp to RAM - Performance Increase

    Hello!

    I've found this page:
    http://linux.aldeby.org/speed-up-you...inux-boot.html

    I've followed several suggestions on my system and overall performance is better.

    My question is related to the following:
    OPTIMIZATIONS NOT RELATED TO STARTUP

    Move your temporary files /tmp folder to your RAM if you have loads of memory. This will also provide you greater privacy. Edit /etc/fstab and add the following line to it

    tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
    Is this not normally implemented since some users don't have a lot of RAM?

    Also, would it make that much difference if the system didn't have a lot of RAM to work with?

    God bless,
    Johnathan
    Most of us do and say dumb things, think before you act. If you do plan on going the dumb route, please be sure to have the cameras rolling... you can at least give the rest of us a good laugh.

  2. #2
    Join Date
    Dec 2009
    Location
    CT, USA
    Beans
    511
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Moving tmp to RAM - Performance Increase

    Quote Originally Posted by johnathanamber View Post
    Hello!
    My question is related to the following:


    Is this not normally implemented since some users don't have a lot of RAM?

    Also, would it make that much difference if the system didn't have a lot of RAM to work with?

    God bless,
    Johnathan
    I'm sure that it is not implemented because Ubuntu tries to keep memory to the minimum. To answer your second question, if you don't have that much RAM, then it will take some kind of toll on other programs that are using the RAM.

    I have at least 1GB that is almost never in use, so I'm going to try this now.
    ASUS M4A785TD-V EVO//AMD Athlon II X4 635 @ 3.6ghz//Crucial BallistiX 4GB @ 1700mhz//PNY Quadro NVS 290//RAID 0/5
    If you want stuff done right, do it yourself.

  3. #3
    Join Date
    Jul 2007
    Beans
    168
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Moving tmp to RAM - Performance Increase

    I've got 3GB so I do not see that it would hurt my system but make it overall more enjoyable.

    I've also been wondering about Gnome and other lighter weight desktop environments. But I am also concerned about compatibility with a majority of packages are made for KDE or Gnome. I was looking at LXDM.

    Would everything working fine if you installed both Gnome and LXDM? Meaning would I still be able to use Gnome apps while using LXDM or another lighter Desktop manager?

    I'm also working on scripts to make a minimal install... so the least amount of packages needed to do what I need is best.

    Thank you and God bless,
    Johnathan
    Most of us do and say dumb things, think before you act. If you do plan on going the dumb route, please be sure to have the cameras rolling... you can at least give the rest of us a good laugh.

  4. #4
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Moving tmp to RAM - Performance Increase

    Have you seen http://ubuntuforums.org/showthread.php?t=1525322 which talks about a distro with this enabled by default, Samiux

    I keep thinking I might try it on my 10.04, but it's running so well that I just don't want to mess anything up, though I see no reason why it should not be reversible.

  5. #5
    Join Date
    Jul 2007
    Beans
    168
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Moving tmp to RAM - Performance Increase

    Since it is a simply /etc/fstab edit... you can use nano or vi to make the change if for some reason it died during boot. If nothing else... use the Ubuntu LiveCD.

    Still would like to know more about the different Desktop environments etc.
    Most of us do and say dumb things, think before you act. If you do plan on going the dumb route, please be sure to have the cameras rolling... you can at least give the rest of us a good laugh.

  6. #6
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Moving tmp to RAM - Performance Increase

    Quote Originally Posted by johnathanamber View Post
    I've got 3GB so I do not see that it would hurt my system but make it overall more enjoyable.
    The only potential problem I have seen with doing this (mounting tmp in RAM) is if you are doing something that is /tmp intensive.

    Burning CD or in your case DVD comes to mind.

    So long as you do not need that much /tmp space you should be fine.

    Here are some potential suggestions, they seem to help

    http://blog.bodhizazen.net/linux/netbook-optimization/

    Edit : FYI much of that advice, as indicated on the page, is out of date. I suggest you look for more recent information.
    Last edited by bodhi.zazen; July 15th, 2010 at 09:05 PM.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  7. #7
    Join Date
    Jul 2007
    Beans
    168
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Moving tmp to RAM - Performance Increase

    Another question... if you can use Gnome apps while on another Desktop Manager... what are the minimal packages needed?

    Would this simply work:
    sudo apt-get install gnome
    Most of us do and say dumb things, think before you act. If you do plan on going the dumb route, please be sure to have the cameras rolling... you can at least give the rest of us a good laugh.

  8. #8
    Join Date
    Jul 2007
    Beans
    168
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Moving tmp to RAM - Performance Increase

    Quote Originally Posted by bodhi.zazen View Post
    The only potential problem I have seen with doing this (mounting tmp in RAM) is if you are doing something that is /tmp intensive.

    Burning CD or in your case DVD comes to mind.

    So long as you do not need that much /tmp space you should be fine.

    Here are some potential suggestions, they seem to help

    http://blog.bodhizazen.net/linux/netbook-optimization/
    Ah, I didn't think about that... if your tmp is stuck in memory, then you are limited to the amount of RAM as to whatever you are doing. For instance if you are making a copy of a 4.7 GB DVD, but only have 3 GB, I assume it would never finish due to the RAM being full etc. Wonder if it gets full would it simply start to remove more info in RAM to accomplish the job?

    If it did I would not see a problem even if you had less than 4.7 GB of RAM copying that DVD.
    Most of us do and say dumb things, think before you act. If you do plan on going the dumb route, please be sure to have the cameras rolling... you can at least give the rest of us a good laugh.

  9. #9
    Join Date
    Jan 2010
    Beans
    500

    Re: Moving tmp to RAM - Performance Increase

    tmpfs can also swap out to swap space. If you make your swap space larger, then what tmpfs gives you is basically a filesystem that starts in RAM and can move to disk, as opposed to regular filesystems that start on disk and get cached in RAM. I've you have an overkill of RAM, like my 16GB machines, in many cases everything can be cached and the system can run like it were all tmpfs not using swap.

  10. #10
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Moving tmp to RAM - Performance Increase

    Quote Originally Posted by johnathanamber View Post
    Hello!

    I've found this page:
    http://linux.aldeby.org/speed-up-you...inux-boot.html

    I've followed several suggestions on my system and overall performance is better.

    My question is related to the following:


    Is this not normally implemented since some users don't have a lot of RAM?

    Also, would it make that much difference if the system didn't have a lot of RAM to work with?

    God bless,
    Johnathan
    It's simply a question of what you do with your computer, and do you really have enough RAM to do all that. For basic desktop use that's probably not going to be a problem, but if you try to do anything that requires a lot of temporary data, you'll easily run out of RAM. For example any video editing can easily require anything from couple of gigabytes up to tens of gigabytes of temporary data. Unless you have tens of gigabytes of RAM, you'd be out of luck without being able to keep those files on your hard drive.

    (I just did some basic editing on a 30 minute video file directory from a normal, Mini-DV camera, and ended with over 30GB of temporary files.. I definitely don't have enough RAM to store all that data )

    So, if you know for sure that anything you'll do with the system won't require large amounts of temporary data, then you can of course move /tmp to RAM. On the other hand, from a distro's point of view making such assumption wouldn't really work.

    One more thing to consider is that if you really have enough RAM, then all the data from your /tmp will be cached on RAM anyway. So moving /tmp itself to RAM as well wouldn't make any difference apart from perhaps slightly improving disk read/write for other programs as the system wouldn't need to write temporary data to /tmp on the hard drive.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •