Re: very slow file deletion on an SSD
flat view
From: <hidden>
Date: 2012-05-27 00:10:45
Also in:
linux-xfs
Ok. Will do in a few hours Sent from my iPad On May 26, 2012, at 8:07 PM, Dave Chinner [off-list ref] wrote:
On Sat, May 26, 2012 at 07:25:55PM -0400, Joe Landman wrote:quoted
[root@siFlash test]# ls -alF | wc -l 59 [root@siFlash test]# /usr/bin/time rm -f * ^C0.00user 8.46system 0:09.55elapsed 88%CPU (0avgtext+0avgdata 2384maxresident)k 25352inputs+0outputs (0major+179minor)pagefaults 0swapsIt's burning an awful lot of CPU time during this remove.quoted
[root@siFlash test]# ls -alF | wc -l 48So, 48 files were removed, it was basically CPU bound and one took 2.6 seconds. So, how big are the files, and does the one that took 2.6s have tens of thousands of extents ('xfs_bmap -vp *' will dump the extent maps for all the files)? if not, can you use perf top to get an ida of the CPU usage profile duing the rm by doing: # perf record rm -f * ..... and capturing the profile via: # perf report > profile.txt And attaching te profile.txt file so we can see where all the CPU time is being spent? You can find perf in your kernel source tree under the tools subdir.... Cheers, Dave. -- Dave Chinner david@fromorbit.com