Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am a software guy and have little knowledge of the Linux OS. We are hosting our website on Linux OS. While doing some performance tuning of the website, I came across the suggestion of using tmpfs for the tmp folder using the following command
mount tmpfs /tmp -t tmpfs -o size=64m
However as soon as I do this, Apache stops working. Also if I reboot my Linux box, this mount goes away. Can you please guide me whats happening.
When you mount it from the command line, its just storing it in memory, hence when you reboot, it goes away cause you haven't created it so it automounts during bootup.
You can do this by editing your /etc/fstab file and adding it there. Also it might make apache stop working as it could have had files in /tmp, mounting tmpfs over it wipes them out, etc.
Shutdown apache, add the entry, mount it, restart apache and see if that works. And you can then reboot to test if it mounts properly at boot time.
Well to tell you the truth, you can use tmpfs but I'd make it bigger than 64 megs.. I usually stick with at least 800 megs or more for the /tmp directory. Its not necessary but if you already have your /tmp setup on its own partition or on a partition with plenty of space, I'd just leave it be.
On doing a df on my linux prompt apart from the other partitions(I presume they were partitions, please excuse my ignorance but I really dont have any idea about the partitions), it gave the following info for /tmp
/dev/sda6 1035660 49360 933692 6% /tmp
Do you feel, moving this part into the RAM would give us no performance benefit as such?
Originally posted by akuate On doing a df on my linux prompt apart from the other partitions(I presume they were partitions, please excuse my ignorance but I really dont have any idea about the partitions), it gave the following info for /tmp
/dev/sda6 1035660 49360 933692 6% /tmp
Do you feel, moving this part into the RAM would give us no performance benefit as such?
Thanks a lot for your help
What's your machine specs? That really all depends on that, how many users or hits the machine takes, etc.
And if you want an easier readable format for df, do a df -h
As for the hits, the max load that we have experienced so far is 3000 concurrent users. Also during this load period they are on a page which gets refreshed with new data every 40 seconds.
Dont know whether this information is sufficient. Do let me know please.
Originally posted by akuate The more readable form
/dev/sda6 1012M 49M 912M 6% /tmp
As for the machine specs
Dual Xeon processor(2.8 GHz)
3 GB RAM
As for the hits, the max load that we have experienced so far is 3000 concurrent users. Also during this load period they are on a page which gets refreshed with new data every 40 seconds.
Dont know whether this information is sufficient. Do let me know please.
Thanks a lot for the help
I'd say with those specs, you shouldn't or probably couldn't tell a difference mounting /tmp as tmpfs into memory or leaving it as it is. Expecially since your only using 6% of your space allocated for /tmp
Originally posted by akuate I see what you are saying. Thanks a lot for your help, I guess there is no benefit I will see here.
Yeah and if this is mainly a web server serving to poeple, most of apache's processes are going to get loaded into ram anyways. Majority of the time /tmp will get used for those actually logging directly into the server, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.