View previous topic :: View next topic |
Author |
Message |
nekromancer Apprentice
Joined: 23 Feb 2004 Posts: 158 Location: Niagara, Canada
|
Posted: Tue Mar 24, 2009 8:49 am Post subject: XFS very slow deleting big folders |
|
|
Hi,
I have xfsprogs-2.10.1, 2.6.27-gentoo-r8 kernel, XFS filesystem on a 320GB 5400rpm disk on a laptop
Code: |
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 xfs 297G 23G 274G 8% /
udev tmpfs 10M 204K 9.9M 2% /dev
shm tmpfs 2.0G 0 2.0G 0% /dev/shm
|
I been using it for over 6 months and everything is good except for 1 thing. When I delete large directories it takes a really really long time. For example I have a backup of /usr/portage, which is a huge folder. Doing a "rm -rf /usr/portage_backup" took around 15 minutes to finish. Nothing on the system was unresponsive and cpu usage was under 10%. But the deleting was really slow.
I don't know why but if anyone out there has any ideas? and maybe any way to speed things up?
according to this benchmark http://linuxgazette.net/122/piszcz.html see graph 006
xfs should be very fast in deleting tens of thousands of directories. |
|
Back to top |
|
|
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Tue Mar 24, 2009 11:35 am Post subject: |
|
|
you can to some tasks to check fro fragmentation or filesystem errors:
check defragmentation:
Code: | # xfs_db -c frag -r /dev/sda3 |
start defrag for 10min:
Code: | # xfs_fsr -v -t 600 |
then check again as above
xfs doesn't use fsck at all, but you can use this one to check for errors (remember to umount the partition first):
Code: | # xfs_repair /dev/sda3 |
I hope this helps a bit.
//edit: just checked myself O.o
Code: | disi-openvz ~ # xfs_db -c frag -r /dev/mapper/vg001-data
actual 131343, ideal 1058, fragmentation factor 99.19% |
|
|
Back to top |
|
|
nekromancer Apprentice
Joined: 23 Feb 2004 Posts: 158 Location: Niagara, Canada
|
Posted: Tue Mar 24, 2009 12:30 pm Post subject: |
|
|
Doesn't seem like fragmentation is a problem for me.
Code: |
toshi necro # xfs_db -c frag -r /dev/sda3
actual 534125, ideal 528687, fragmentation factor 1.02%
|
I will try the repair when I get my hands on a livecd, cos my root partition is the only one that is xfs. |
|
Back to top |
|
|
schiotz Apprentice
Joined: 20 Jan 2004 Posts: 206 Location: Denmark
|
Posted: Tue Mar 24, 2009 2:07 pm Post subject: |
|
|
It is quite a while ago, but I once had /usr/portage on a separate partition, and tried timing emerge sync with different file systems. XFS was by far the slowest, reiserfs the fastest, and ext3 doing quite well.
Of course things may have changed a lot since then, but I was surprised at the slowness of xfs and abandoned it.
/Jakob |
|
Back to top |
|
|
gentoo_ram Guru
Joined: 25 Oct 2007 Posts: 474 Location: San Diego, California USA
|
Posted: Tue Mar 24, 2009 6:05 pm Post subject: |
|
|
From all the benchmarks I've read XFS is fast at some things, and really slow at others. It turns out XFS is really slow at deleting files. That's the weak point in its design. So it doesn't surprise me is takes a long time to delete directory trees with lots of little files. That just isn't XFS' strong point. From your description of the 'problem', I'd say this is 'normal'. |
|
Back to top |
|
|
FizzyWidget Veteran
Joined: 21 Nov 2008 Posts: 1133 Location: 127.0.0.1
|
Posted: Tue Mar 24, 2009 11:51 pm Post subject: |
|
|
xfs is good with large files not small, thats why most use it for storing large files, tv shows recorded from tv on capture card and such like, i have used xfs for a while and yes it can take a time to delete files, small ones, large files are gone near enough right away _________________ I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch. |
|
Back to top |
|
|
|