Date: Fri, 03 Apr 2015 07:54:27 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 199140] unlinking symlinks oddly slow on UFS Message-ID: <bug-199140-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199140 Bug ID: 199140 Summary: unlinking symlinks oddly slow on UFS Product: Base System Version: 9.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: sigsys@gmail.com On a UFS2 filesystem with soft updates, deleting a directory of thousands of symlinks is hundreds of times slower than deleting regular files. It looks like the writes are synchronous. $ mkdir test1 && for f in `seq 5000`; do touch "test1/$f"; done $ mkdir test2 && for f in `seq 5000`; do echo test > "test2/$f"; done $ mkdir test3 && for f in `seq 5000`; do ln -s test "test3/$f"; done $ sync $ time rm -r test1 0.20 real 0.01 user 0.17 sys $ time rm -r test2 0.30 real 0.00 user 0.25 sys $ time rm -r test3 94.73 real 0.02 user 0.72 sys But if the symlinks are made large enough that their targets cannot be stored in the inode directly, then unlinking them is fast! $ test="$(perl -e 'print "x"x1023')" $ mkdir test4 && for f in `seq 5000`; do ln -s "$test" "test4/$f"; done $ time rm -r test4 0.17 real 0.00 user 0.17 sys -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199140-8>