[core] How to obtain memory occupied by object ref?
See original GitHub issueHi, is there an easy way to get the memory occupied by some object ref?
E.g. ray.sizeof(ray.put(object))
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to get object size in memory? [duplicate] - Stack Overflow
One way is to use the GC. GetTotalMemory method to measure the amount of memory used before and after creating your object.
Read more >Managed Objects and References - Apple Developer
References determine when managed objects are released from memory and also affect what causes them to be retained.
Read more >Analyze memory usage by using the .NET Object Allocation tool
View how much memory your app uses and what code paths allocate the most memory by using the .NET Object Allocation tool.
Read more >Measuring Object Sizes in the JVM - Baeldung
5.2. Shallow Size: the Professor Class · Three object references, each of which consumes 4 bytes. So 12 bytes in total for referring...
Read more >How to interpret ray memory results
Once do_calculation returns, the Plasma memory usage goes to 0 objects and 0.0% ... and once ray.get(result_refs) returns and all local references go...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jmoralez I think right now you can obtain the information using
ray.experimental.get_object_locations
. Note that this is an experimental API, and the semantics could be changed.For now, you can achieve this using ray memory command (it is not programmable api tho). I can take a look if there’s a good way to support this.