On Tue, Jul 24, 2012 at 09:56:26AM +0200, Martin Steigerwald wrote:
> find is fast, du is much slower:
>
> merkaba:~> echo 3 > /proc/sys/vm/drop_caches ; time ( find /usr | wc -l )
> 404166
> ( find /usr | wc -l; ) 0,03s user 0,07s system 1% cpu 9,212 total
> merkaba:~> echo 3 > /proc/sys/vm/drop_caches ; time ( du -sh /usr )
> 11G /usr
> ( du -sh /usr; ) 1,00s user 19,07s system 41% cpu 48,886 total
You're right.
gandalfthegreat [mc]# time du -sh src
514M src
real 0m25.159s
gandalfthegreat [mc]# reset_cache
gandalfthegreat [mc]# time bash -c "find src | wc -l"
15261
real 0m7.614s
But find is still slower the du on my spinning disk for the same tree.
> Anyway thats still much faster than your measurements.
Right. Your numbers look reasonable for an SSD.
Since then, I did some more tests and I'm also getting slower than normal
speeds with ext4, an indications that it's a problem with the block layer.
I'm working with some folks try to pin down the core problem, but it looks
like it's not an easy one.
Thanks for your data.
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html