-
Notifications
You must be signed in to change notification settings - Fork 27
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
Protobuf serialization in Ruby very expensive #12
Comments
Wouldn't be surprised, but I'm pretty much all JVM these days so I haven't hit performance issues personally. If you have alternative suggestions for a protobuf library (or improvements to Beefcake) I'd be open to a PR. |
@smortex I never looked very far at this but beefcake is fairly old at this point. There's the Google protobuf ruby client itself (https://rubygems.org/gems/google-protobuf) from memory and some other alternative gems like https://github.com/ruby-protobuf/protobuf too. |
Looks like https://github.com/ruby-protobuf/protobuf would pretty much a near drop-in replacement assuming we could benchmark it against beefcake. |
Performance of the Protobuf library is slightly better: comparing the test suite "benchmark" (should query quickly, should be threadsafe) before and after the change, we have the following figures: Queries / second: | Protocol | Before | After | Improvement | |:---------|--------:|-------:|------------:| | TLS | 544.38 | 2957.54| 543% | | TCP | 1076.96 | 3688.43| 342% | | UDP | 1282.52 | 3644.92| 284% | Inserts / second: | Protocol | Before | After | Improvement | |:---------|--------:|--------:|------------:| | TLS | 1452.51 | 5155.62 | 354% | | TCP | 2860.25 | 6709.74 | 234% | | UDP | 4834.24 | 8158.35 | 168% |
(#12) Switch from Beefcake to Protobuf
…eabef556baef79 Revert "(#12) Switch from Beefcake to Protobuf"
Reopen since we reverted the change and we must investigate this |
Hey Kyle,
@justinsteffy and I have been hitting performance snags doing 50-100 serializations during the request response cycle. We've identified that most of the time is spent in the
beefcake
library doing protobuf serialization. Have you had any issues with this?The text was updated successfully, but these errors were encountered: