-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
investigate memory utilization post-native engine #4101
Comments
By "main" pants process do you mean the main daemon process? or you are not using daemon? |
@JieGhost the main pants' python2.7 process without the daemon. |
@kwlzn Did python-backed v2 engine also consume that much memory when doing "list ::"? |
@JieGhost looks like the peak memory utilization for a v1 |
@kwlzn I mean v2 engine with python implementation. Not sure if we ever captured that before. But it should be much higher than v1 usage (921 MB), right? |
@JieGhost ah, my bad. yeah, we did capture v2-python timings and iirc, it was roughly the same. we were thinking the native engine would help, but doesn't seem to have moved the needle on mem utilization at all. because of this, I suspect the high memory utilization is coming from the python side of the code vs the native bit. |
I can repro the 7GB mem usage. I checked the mem usage of ExternContext object, in particular, mem usage of _id_to_obj, _obj_to_id and _handles. I use sys.getsizeof method. It seems _id_to_obj and _obj_to_id both uses around 50MB, and _handles uses around 134MB.
This returns around 68MB of size. For _handles, it is around 461MB. One thing I am not sure is whether those referenced objects have further referenced objects. |
This definitely needs to include the transitive references of the object. |
sgtm |
currently, running
./pants --enable-v2-engine list ::
in our monorepo leads to memory utilization of ~7GB in the main pantspython2.7
process on my OSX machine. this is likely problematic for obvious reasons.we'll want to dig into optimizing the memory footprint now that the native engine has landed.
The text was updated successfully, but these errors were encountered: