[Cryptography] sha1sum speed

RB aoz.syn at gmail.com
Sat Apr 30 18:34:10 EDT 2016


On Sat, Apr 30, 2016 at 10:00 AM, Henry Baker <hbaker1 at pipeline.com>
> 'sha1sum' is only modestly faster on a very large file than copying the file.

I am surprised it would be any faster; given a cold page cache, it
should have in fact been exactly the same speed or slightly slower.

> I noticed that
> 1) the cpu meter wasn't pinned at 100%; and
> 2) multiple cores weren't being fully utilized.

You were almost guaranteed to have been more limited by I/O rates than
you were by the speed of your hashing function.  A quick 'openssl
speed sha1' on my AMD A6-5200 shows a single thread on that can
calculate SHA1 faster than all but fast SSDs can provide data.  Using
16B blocks it would handle 140k IO/s (22MB/s), and at 8k blocks it
hits 245MB/s (30k IO/s).


More information about the cryptography mailing list