You are not logged in.

#1 2010-12-26 18:37:47

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

How big should I make /tmp and what filesystem should it use?

I have a laptop with a whopping 500GB hard drive.

I want to separate out /tmp mostly because all the cool kids do it, but also because I only want to give about 20GB to / and 10GB to /var.

I read on the FreeBSD wiki that editing/copying a DVD image usually leaves a file in /tmp that can be almost 10GB if it's a dual-layer DVD, so I'm thinking I should do at least 15GB.

Then what filesystem?

- I may play with giant files like above, so XFS may be a good idea.
- But most of the AUR helpers (yaourt, bauerbill, clyde) like to build in /tmp by default, so maybe put a good compiling filesystem there.
- /tmp is flushed every reboot, so it doesn't need journaling, so maybe a FS that can disable journaling altogether or ext2.

So some compromise between those three notes would be good. I was thinking maybe JFS.

Offline

#2 2010-12-27 22:37:48

Thor@Flanders
Member
Registered: 2010-08-27
Posts: 266

Re: How big should I make /tmp and what filesystem should it use?

Hi,

I stuck to the defaults that came out of the tin...

Filesystem    Type    Size  Used Avail Use% Mounted on
udev      devtmpfs     10M  196K  9.9M   2% /dev
/dev/disk/by-uuid/f39d4c40-b28d-45a5-b21a-8cf371fb5a58
              ext2    7.3G  5.4G  1.6G  78% /
shm          tmpfs    752M  308K  751M   1% /dev/shm
/dev/sda4     ext2    222G   31G  181G  15% /home
/dev/sda1     ext2     99M   14M   80M  15% /boot

Really depends on the setup, i've got 1.5Gb ram and 250 Gb SATA in the bay...
It is temp...so (as in Funk) less really is more...
EXT2 has earned "flyer miles"...so I'd stick with that - for now...
Wellness

Thor

Last edited by Thor@Flanders (2010-12-27 22:38:22)

Offline

#3 2010-12-27 23:07:57

Telkkar
Member
From: United States
Registered: 2010-12-26
Posts: 38

Re: How big should I make /tmp and what filesystem should it use?

I use tmpfs for my /tmp. I was going to suggest the same to you until I read the whole 10GB DVD rip deal. You could do the same, but then when you rip DVDs, tmpfs would overflow into swap after it eats up what you gave it in RAM.

Pretty sure you can disable journaling on ext4. Probably not a bad choice to go with either ext3 or ext4.

Another question would be -- how often do you plan to play with files that would take up large amounts of space on /tmp?

Offline

#4 2010-12-28 20:41:59

ktemkin
Member
From: Binghamton
Registered: 2010-12-28
Posts: 6
Website

Re: How big should I make /tmp and what filesystem should it use?

pogeymanz wrote:

I read on the FreeBSD wiki that editing/copying a DVD image usually leaves a file in /tmp that can be almost 10GB if it's a dual-layer DVD, so I'm thinking I should do at least 15GB.

The size of the file generated during copying/ripping depends on the software used. I'd imagine many utilities would allow you to specify an alternate path for their temporary files, so you may not have to have those files in /tmp.

(You can, of course, mount another system as a subdirectory of /tmp.)

Telkkar wrote:

I use tmpfs for my /tmp. I was going to suggest the same to you until I read the whole 10GB DVD rip deal. You could do the same, but then when you rip DVDs, tmpfs would overflow into swap after it eats up what you gave it in RAM.

I'd recommended using tmpfs as well. As your temporary files are stored in RAM, it can really speed up operations that rely on temporary files; and as a nice bonus it reduces disk wear.

Offline

#5 2010-12-28 20:46:47

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,926
Website

Re: How big should I make /tmp and what filesystem should it use?

Not sure messing around with /tmp is going to make much difference.

If you are talking a ram drive then makes no difference how big hard drive is.

Its going to end in tears....


Mr Green

Offline

#6 2010-12-28 20:59:05

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: How big should I make /tmp and what filesystem should it use?

I put mine on the RAM since I really only use yaourt in /tmp as well as the usual stuff that resides there of course but also because I have 8GB RAM most of which is going unused or in preload

DVD ripping can always be done on a different directory (I use ~/testing)


Rauchen verboten

Offline

#7 2010-12-30 14:00:15

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: How big should I make /tmp and what filesystem should it use?

All very good points: thank you.

I'm a little bit afraid of using tmpfs. What can go wrong with that? I guess losing all the data in there wont be catastrophic, considering it would be deleted later anyway...

Though I only have 4GB RAM and if I do multiple big builds with bauerbill (the alliteration delights me!) it could eat that up pretty easily.

I think I'll stick to a hard drive partition for a while.

I installed jfs on it already, but I might change it.

It takes forever to remove /tmp files when I reboot (bauerbill leaving all its build files in /tmp). I may just have to go with MurderFS.

Offline

#8 2011-01-01 08:18:01

Telkkar
Member
From: United States
Registered: 2010-12-26
Posts: 38

Re: How big should I make /tmp and what filesystem should it use?

pogeymanz wrote:

All very good points: thank you.

I'm a little bit afraid of using tmpfs. What can go wrong with that? I guess losing all the data in there wont be catastrophic, considering it would be deleted later anyway...

Only thing I could think of that would go wrong with having a tmpfs for /tmp would be on some of your larger compiles -- after it eats up what you give it in RAM, it'll start going to swap. That, and you'll lose all your data when your machine shuts off, instead of having to wipe it when you boot.


pogeymanz wrote:

It takes forever to remove /tmp files when I reboot (bauerbill leaving all its build files in /tmp).

Just curious, how large are some of your builds?

Offline

#9 2011-01-01 08:40:31

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: How big should I make /tmp and what filesystem should it use?

for what you're doing, i don't really see any benefits of using a sole partition for /tmp.

i'd either keep it in tmpfs for day to day routines and bind it to a folder on /home partition for your disk hungry tasks such as DVD rips, or just have it bound in /home by default.
XFS or ext4 seem like appropriate filesystems for /home [w/ tmp]. or JFS for a good compromise (not reiser/murderFS? as it's only single-threaded in certain routes, AFAIK).

you can change bauerbill.conf destinations and/or add MakepkgArgs = -c   .. if it's keeping all your builddir src folders (i guess is what's using all that space).

Last edited by milomouse (2011-01-01 08:45:27)

Offline

#10 2011-01-01 10:52:18

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,926
Website

Re: How big should I make /tmp and what filesystem should it use?

The cool kids are buying SSD drives putting them in raid on dual quad cores

http://www.youtube.com/watch?v=96dWOEa4Djs

Shame his set up is using Windows!

MrG


Mr Green

Offline

#11 2011-01-02 14:55:49

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: How big should I make /tmp and what filesystem should it use?

Telkkar wrote:
pogeymanz wrote:

It takes forever to remove /tmp files when I reboot (bauerbill leaving all its build files in /tmp).

Just curious, how large are some of your builds?

It wasn't any one build, it was just that I installed a bunch of stuff over the course of the first couple of days.

milomouse wrote:

for what you're doing, i don't really see any benefits of using a sole partition for /tmp.

i'd either keep it in tmpfs for day to day routines and bind it to a folder on /home partition for your disk hungry tasks such as DVD rips, or just have it bound in /home by default.
XFS or ext4 seem like appropriate filesystems for /home [w/ tmp]. or JFS for a good compromise (not reiser/murderFS? as it's only single-threaded in certain routes, AFAIK).

you can change bauerbill.conf destinations and/or add MakepkgArgs = -c   .. if it's keeping all your builddir src folders (i guess is what's using all that space).

You're right. Having a separate /tmp is seeming pretty unnecessary now. I'm debating between your first suggestion (tmpfs + /home when needed) or just growing my /var partition a little and binding /tmp to /var/tmp.

Offline

#12 2011-01-02 15:16:48

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: How big should I make /tmp and what filesystem should it use?

There is an interesting article about creating hybrid, ramdisk+harddisk LVM volume. So, it should be fast while not filled up and spacious when you need space. I have never tried it myself, but it's on my eternal todo list wink

Last edited by briest (2011-01-02 15:17:00)

Offline

#13 2011-01-02 15:23:49

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: How big should I make /tmp and what filesystem should it use?

Regarding what benefits arise from a separate /tmp... since /tmp and /var/tmp are world writeable, they could also potentially fill the hard drive if an app goes crazy or gets compromised or whatever. Putting them in a separate partition stops this from happening. Only required for the paranoid though. I prefer to mount all directories writeable by non-root users (/tmp, /var, /home) in separate partitions and with noexec,nodev,nosuid (and mount -o remount,exec when required for building stuff).

Last edited by dyscoria (2011-01-02 15:26:04)


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#14 2011-01-03 00:24:33

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: How big should I make /tmp and what filesystem should it use?

if you felt adventurous you could use btrfs and have /tmp as a subvolume you limit the size of during day to day basis and remove the size limit when you rip DVDs (you could let it grow dynamically but this would be bad for /tmp if you're worried about a program going crazy and filling it up as mentioned above).  if i started from scratch with this problem i would just create one large btrfs without any partitions and create subvolumes for any directories i wanted to control like /var, /tmp, or /home (e.g. size, permissions, snapshots, etc). i have btrfs on a solid state drive and it's been great for that sort of control. might not be what you want but it's just an idea for others, if not anything, for those worried about crazy tmp fill ups, etc.

Last edited by milomouse (2011-01-03 00:28:05)

Offline

Board footer

Powered by FluxBB