My apology if this is not the correct forum for this question. I am
trying to understand why deleting large files take so long? If this is
not the correct forum, please kindly let me know which forum I can ask
this question.
I created 4 large files, 30 GB per file, for total size of 120 GB.
Then when my machine was idle (no CPU, no IO), I deleted these 4 files
at the same time.
Deleting these files at the same time took 12 secs, most of each was
due to kernel time!
$ time rm -f large* test.log
real 0m12.002s
user 0m0.001s
sys 0m11.928s
Kernel is RedHat Enterprise 6.x
Linux ctran-ld 2.6.32-131.4.1.el6.x86_64 #1 SMP Fri Jun 10 10:54:26
EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Server has 64 GByte memory. Drive is SAS 15K RPM. CPU is Xeon
[email protected], 8 cores including hyper-threading.
Why does it take so long to delete these files (diskIO during deleting
is about couple of 100 MBytes, probably to commit changes in meta-data
in journal).
Thanks so much for shedding light on this puzzle.
Cheers,
--Cuong