View previous topic :: View next topic |
Author |
Message |
thehailo n00b
Joined: 11 Mar 2004 Posts: 47 Location: US
|
Posted: Tue Feb 14, 2006 12:49 am Post subject: Limiting /tmp While Allowing Massive File Transfers? |
|
|
I'm reformatting my SFTP server and would like to give /tmp its own partition, but I'm having trouble figuring out a good rule of thumb for setting its size. The server acts as my personal backup machine, so it's regularly moving massive files over (40 GB). Are files stored in /tmp during transfer? What's a good rule to apply if any (like how swap is normally 0.5-2.0x RAM)?
If there isn't a good way to handle this without wasting massive storage space on /tmp, is there a good way to limit /tmp otherwise like disk quotas? My goal is to be able to mount /tmp with noexec and pair it with disk quotas to strictly limit the ability of any one user to waste disk space.
Last edited by thehailo on Sat Feb 04, 2023 1:15 am; edited 2 times in total |
|
Back to top |
|
|
goma n00b
Joined: 04 Feb 2006 Posts: 56
|
Posted: Tue Feb 14, 2006 11:57 am Post subject: |
|
|
Personally, on my computers I simply use tmpfs for /tmp and usually set it between 50M-100M, which is plenty.
Code: | goma@youshun:~ $ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
none 50M 12K 50M 1% /tmp |
I've transferred large files back and forth via scp with no problem, so I'd say /tmp is not involved for those transfers. I'd be surprised if it's involved for transfers of any type except perhaps via web forms.
Incidentally, to use tmpfs for /tmp, don't allocate a partition for it and instead put something like the following in your /etc/fstab:
Code: | none /tmp tmpfs size=50M 0 0 |
The other nice thing about having /tmp mounted in RAM with tmpfs is that it cleans itself when I shutdown my laptop. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|