|
Message-ID: <ba7e89859ed70667493b92688280139e@smtp.hushmail.com> Date: Fri, 28 Aug 2015 04:55:37 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Long duration formats' many-salts figure incorrect in short benchmarks On 2015-08-18 23:41, Solar Designer wrote: > On Tue, Aug 18, 2015 at 11:31:52PM +0200, magnum wrote: >> [...] the benchmark timer ends before we even get to try the second >> salt even once! > [...] >> Longer runs show better figures (within limits). This problem is with >> "your code", but it never surfaces in non-Jumbo. I'm not sure whether to >> fix this, or how. Should we simply ensure the while loop runs long >> enough for both salts to be tested at least once? Maybe that would end >> up showing a mere 2x boost in this case? Should we ensure the loop does >> all BENCHMARK_MANY virtual salts? But that would likely end up in some >> GPU formats benchmarking for hours... > > Yes, there's this problem with no obviously correct solution. Testing > every salt at least once makes sense to me because we've already done so > during the self-test. This might increase the test+benchmark time by > more than a factor of 2, though, since the self-tests run up to a lower > crypt_all() count argument for most of its invocations. But it > shouldn't be worse than 4x overall. What's worse is that, as you > correctly point out, this might not achieve the full BENCHMARK_MANY > speed, requiring the user to manually increase the benchmark duration to > see that. Days ago, I simply added a warning so at least you'd know. FYI I now added an undocumented hack (I have no intentions to document it): Now if you give the benchmark time as a negative, as in "-test=-1", it will be that time minimum but it will also wait until all salts are tested. $ ../run/john -form:7z -test Will run 8 OpenMP threads Benchmarking: 7z, 7-Zip (512K iterations) [SHA256 128/128 AVX 4x AES]... (8xOMP) DONE Speed for cost 1 (iteration count) of 524288 Warning: "Many salts" test limited: 1/256 Many salts: 94.1 c/s real, 14.6 c/s virtual Only one salt: 91.4 c/s real, 14.6 c/s virtual $ ../run/john -form:7z -test=-1 Will run 8 OpenMP threads Benchmarking: 7z, 7-Zip (512K iterations) [SHA256 128/128 AVX 4x AES]... (8xOMP) DONE Speed for cost 1 (iteration count) of 524288 Many salts: 11538 c/s real, 1853 c/s virtual Only one salt: 94.1 c/s real, 14.6 c/s virtual $ ../run/john -form:oldoffice -test Will run 8 OpenMP threads Benchmarking: oldoffice, MS Office <= 2003 [MD5/SHA1 RC4 32/64]... (8xOMP) DONE Speed for cost 1 (hash type) of 1 and 0 Warning: "Many salts" test limited: 1/256 Many salts: 204800 c/s real, 204800 c/s virtual Only one salt: 204800 c/s real, 204800 c/s virtual $ ../run/john -form:oldoffice -test=-1 Will run 8 OpenMP threads Benchmarking: oldoffice, MS Office <= 2003 [MD5/SHA1 RC4 32/64]... (8xOMP) DONE Speed for cost 1 (hash type) of 1 and 0 Many salts: 2383K c/s real, 371835 c/s virtual Only one salt: 204800 c/s real, 204800 c/s virtual magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.