You are not logged in.

#1 2008-08-30 20:03:09

davvil
Member
Registered: 2008-05-06
Posts: 165

Switching to xfs?

I am seriously thinking about switching to xfs (using ext3 now). I have read nearly only good things about this filesystem and the fsck times of ext3 drive me crazy. My computer is a laptop and, following Murphy's Law, it always checks the disk at boot time when I most urgently need it (when I'm going to give a presentation or the like).

What are your thoughts about it? Any suggestions about making the transition as painless as possible? I have two partitions, one for / and one for /home. For /home I can copy my files to an external disk and then put them back when I'm through with formatting, that's no big deal. But what about /? Can I do something similar or is it simpler to reinstall? I'm not so confident about special files (/dev, /proc and the like) and grub finding the right partition.

Offline

#2 2008-08-30 20:17:31

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

Well, XFS performs flawlessly on my boxes. The only problem is that xfs doesn't like to play with tiny files (read /var). So, my advice is to create your / and /home partitions with log_size=128M (have a look to mkfs.xfs manpage) in order to improve its performance when deleting files. Also, you might want to mount your partitions with noatime,nodiratime and logbufs=8 options to make it even faster.

Now, for /var there is a very ugly (but pretty efective) trick. You might consider dd if=/dev/zero of=/var.loopback bs=1024 seek=2048k count=1 (this will create an sparse file of 2 GB) and format it with mkfs.reiserfs. You can mount it through the loop device (don't forget to add the loop module to your rc.conf) and you're done. Reiserfs loves small files (read -again- /var) and xfs loves huge files (your /var loopback file).

I hope it helps

p.s. my 3 boxes are using XFS big_smile


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#3 2008-08-30 20:30:02

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Switching to xfs?

Are you sure XFS fsck will be faster? You can disable regular fsck on ext using tune2fs.

That said, I love XFS for my /home, mostly due to its features. Root of my desktop is using JFS though, due to the mentioned XFS slowness with small files.

Offline

#4 2008-08-30 20:45:04

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

That's the reason you might consider creating a 'loop-trap' to contain /var. Tweaking the log_size when creating the filesystem also helps with handling small files (have a look at the mkfs.xfs manpage)

and what do you mean with XFS fsck speed? xfs auto-heals itself when it's remounted. I have never been in the need to use xfs_repair (fortunately)...


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#5 2008-08-30 21:22:22

kett
Member
Registered: 2008-04-21
Posts: 104

Re: Switching to xfs?

A word of warning, xfs doesn't come back well from power failures.  I tried xfs recently.  Low and behold, within a month or so, the power on my computer cutout while it was writing something.  It wouldn't boot afterwards, so I had to repair the partition.  After the repair, I lost a bunch of files, and my arch install was broken.  It might have been a fluke incedent, but I've read it's happened to other people as well.  Just thought I'd share my experience with it.

Offline

#6 2008-08-31 09:59:08

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: Switching to xfs?

@lucke:
About the fsck speed, I thought that, as kjon pointed out, there is no need to perform a FS check after every x mounts. I know I can set the maxcount with tune2fs for ext3 (at the moment I have it at 100), but AFAIK it's a bad idea to disable it completely.

@kjon:
It's the speed on small files so bad, that it is necessary to do the tricks for /var? (BTW. wouldn't it be simpler to create an additional partition instead of the loop device?) I can consider using JFS for /, just like lucke.

@kett:
About the sensitivity to power failure, this should be no much issue to me, as I have always the battery on the laptop. However this can be a big drawback in general for the adoption of the FS, isn't it?

Offline

#7 2008-08-31 17:28:14

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

Let's see. The tiny files are one of the weakest points of xfs. You can improve its performance by enlarging the log (and it will also help in its deleting performance). About the 'loop-trap' is just an excuse to keep 2 partitions on my machine and not 3. Is just a matter of taste.

I don't like JFS. I dunno why big_smile. Maybe is because its performance tends to decrease along the time, whereas xfs_fsr saves the day for xfs filesystems.

But again, is just a matter of taste.


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#8 2008-08-31 19:25:10

lmsguerr
Member
From: Loulé-Algarve-Portugal
Registered: 2008-05-20
Posts: 49

Re: Switching to xfs?

I haven't had any problems with my xfs partitions... the only issue is if you use GRUB for bootloader is better to create a partion with other fs for /boot to install GRUB files. It said's that GRUB doesn't like XFS!!!

Last edited by lmsguerr (2008-08-31 19:26:06)


Linux /  4.18.5-ARCH / x86_64 / Intel I5-4460s /  Intel® HD Graphics 4600  / MSI B85-G43 Gaming

Offline

#9 2008-08-31 20:35:35

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

Newest versions can coexist pacifically with xfs. A separate /boot partition is not longer required.


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#10 2008-08-31 23:47:45

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Switching to xfs?

XFS as a root partition?  Bad tool for the job, IMO -- even when tweaked as suggested above it is consistently slower (when used as root) than *all* alternatives...  At least this is my experience.

Offline

#11 2008-09-01 00:41:41

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

So, your suggestion is?
No problems here with XFS, for a very long time. All my machines are set with it.
Properly tweaked is a rock solid filesystem. But if you prefer ext2 for your TB volume, is up to you big_smile


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#12 2008-09-01 01:38:05

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Switching to xfs?

kjon wrote:

So, your suggestion is?

On my desktop I use reiserfs for root, ext3 for data and on my laptop jfs for everything because of its low cpu usage and battery-friendly design.

I've nothing against xfs -- it's just not a good choice for root.  There are many small files on root (also outside of /var) and, basically, no large files so the advantages of xfs are canceled out and its disadvantages exposed.

Sure xfs is solid, it's just painfully slow in comparison to the alternatives (again, when used as root partition).   Just to be clear -- I'm talking about a tweaked xfs: noatime,nodiratime,logbufs=8 in fstab and mkfs.xfs -d agcount=45 -l size=64m (basically as suggested in this article http://everything2.com/node/1479435).

Offline

#13 2008-09-01 02:55:54

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Switching to xfs?

errr... your tweaks are totally wrong to me. If I were you, I might consider mkfs.xfs -d agcount=2 (or maybe 4) and -l size=128m. That will pull cpu usage down and will improve small files handling performance.


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#14 2008-09-01 03:48:54

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Switching to xfs?

kjon wrote:

errr... your tweaks are totally wrong to me. If I were you, I might consider mkfs.xfs -d agcount=2 (or maybe 4) and -l size=128m. That will pull cpu usage down and will improve small files handling performance.

A while ago I tried xfs without any tweaks -- that was not good.  Then, quite recently (as you can see I was still curious about it and determined to make it work), I tried with the tweaks I mentioned above, and it was, for all practical reasons, the same.  The difference in performance between reiserfs and xfs with the type of files that go on /root is simply dramatic, the improvements achieved with tweaking are, relatively speaking, slight.  The best example is this: When I move my system to a different filesystem type I usually make a tarball from all the files and then uncompress them onto the newly created partition.  Uncompressing all files (about 10GB uncompressed) onto a xfs partition took 15-20 minutes, uncompressing them onto reiserfs less than 5 minutes -- filesystem type was the only variable in this comparison (same tarball, same files, same hard drives).  I didn't time it, but this is not an exaggeration -- it's representative of the scale of the difference.  I doubt that adding another 64m of log size would change much, since adding the first 64m didn't register as a significant improvement to begin with -- but maybe I'm wrong...  CPU usage was not a problem that I noticed (that's what your suggestion of agcount=2 is referring to, I presume).

It seems that each time I try xfs I come to the same conclusion -- it doesn't make sense to try and force a square peg through a round hole, xfs just doesn't seem like a good fit given the requirements of a system partition -- on the other hand it's probably a great choice on a partition populated with large files, like media files and such.

Anyways, I'm just sharing my opinion and experiences for the OP to consider.  I don't hold any grudge against xfs or anything smile

Offline

#15 2008-09-01 04:45:53

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Switching to xfs?

I tried xfs and reiserfs for my root partitions, reiser always seemed faster from a subjective point of view.  It handles small files brilliantly, and I can't say I noticed any difference compared to ext3 with larger ones. So consequently I use it on all my partitions with the exception of my external drives as they are fat32 formatted, for compatibility.

Offline

#16 2008-09-01 08:54:56

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Switching to xfs?

This topic made me want to try something else for root (instead of JFS I had for some 2 years) - as my / was slowly running out of space, I decided to go down a dangerous path and give reiser4 with lzo compression a go (a dangerous path it was, one wrong switch and backup of my already reformatted root partition went boom; gotta love GNU/Linux for its frigging flexibility and transparency, one hour later I was running on reiser4 anyway, without touching the install CD). I have to admit the thing flies compared to my 2-year old JFS, uses a lot less space, but still, I'm afraid it could go awry on me sooner or later. At least I hope its performance won't go down the drain over time as is the case with reiserfs.

Offline

#17 2008-09-01 12:06:05

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: Switching to xfs?

Well, it seems XFS is not so suited as I thought at the beginning. From the last comments it seems reiser would be a better choice. And I think even for /home, as most of the files should be also relatively small (config files, my programs, TeX files, digital photos and the like). For bigger things (CD images and so on) I normally use an external drive.

@lucke:
Could you explain how you changed the partition type of root "without touching the install CD". This certainly sounds interesting for me! :-)

Offline

#18 2008-09-01 12:30:11

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Switching to xfs?

I used the RIP LiveCD and copied the root partition off my server via network.

That bloody reiser4 is causing problems already. Well, using Arch can be boring (everything works), so a good thrill every now and then can be a good thing :-)

Offline

#19 2008-09-01 21:44:31

nick
Member
From: Canada
Registered: 2008-08-22
Posts: 21

Re: Switching to xfs?

I have root and /home on XFS partitions.  I'm interested in setting up reiserFS on a separate /var partition, but I've heard it doesn't scale well with multicore processors.  Not sure if that would be a good idea, then.

Offline

#20 2008-09-05 15:07:50

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: Switching to xfs?

Well, the problem of transfering the old data to the new partition type seems to have been sadly solved. My laptop (among other things) was robbed a couple of days ago sad So, when I get a new one I will have do a fresh installation, probably with reiser.

Thank you all for your suggestions.

Offline

#21 2008-09-05 21:40:41

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Switching to xfs?

lucke wrote:

I used the RIP LiveCD and copied the root partition off my server via network.

That bloody reiser4 is causing problems already. Well, using Arch can be boring (everything works), so a good thrill every now and then can be a good thing :-)

WindowsLogo_256x256.png


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#22 2008-09-05 22:22:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Switching to xfs?

That's too much of a thrill!

*shivers*

Offline

#23 2008-09-10 00:25:01

Cosay
Member
From: United States
Registered: 2008-08-12
Posts: 82
Website

Re: Switching to xfs?

I have all of my Arch partitions as XFS and I've had no problems at all. The only thing I've noticed is that Pacman updates (which I would guess involves a huge number of small files) are slower but since I only update once a week, that's not a big deal for me.

Offline

#24 2008-09-10 02:13:10

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Switching to xfs?

XFS is a good filesystem, but typically a poor choice for /var and any other filesystems containing many small files. Hence the overall slower pacman performance.
Reiser on /var will give a significant improvement over XFS.
:)
I do not have any reason to use XFS, but I would not be opposed to using it if I had loads of large files to play with.
I use JFS, which performs quite well with both large and small files. I recommend JFS for everything, except perhaps /var, for which I'd suggest Reiser.

Offline

#25 2009-03-11 22:25:37

V01D
Member
Registered: 2006-07-18
Posts: 128

Re: Switching to xfs?

I switched from reiserfs to XFS recently, and it looks a little faster. Of course, pacman -Sy was incredibly slow until a created a loopback filesystem for /var/lib/pacman. Now it is incredibly fast.

Offline

Board footer

Powered by FluxBB