Discussion:
[Dump-devel] Dump using levels > 0 is extremely slow on big disks.
Andreas Kies
2010-05-06 14:33:14 UTC
Permalink
Hello.

Used version :
dump 0.4b42 (using libext2fs 1.41.11 of 14-Mar-2010)

Level 0 dumps are really fast. But a level 1 dump takes half an hour for
estimation here. CPU load is 100% after a few minutes.
It took me some time to find the bottle neck. Finding directories that need
not to be dumped takes a long time.
By rearranging just one line of code "mapdirs" is speed up by a factor of 100,
at least in my environment. it might not give the same improvement on all
platform, but on ix86 and gcc 4.3 it works great.

Please consider applying this patch.

Best Regards.

Andreas.

--- dump/traverse.c.old 2009-06-18 12:00:38.000000000 +0200
+++ dump/traverse.c 2010-05-06 04:20:34.000000000 +0200
@@ -574,11 +574,11 @@
* in usedinomap, but we have to go through it anyway
* to propagate the nodump attribute.
*/
- nodump = (TSTINO(ino, usedinomap) == 0);
if ((isdir & 1) == 0 ||
- (TSTINO(ino, dumpinomap) && nodump == 0))
+ (TSTINO(ino, dumpinomap) && TSTINO(ino, usedinomap)))
continue;
dp = getino(ino);
+ nodump = (TSTINO(ino, usedinomap) == 0);
#ifdef __linux__
ret = 0;
mdc.ret = &ret;
Stelian Pop
2010-06-10 12:02:28 UTC
Permalink
Post by Andreas Kies
Level 0 dumps are really fast. But a level 1 dump takes half an hour for
estimation here. CPU load is 100% after a few minutes.
It took me some time to find the bottle neck. Finding directories that need
not to be dumped takes a long time.
By rearranging just one line of code "mapdirs" is speed up by a factor of 100,
at least in my environment. it might not give the same improvement on all
platform, but on ix86 and gcc 4.3 it works great.
Hi,

Sorry for the delay, I applied your patch (a little bit modified)
in CVS.

Thanks !

Stelian.
--
Stelian Pop <***@popies.net>
Loading...