xfs
[Top] [All Lists]

XFS: performance

To: xfs@xxxxxxxxxxx
Subject: XFS: performance
From: Yclept Nemo <orbisvicis@xxxxxxxxx>
Date: Sun, 28 Nov 2010 22:51:04 +0000
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=/FRXbGN699t2CcZsmtVJUaBlmYOoHKD0/gGxJm6uWFI=; b=DRKPj66HRpZ+wCBXe3o+i1cnn80Gh1lkVxxmK3Cm8Cjlyd1WbTuEjvaP00seAlcusa pOvHWHuFsYl7IMjitt3YiL+0Sti4MAMabL1VGRwe5mQYUb5779PF6sJKhy2CWRfS8Qji mlVy4D1jP3+FGdSLIBoVGcEq/+QFcG2LQsQkM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lp0yswBGiq+vyLhq06la2JMpimJtQ5Hq/drl1KjGa5FmaTLAZc+nhPjBhXT20sQKew ZMspHcsj0gHVW6md78/KhLyijIepk4grvGH2f52hdY/AAUDabxxGbbsUbh2LvgceleGY 5DpXuQOquUfVlvjLQKqtM5RE35SZgz2z8oM00=
After 3-4 years of using one XFS partition for every mount point
(/,/usr,/etc,/home,/tmp...) I started noticing a rapid performance
degradation. Subjectively I now feel my XFS partition is 5-10x slower
... while other partitions (ntfs,ext3) remain the same.
Now I just purchased a new hard-drive and I'm going to be copying all
my original files over onto a *new* XFS partition. When using mkfs.xfs
I'd like to optimize and avoid whatever it was that made my old XFS
partition slower than a snail.

in all cases, bsize=4096

Original hard drive (98GB Seagate, 39.8Gb XFS partition)
# xfs_info /dev/sdb5
meta-data=/dev/sdb5
    isize=256
    agcount=4, agsize=2595896 blks (9.9 GB)
    sectsz=512    attr=2
data=
    bsize=4096
    blocks=10383582, imaxpct=25 (39.6 GB)
    sunit=0    swidth=0 blks
naming=version 2
    bsize=4096   ascii-ci=0
log=internal
    bsize=4096
    blocks=5070, version=2 (19.8 MB)
    sectsz=512
    sunit=0 blks, lazy-count=0
realtime =none
    extsz=4096
    blocks=0, rtextents=0


New hard drive (500GB Samsung MP4, 100GB XFS partition)
# mkfs.xfs /dev/sda5
meta-data=/dev/sda5
    isize=256
    agcount=4, agsize=6553600 blks (25.0 GB)
    sectsz=512    attr=2
data=
    bsize=4096
    blocks=26214400, imaxpct=25 (100.0 GB)
    sunit=0    swidth=0 blks
naming=version 2
    bsize=4096   ascii-ci=0
log=internal
    bsize=4096
    blocks=12800, version=2 (50MB)
    sectsz=512
    sunit=0 blks, lazy-count=1
realtime=none
    extsz=4096
    blocks=0, rtextents=0

I was considering running "mkfs.xfs -d agcount=32 -i attr=2 -l
version=2,lazy-count=1,size=256m /dev/sda5".

Yes, I know that in xfs_progs 3.1.3 "-i attr=2 -l
version=2,lazy-count=1" are already default options. However I think I
should tweak the log size, blocksize, and data allocation group counts
beyond the default values and I'm looking for some recommendations or
input.

I assume mkfs.xfs automatically selects optimal values, but I *have*
space to spare for a larger log section... and perhaps my old XFS
partition became sluggish when the log section had filled up, if this
is even possible.
Similarly a larger agcount should always give better performance,
right? Some resources claim that agcount should never fall below
eight.
I'm also hesitant about reducing the blocksize from a maximum of 4096
bytes, but since XFS manages my entire file-system tree, a blocksize
of 512, 1024,or even 2048 bytes might squeeze out some extra
performance. [I assume] the performance w.r.t. blocksize is:
 . a larger blocksize dramatically increases large file performance,
but also increases space usage when dealing with small files.
. a smaller blocksize dramatically decreases performance for large
files, and somewhat increases performance for small files, while also
slightly increasing space usage with extra inodes(?)

I want to make it clear that I prefer performance over space efficiency.

Many thanks,
orbisvicis

<Prev in Thread] Current Thread [Next in Thread>