-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Ruby: extension types should define a proper memsize
function
#10280
Comments
This makes sense and would be helpful as a whole for debugging and understanding memory usage. We previously investigated implementing Implementing a trivial dsize that reported a large number didn't help trigger more frequent GC so we didn't pursue this further at the time, but this is still useful for profiling memory used by Arena objects. |
That's the same thing.
Yes it's purely for introspection. To notify the GC of allocations, you need to use the ruby malloc functions. |
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606424604
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606424604
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606424604
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606424604
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606718632
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606718632
Fix: #10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes #10291 COPYBARA_INTEGRATE_REVIEW=#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606718632
) Fix: protocolbuffers#10280 This allows Ruby to report a more correct estimation of the memory used by these objects. It's useful when running memory profilers against applications. cc @zhangskz @haberman Closes protocolbuffers#10291 COPYBARA_INTEGRATE_REVIEW=protocolbuffers#10291 from casperisfine:ruby-sizes 9150795 PiperOrigin-RevId: 606718632
Here's an snippet from a Ruby heap dump (generated with
ObjectSpace.dump_all
As you can see, all these
Google::Protobuf::Internal::Arena
instances claim to be 40 bytes, which is obviously a lie.This is because the
memsize
function is not defined:protobuf/ruby/ext/google/protobuf_c/protobuf.c
Line 192 in 520c601
What language does this apply to?
Ruby
Describe the problem you are trying to solve.
I'd like to have a semi-accurate idea of how much memory the
google-protobuf
gem is holding onto.Describe the solution you'd like
I'd like these functions to be defined (
Arena
,Message
, etc). They don't have to be 100% accurate, not particularly fast. It's a debugging facility.Describe alternatives you've considered
I don't see any.
cc @zhangskz because #9384 (comment)
The text was updated successfully, but these errors were encountered: