LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-12-2007, 01:06 AM   #1
Megatog615
Member
 
Registered: Feb 2006
Distribution: Ubuntu, Debian, and Slackware
Posts: 48

Rep: Reputation: 15
tmpfs Initial Size


I have a tmpfs set up for /tmp, and it works. However, it initially has a 96MB maximum capacity, causing swap usage from applications. My laptop only has 192MB of ram, so this is bad. I'd like it to initially use less ram(like around 16MB) instead of 96MB.
There doesn't seem to be an option for this. Is this possible through kernel recompiling?
 
Old 02-12-2007, 05:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,311
Blog Entries: 54

Rep: Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860
No, it means that if you set the size flag to 96MB it can allocate max that.
If there's nothing in your tmpfs it won't take up resources.
 
Old 02-12-2007, 06:09 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,286

Rep: Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029
Or to state that another way - with 192 Meg of RAM you probably should *not* be using tmpfs for /tmp
tmpfs by design will use page cache and hence be subject to swapping. You can limit the (maximum) size of it, but that is rarely likely to be a good idea.
 
Old 02-12-2007, 10:20 AM   #4
Megatog615
Member
 
Registered: Feb 2006
Distribution: Ubuntu, Debian, and Slackware
Posts: 48

Original Poster
Rep: Reputation: 15
Well I set it up to create less hard drive usage, but it seems it's just making the swap get used more often(thereby defeating the purpose) so I guess I'll just remove it.
 
Old 02-12-2007, 03:35 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,286

Rep: Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029Reputation: 1029
If you are concerned about disk occupancy, simply clear /tmp on shutdown.
If you are concerned about disk I/O, not much you can do, although I wouldn't normally expect /tmp to contribute much.
 
Old 02-13-2007, 04:39 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
The size of /tmp is kept in variable TMPFS_SIZE in /etc/default/tmpfs
TMPFS_SIZE = 16

If you want to clean /tmp at startup, you should create this link:
/etc/rcS.d/S36mountall-bootclean.sh pointing to ../init.d/mountall-bootclean.sh
 
  


Reply

Tags
size, tmpfs


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TmpFS ?? jdecoto Red Hat 2 12-10-2006 08:55 PM
tmpfs mnotgninnep Debian 6 03-06-2006 04:52 PM
tmpfs akuate Linux - General 9 08-15-2004 01:02 PM
C++ programs initial stack size. uncle_kevin Programming 1 07-05-2004 01:35 PM
tmpfs seazon Linux - General 1 09-07-2003 04:45 AM


All times are GMT -5. The time now is 03:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration