LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-17-2008, 01:13 PM   #1
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Rep: Reputation: 0
File system(s): most efficient desktop setup?


I've been reading around a bit and became utterly interested in file systems. When I install a Linux distribution, I usually go with the default FS, but right now I have a machine with a 160GB disk that has / (~8GB, Reiser3) and an extended partition with swap (~4GB) and /home (~130GB+, JFS). Is this an optimal setup?

Could you give advice as to what is an optimal setup regarding FS for a desktop computer?


I was thinking about it a bit and I came up with some stuff:

Machine:
Core 2 Duo 2.13Ghz
2GB RAM
160GB hd

Disk:
1.
/boot (~0.1GB) (ext2)

2.
/var (~1GB) (Reiser3)
/ (~10GB - 20GB) (JFS)

3.
swap (~2GB - 4GB) (linux-swap)
/home (~120GB+) (JFS)


Is that good?
 
Old 10-17-2008, 04:35 PM   #2
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
well, there isn't really an optimal fs, just what fits your needs the best. like if you're going to have insanely large hard drives (like 32 PiB drives), then you shold stick with jfs. but i normally use ext3 just because its easy, and there is more universal support for ext3 than jfs. also, i'm not sure if this is just my system, but if my system crashes, reiserfs takes a really long time to replay the journal. i don't know, maybe i just have a crappy computer

as for the actual setup, i personally wouldn't detach /boot. maybe there is some advantage doing it, but from what I know, the /boot only causes more problems, not good. besides, it's just more trouble to do it. as for the /var seperation, i can see why for backup, but if you want to save the important stuff, you should do /home and maybe /usr or /etc. you don't have to make your swap 4 gb, 2 is plenty. I would keep the /home thing, though. that way, if you have to reinstall, your data files are safe on another partition. that is the way my drive is set up.


good luck,
rabbit2345 ^_^
 
Old 10-18-2008, 04:13 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
JFS and XFS are good fast filesystems in most cases, Reiser3 is no longer maintained.
 
Old 10-18-2008, 06:11 AM   #4
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Which one is more general-purpose and better: JFS or XFS?

For example, what should be chosen for /home and why? What should be chosen for / and why?
 
Old 10-18-2008, 06:34 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
JFS uses less CPU time and is very fast when working with large files, XFS can be even faster but uses more CPU time.

Reiser3 is good with lots of small files in large directory tree.

Here's a few benchmarks:
http://linuxgazette.net/122/piszcz.html
http://www.t2-project.org/zine/1/

Also know that your IO scheduler is equally important, recommend you try out different ones and see which one is best. I like deadline personally, it's never failed me.

Last edited by H_TeXMeX_H; 10-18-2008 at 06:37 AM.
 
Old 10-18-2008, 08:08 AM   #6
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Ah, I was looking for recent benchmarks, but could find only old ones and other old information. Going by that last benchmark (and other stuff I've seen), it seems JFS > XFS. How exactly is XFS faster?
 
Old 10-18-2008, 08:50 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well you can tweak XFS to be very fast, but yes JFS was faster and better in those benchmarks I use JFS, but I used XFS and it was good too.

Either way if you do any kind of transcoding or media editing or doing anything with large files JFS and XFS are the only choices. As I said earlier Reiser3 is designed for many small files, probably for large databases of small files. Reiser4 I've never tried, neither have I tried ext4 (nor can I find many benchmarks on it). ext3 is kinda slow in general and I've had various problems with it, its only real benefit is greater ability to recover from corruption as it stores multiple superblocks at set intervals that can be used to reconstruct the partition.

Last edited by H_TeXMeX_H; 10-18-2008 at 08:53 AM.
 
Old 10-18-2008, 10:08 AM   #8
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rabbit2345 View Post
as for the actual setup, i personally wouldn't detach /boot. maybe there is some advantage doing it, but from what I know, the /boot only causes more problems, not good. besides, it's just more trouble to do it. as for the /var seperation, i can see why for backup, but if you want to save the important stuff, you should do /home and maybe /usr or /etc. you don't have to make your swap 4 gb, 2 is plenty. I would keep the /home thing, though. that way, if you have to reinstall, your data files are safe on another partition. that is the way my drive is set up.
From what I see, having a small /boot separate as an EXT2 allows faster booting, because EXT2 can be mounted pretty fast, and also it doesn't waste space because it's unjournaled (unlike EXT3), and a journal isn't really needed there. But, going by the benchmark(s) that H_TeXMeX_H posted, it seems JFS is, concerning mount time, even slightly faster than EXT2. Also, from what I understand, JFS doesn't waste much space either. I'm no specialist, but it's what I perceive so far as I go along.

Concerning /var, I was of the impression it contains many small files which Reiser3 would deal well with (which H_TeXMeX_H seems to confirm for me, as well as the benchmarks).

I don't understand that about having 2GB of SWAP instead of 4GB. I've read it should be 2x RAM, and here I read it should be =RAM, but I've also read somewhere it should be even LESS. Could you explain that to me?



Quote:
Originally Posted by H_TeXMeX_H
Well you can tweak XFS to be very fast, but yes JFS was faster and better in those benchmarks I use JFS, but I used XFS and it was good too.
Is it worth the trouble to tweak XFS to use it instead of JFS? From the way it looks, JFS seems a bit more like "set and forget" while it seems superior to XFS.

With the information I've learned now, I have come up with the following setup:

Disk:
1.
/boot (~0.1Gb) (JFS) fast boot

2.
/var (~1Gb) (Reiser3) small files
/ (~10Gb) (JFS) best overall performance

3.
swap (~2Gb) (linux-swap)
/home (~130Gb+) (JFS) best overall performance

Is it sufficient? Can it be improved?
 
Old 10-18-2008, 11:10 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I would leave /boot to ext2 or you will have problems with lilo, and ext2 is reasonable fast, just not journaled.

I personally use JFS because of the low CPU usage, it's good for saving power on laptops and theoretically increasing performance on desktops. If you like to tweak stuff, I heard you can tweak XFS to best suit your needs, if not then just use JFS. Also, XFS has a feature that will cache files to RAM and write them later, this will speed up writing files, but if the power goes out at this time that would be bad, this is an option tho, one of those things you can tweak.

Last edited by H_TeXMeX_H; 10-18-2008 at 11:13 AM.
 
Old 10-18-2008, 11:50 AM   #10
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
From what I see, JFS for /boot shouldn't be a problem with GRUB, but for the time being, I'll leave the option open whether to use EXT2 or JFS.

I guess from your explanation and from other stuff I've read, it's far better to use JFS instead of XFS, not just due to overall superiority, but also due to hassle of tweaking (even though it could outperform JFS) and especially the risk of data loss. For a desktop, it seems better to use JFS, indeed.

But to go deeper: is it possible to even finetune it more? For example, to have even more separate partitions with this or that FS to optimize the hell out of it? What kind setup would that be like?


~edit:
Another question I have is about partition order. For example, take this setup:

Disk:
1.
/boot
2.
/var
/
3.
swap
/home


/boot is pretty obvious, but what about /var, /, /swap and /home? What is the most efficient setup?

Last edited by lxxxiii; 10-18-2008 at 12:39 PM.
 
Old 10-18-2008, 12:45 PM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, here are some articles explaining various features and tweaks of XFS, I haven't tried all of them, so who knows if they will actually give the performance they say:
http://everything2.com/e2node/Filesy...20on%2520Linux
http://searchenterpriselinux.techtar...314920,00.html
http://64.233.183.104/linux?q=cache:...n&ct=clnk&cd=1

Note that there are some tweaks for JFS too, one of them is by using 'dd' instead of 'cp' to copy large files in larger chunks that will activate a special feature of JFS that will speed it up.
 
Old 10-18-2008, 10:10 PM   #12
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
Quote:
I don't understand that about having 2GB of SWAP instead of 4GB. I've read it should be 2x RAM, and here I read it should be =RAM, but I've also read somewhere it should be even LESS. Could you explain that to me?
swap space is just disk space set aside in case you don't have enough RAM. swap doesn't have to be x2 of your ram, just whatever fits. i have only 1 GB of RAM, but I only set aside 200 MB for swap, as i don't run many intensive apps. but if you're going to be running some high-performance apps, then you may need to set aside more. thats all.

btw. swap space does not seamlessly make up for missing RAM, since it is a physical disk, it will be quite slow sometimes.

if you're going to use the hibernate feature, then swap space is where your system stores its resume files.

Last edited by rabbit2345; 10-18-2008 at 10:12 PM.
 
Old 10-19-2008, 03:35 PM   #13
lxxxiii
LQ Newbie
 
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks. I've learned a few things around here
 
Old 10-19-2008, 04:33 PM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Benchmarks are usually useless. Everyone can find a benchmark telling that his fs of choice is the best one. So they are meaningless to me.

Reiserfs (3.x) has been unmaintained for a long time. It has well known issues with fragmentation, and is a cpu hog. I highly dislike it, but your mileage may vary of course.

I have nothing against jfs.

I have had some problems with xfs though, and I don't advice it's use unless you can guarantee a permanent and stable power supply. For the rest, it's a good fs, but it's very fragile when it comes to power outages.

I personally use ext3 when data integrity matter (/home, / and so on), and ext2 when it doesn't matter, so I save a bit of cpu power (/boot, /usr/src/, /tmp and /var/tmp...).

My layout is somewhat complex, and suited to my tastes and my distro of choice which is Gentoo.

Code:
$ mount | grep sdc
/dev/sdc2 on /var type ext3 (rw,noatime,data=ordered)
/dev/sdc5 on /boot type ext2 (rw,noatime)
/dev/sdc6 on /home type ext3 (rw,noatime,data=writeback)
/dev/sdc9 on /tmp type ext2 (rw,noatime)
/dev/sdc9 on /var/tmp type ext2 (rw,noatime)
/dev/sdc10 on /root type ext3 (rw,noatime,data=ordered)
/dev/sdc11 on /home/i92guboj/kernel type ext2 (rw,nosuid,nodev,noatime)
Besides that I have several other disks that I use for massive storage and backups.

EDIT: I also mount portage via nfs, so I can share it across all my machines.

Code:
server:/var/portage on /var/portage type nfs (rw,nfsvers=3,soft,timeo=100,addr=192.168.0.1)

Last edited by i92guboj; 10-19-2008 at 04:45 PM.
 
Old 10-20-2008, 03:17 AM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
My layout is have everything on one large JFS partition using GRUB as bootloader. Why do I do that, so I can fit more stuff, if you don't estimate very precisely on some of those partitions you'll waste space, space that is on a partition but is never used. I did use ext2 for /boot for a while while using lilo as bootloader which avoids problems, but seeing that GRUB has more features and is faster at booting, why use lilo ?
 
  


Reply



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
How to setup a dual-disk desktop system for best performance - overall & with vmware odemarken Linux - Desktop 0 05-22-2007 01:40 PM
System hardware requirements for minimal desktop setup? General Linux - Hardware 3 02-27-2007 04:14 AM
Most efficient way to maintain and upgrade a system? dr_zayus69 Linux - General 1 03-02-2006 07:42 PM
Setup a VPN server on a Sun Java desktop system. hollor Linux - Newbie 1 06-14-2004 09:26 AM
Efficient Desktop Enviorments bkeating Linux - Software 6 06-26-2002 11:12 AM

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

All times are GMT -5. The time now is 05:25 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