-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hash/crc32.update is a major CPU hog #255
Comments
hey @majek @eapache what do you think? |
Yes, making crc32 faster could work as well. Relevant: https://issues.apache.org/jira/browse/KAFKA-1449 |
Those are some interesting stats. Providing a dynamic option for hashing is an interesting feature too. For KAFKA-1449 it might be worth building a patch, testing it and then posting results to the https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals process. btw <- LZ4 compression is available now in 0.8.2.0 https://issues.apache.org/jira/browse/KAFKA-1456 & https://issues.apache.org/jira/browse/KAFKA-1493 if you want to give it a try. |
I would be happy to get faster doing CRC32s - when I've benchmarked the producer in the past it showed up as a significant cost there too. It should be done as a separate package though, that code shouldn't live in Sarama proper. |
@eapache I can take a crack at this later this week. |
Instead of disabling CRC checks, we could use this faster implementation: https://github.com/klauspost/crc32 |
When profiling my application, I found that crc32 uses 50% of my CPU resources:
This is being called by real_decoder.go:pop in.check:
While I generally do appreciate sarama verifying checksums by default, I'd like to have a toggle to turn it off. I'd much rather crash once in a while than spend half of my CPU on tedious work.
My app reads about 130k reasonably small requests per second.
The text was updated successfully, but these errors were encountered: