Incorrect INFO message about weak hash in v0.12.25

(xor-gate) #1

Syncthing Version: v0.14.25 OS Version: FreeBSD amd64


[monitor] 14:58:05 INFO: Starting syncthing
[EO6VY] 14:58:06 INFO: syncthing v0.14.25 "Dysprosium Dragonfly" (go1.8 freebsd-amd64) 2017-03-09 14:57:12 UTC
[EO6VY] 14:58:06 INFO: Single thread SHA256 performance is 94 MB/s using minio/sha256-simd (69 MB/s using crypto/sha256).
[EO6VY] 14:58:07 INFO: Hashing performance with weak hash is 81.47 MB/s
[EO6VY] 14:58:07 INFO: Hashing performance without weak hash is 91.93 MB/s
[EO6VY] 14:58:07 INFO: Weak hash enabled, as it has an acceptable performance impact.

Expected: Don’t enable weak hash when without is faster?

(Antony Male) #2

The weak hash isn’t there to speed up hashing. It’s there to speed up other things, at the expense of slower hashing.

That’s why it says “as it has an acceptable performance impact”. That is, using weak hashing has a small performance impact on hashing, but it will bring gains, so it’s worth turning it on.

If it had a large impact on hashing performance, then that would outweigh the benefit of the weak hashing, so it would be disabled.

(Jakob Borg) #3

Exactly so. Just to clarify even more, the question is whether we do just SHA256 or SHA256+weakhash, where the latter will always be slower but has other efficiency advantages. If it’s too slow (which it is on some hardware) we skip it.

(xor-gate) #4

Thank you for the clarification.

(deroby) #5

Bit late to react, but I got here looking for the same message as for me it also looks rather … contradictory.

  • I’ll agree that ‘has an acceptable impact’ is the correct wording, but it’s not perfect. I’d rather go for something along the lines of: ‘Weak hash enabled as the benefits outweigh the performance impact.’

  • Additionally, can’t we call ‘weak hash’ something more ‘positive’? Right now it feels like we’re enabling an inferior system and it even costs us performance?!? (**)

My 2 cents, Roby

(**: Yes, I understand that it’s likely the correct technical term, but people reading their logs will get confused. I was =) And googling ‘weak hash’ doesn’t really help much either)

(system) #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.