Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XFS very slow deleting big folders
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nekromancer
Apprentice
Apprentice


Joined: 23 Feb 2004
Posts: 158
Location: Niagara, Canada

PostPosted: Tue Mar 24, 2009 8:49 am    Post subject: XFS very slow deleting big folders Reply with quote

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
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Tue Mar 24, 2009 11:35 am    Post subject: Reply with quote

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
View user's profile Send private message
nekromancer
Apprentice
Apprentice


Joined: 23 Feb 2004
Posts: 158
Location: Niagara, Canada

PostPosted: Tue Mar 24, 2009 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
schiotz
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 206
Location: Denmark

PostPosted: Tue Mar 24, 2009 2:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 474
Location: San Diego, California USA

PostPosted: Tue Mar 24, 2009 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Tue Mar 24, 2009 11:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum