-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Enable automatic garbage collection #9813
Comments
I think another reason is that we want to ensure that the CPU used doing the GC isn't reported as part of a log context? By triggering it manually we can ensure that it happens in the sentinel log context, though that may be possible with the callbacks too. Given the reactor ticks around (hopefully) more frequently than we do GCs, I don't think it makes any difference. |
gc.callbacks
I re-worded this a bit. The task is to stop using manual GC and to switch to the automatic GC. The way to do this is by using |
I'm not sure why we'd want to bother? I don't see what automatic GC will buy us? |
Hah, well that's why I reworded. Is the task here to switch to automatic GC or to switch to using |
#9902 added a |
cc @erikjohnston, regarding the allocation mysteries where python is taking up more memory than it's actually using for objects.
According to @richvdh, the only reason why we're currently using manual GC is because python 2 didn't support
gc.callbacks
, using this to catch metrics instead might slightly improve performance elsewhere, such as in memory pressure and CPU usage, as we're giving cPython the reigns of the garbage collector again.This might need some performance testing.
The text was updated successfully, but these errors were encountered: