You are not logged in.

#1 2013-04-30 06:02:29

vkumar
Member
Registered: 2008-10-06
Posts: 166

Anyone use XFS on /var?

The wiki mentions that reiser3 may be a good choice for /var because there tend to be many small files in that directory [1].

Is that still true these days?

I think a lot of people use binary logging, have large /var/cache/pacman directories, and have empty /var/mail directories. If anything, there seem to be many large files in /var, at least on my install.

I'm having good experiences with a large XFS /var partition I set up. I'm curious to see any numbers or insight people have about this.

[1] https://wiki.archlinux.org/index.php/Fi … le_Systems

edit: wording

Last edited by vkumar (2013-04-30 07:36:09)


div curl F = 0

Offline

#2 2013-04-30 08:12:26

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Anyone use XFS on /var?

vkumar wrote:

I'm having good experiences with a large XFS /var partition I set up. I'm curious to see any numbers or insight people have about this.

What is making your experience with XFS a good one? What can I do to compare my experience, with "/" formatted as Ext4 and no separate "/var" partition, with your experience?

Offline

#3 2013-04-30 08:51:25

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Anyone use XFS on /var?

I think I used pacman-cage to put /var/lib/pacman/ on an ext2 loop filesystem. The rest of my /var is on my root XFS filesystem.

I'll try unpacking it:

ext2 loop /var/lib/pacman
$ echo 3 | sudo tee /proc/sys/vm/drop_caches
$ time pacman -Qs ttf
real	0m4.528s
user	0m0.037s
sys	0m0.047s
XFS root /var/lib/pacman
$ echo 3 | sudo tee /proc/sys/vm/drop_caches
$ time pacman -Qs ttf
real	0m13.680s
user	0m0.043s
sys	0m0.057s

Yikes! pacman-optimize turned it into 11 seconds.

There isn't too much going on in /var for me:

$ for file in *; do [[ -d "$file" ]] && echo -n "$file: " && find "$file" -type f 2>/dev/null | wc -l; done
cache: 133
db: 1
empty: 0
games: 0
lib: 1485 (of which /var/lib/pacman: 1459)
local: 0
lock: 0
log: 74
mail: 0
opt: 0
run: 0
spool: 8
tmp: 0

Offline

#4 2013-04-30 21:30:15

vkumar
Member
Registered: 2008-10-06
Posts: 166

Re: Anyone use XFS on /var?

drcouzelis wrote:
vkumar wrote:

I'm having good experiences with a large XFS /var partition I set up. I'm curious to see any numbers or insight people have about this.

What is making your experience with XFS a good one? What can I do to compare my experience, with "/" formatted as Ext4 and no separate "/var" partition, with your experience?

I'm moving away from a system that just had one root btrfs partition. The large amount of data on my disk caused fsyncs and readdir operations to slow down drastically over time.

I have the same amount of data stored on my disk now, but it's separated over three partitions (/ ext4, /home ext4, and /var xfs). Boot times are much faster for me, the system does not lock up when I perform large amounts of background I/O, and fsyncs and readdir operations are snappy.

That's all qualitative. Unfortunately I don't have any reliable numbers to share. It's hard to compare our systems because we may be using /var for different things. I have ~90GB of music in my partition, which may unconventional. It wouldn't be fair to compare the performance of large reads and writes on our systems because that assumes a specific use case. The best option is to look at a program that uses /var heavily (maybe journalctl?) and see if there's any way to measure it's IO performance.

I'm not sure if this is of much use, but on a cold boot (on battery power) I can report;

$ time pacman -Qs ttf
real    0m4.574s
user    0m0.043s
sys     0m0.067s

edit: addressing the question

Last edited by vkumar (2013-04-30 21:36:46)


div curl F = 0

Offline

#5 2013-05-08 09:20:17

GI Jack
Member
Registered: 2010-12-29
Posts: 92

Re: Anyone use XFS on /var?

I seriously wouldn't even bother. the performance with ext4 is good enough. plus rieser3 does NOT get updates, and its speed and other advantages were compared against ext2 and mabey early ext3, back when those where defaults.

personally, I maintain a seperate partition for /boot, /home, and /, but they are all ext4.

the advantage of a seperate /home. is that re-installs or swapping distros is easy.\

edit:
http://www.phoronix.com/scan.php?page=a … ux35&num=1

some benchmarks, EXT4 clearly mops the floor with rieser3 in all catagories. There is no catagory where rieser has a signifigant speed advantage, and massive disadvantages in some. I don't see any good reason to have a seperate /var OR /usr on a modern linux machine.

Last edited by GI Jack (2013-05-08 09:28:08)

Offline

#6 2013-05-12 22:27:46

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 231

Re: Anyone use XFS on /var?

GI Jack wrote:

I don't see any good reason to have a seperate /var OR /usr on a modern linux machine.

It depends on data.
There should be different backup and redundancy strategies for system and data.

I build VMs with separate disk images for the machine and the data which is usually  on /var

Offline

#7 2013-05-13 07:13:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Anyone use XFS on /var?

Moving to GNU/Linux Discussion...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2013-05-31 02:35:10

offbeatadam
Member
From: Hallandale Beach, FL
Registered: 2013-05-31
Posts: 7

Re: Anyone use XFS on /var?

While on the desktop my examples don't exactly bolster it, on large (i'm talking 10s/100s of TB) database (postgres) servers I almost exclusively use XFS. From a decision standpoint, the history of XFS is actually quite long and fruitful, and from the large data/performance standpoint on dependable hardware, I have no complaints. The newer filesystems show promise, but one of the big things tends to be that, due to the history with XFS, there is a sense of reliability related to it from places that have had it on older systems.

When it comes to my desktop though, while I could run filesystem tests to see the true reality, I kind of gave that up a long time ago. If I have to deal with something large that can fit into memory, I put it into memory. Nothing defeats that... and now that I can afford >4GB of RAM for the same amount that it used to cost to put 256MB of RAM in, I'm pretty well happy with that.

The former still stands though - even on machines with very large memory footprints, there always exists a table that either can't be put into memory (or it'd be dumb to). Regardless of that, storing the data eventually requires a hdd - and for that XFS serves almost all of the purpose that is necessary. The modern systems like btrfs are nice, and they are reaching features and efficiencies that rival XFS, but the history isn't there. I have dealt with customers that still have SGI systems that are using rather old XFS drives - and its hard to convince an engineer that has vetted that sort of history... its hard to argue with people that know languages that were defunct by the time I was born.

With all of that said... I have nothing to support it other than its the way I've done it since I was taught the "right way" to do things.

/boot
/
/home
/usr
/var <--- we stopped doing this a few years ago, and occasionally it was /opt instead, depending on the software and/or the distro.
/var/lib <--- only on database servers
/var/log

The reasoning back then still stands now. On a corporate/direct purpose server, it is catastrophic to even dream that /, /usr, or /var/log be full or susceptible to anything else. Ever. On database servers (as before, postgres), the databases are almost always on separate storage. While /usr (and /var) may not suffer from "full" issues like log or root, depending on the backup hardware and maintaining integrity (monitoring) can be easier (especially with automation) to access specifically labeled disks.

It's entirely anal, but I was forced to memorize it by a person that also forceably disabled or ninjad every editor on a system so that I would either learn vim or quit. From what he told me about his days managing a college infrastructure in the early 80s to the early 90s... I've never really questioned why he was the way he was. Following those rules though, has saved me on a lot of situations though. I also heavily rely/relied on LVM for that structure... everything but /boot and / is usually in an LVM managed space. Snapshots are the bomb.

It was an interesting day though... when I went to a user group with him to hear about cgroups when redhat finally rolled them into their kernel tree. He damn near shed a tear.

On my desktop, that habit just kind of stuck, though with binary logs and such I have altered it a bit. Since I have a webserver, and I do bruteforce it from time to time with apachebench, I keep /var/log still on its own partition because I've killed myself a few times filling up the / partition. Since I work occasionally on larger datasets I have to be... conservative in my / sizing.

Right now I have:

/boot
/
/home
/var/lib
/var/log

And it suits me well.

Last edited by offbeatadam (2013-05-31 02:47:14)


"Never attribute to malice that which is adequately explained by stupidity." - Hanlon's Razor

Offline

#9 2013-05-31 04:57:41

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: Anyone use XFS on /var?

In my Experience for a Desktop I recommend JFS or ReiserFS,

I use a /var partition for  the saque of store logs and other thinks for prevent you know disaster and can look Journal for the problem or look what is intaled for reintal whit same packages

I aditionally have /var/cache/pacman separated for prevent download the same archive in case of problem I only reuse that partition for reintalling if a break was caused by an update and I break the sistem and that and share cache whit other machines

/home in separate partition for the know reasons and /boot to for ... for ... Really I not remmember  but I make it in every distro

about XFS (xfs-tools and xfsdump) the setup used on creation time can influenciate the later performance as far I can read there an here


Well, I suppose that this is somekind of signature, no?

Offline

#10 2013-05-31 11:20:30

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: Anyone use XFS on /var?

/root, /boot, /home, /var are XFS partitions

time pacman -Qs ttf
real    0m1.308s
user    0m0.092s
sys     0m0.020s

Last edited by Perfect Gentleman (2013-05-31 11:22:11)

Offline

#11 2013-06-01 12:53:01

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Anyone use XFS on /var?

Perfect Gentleman wrote:

/root, /boot, /home, /var are XFS partitions

time pacman -Qs ttf
real    0m1.308s
user    0m0.092s
sys     0m0.020s

And if you do

echo 3 | sudo tee /proc/sys/vm/drop_caches

right before?

Last edited by Procyon (2013-06-01 12:54:11)

Offline

#12 2013-06-01 20:29:09

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: Anyone use XFS on /var?

$ echo 3 | sudo tee /proc/sys/vm/drop_caches
3
--------
$ time pacman -Qs ttf
real    0m0.938s
user    0m0.098s
sys     0m0.010s

Last edited by Perfect Gentleman (2013-06-01 20:53:04)

Offline

Board footer

Powered by FluxBB