LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-15-2004, 10:24 AM   #1
akuate
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Rep: Reputation: 0
tmpfs


Hi,

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.

Thanks a lot for your help
 
Old 08-15-2004, 10:33 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 08-15-2004, 11:43 AM   #3
akuate
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
I tried stopping apache, applying the mount command and then restarted apache. However, my app failed though Apache starts fine.

Thanks a lot for the quick response.
 
Old 08-15-2004, 12:05 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 08-15-2004, 12:17 PM   #5
akuate
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-15-2004, 12:22 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
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

the -h means human readable
 
Old 08-15-2004, 12:35 PM   #7
akuate
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-15-2004, 12:48 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
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
 
Old 08-15-2004, 12:53 PM   #9
akuate
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
I see what you are saying. Thanks a lot for your help, I guess there is no benefit I will see here.
 
Old 08-15-2004, 01:02 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
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.

But yeah, no problem, glad to help out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tmpfs and swap memory basics kushalkoolwal Debian 1 09-12-2005 04:24 PM
tmpfs for Windows bobwall Linux - Software 0 02-24-2005 11:20 AM
top reports 99% memory used when using a tmpfs damonnew Linux - General 1 01-30-2005 01:51 AM
tmpfs and ramfs jatho Linux - General 0 06-23-2004 04:11 AM
tmpfs seazon Linux - General 1 09-07-2003 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration