[Bug 341240] New: Kiwi: MD5 check takes very long if size of RW-image is a prime number
https://bugzilla.novell.com/show_bug.cgi?id=341240 Summary: Kiwi: MD5 check takes very long if size of RW-image is a prime number Product: openSUSE.org Version: unspecified Platform: x86-64 OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: System Imaging AssignedTo: ms@novell.com ReportedBy: Peter.Stark@fujitsu-siemens.com QAContact: adrian@novell.com Found By: --- I was wondering why sometimes booting kiwi took so long. I found that the md5sum check is talking several minutes to complete. The "buildMD5Sum" function is using "factor" to create a blocking factor for the MD5-Test later at boot time in the linuxrc: ----------- Echo "Loading $imageName [$imageDevice]..." gzip -cd $gzippName | dd of=$imageDevice >/dev/null 2>&1 dd if=$imageDevice count=$blocks bs=$blocksize 2>/dev/null |\ md5sum - > /etc/ireal.md5 read sum2 dumy < /etc/ireal.md5 ----------- If the size is a prime number or has factors which are larger than 8192 the result is a blocking factor of "1". During boot it takes *very* long to check the md5sum because dd reads byte after byte from /dev/ram1. First I thought it is not such an issue since the likelihood of it is very low, but it happened to me already >5 times. And it does not go away if the RW-part doesn't change in the next run. As I understand the issue, "dd" needs a to read exactly $blocks * $blocksize bytes to feed "md5sum" correctly. If we'd introduce fixed blocking plus a "head" command: ----------- dd if=$imageDevice bs=1024 2>/dev/null |\ head --bytes=$((blocks * blocksize)) |\ md5sum - > /etc/ireal.md5 ----------- it gets much faster and factoring would become obsolete. We only need the actual size - no more blocks or blocksize. regards, Peter -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=341240#c1
Marcus Schaefer
https://bugzilla.novell.com/show_bug.cgi?id=341240#c2
Peter Stark
https://bugzilla.novell.com/show_bug.cgi?id=341240#c3
--- Comment #3 from Marcus Schaefer
https://bugzilla.novell.com/show_bug.cgi?id=341240#c4
Marcus Schaefer
participants (1)
-
bugzilla_noreply@novell.com