-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
This also adds a metric for amount of time spent in GC.
logger.info("Collecting gc %d", i) | ||
gc.collect(i) | ||
end = time.time() * 1000 | ||
gc_time.inc_by(end - start) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be interesting to collect stats about the different levels of collection going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh, yes, good point.
this seems really weird - surely GCs can be very costly with lots of objects, especially for the higher generations? Why would you want to run it on every reactor tick? Wouldn't it be better to bump up the GC thresholds and just have the machine stop the world to GC once every few hours or whatever? |
@ara4n We check if we need to run the GC on each reactor tick, we don't necessarily do so. The check should be equivalent to the one done internally by python |
okay... but what is the rationale for doing so? (aka where are the comments?) |
Sure I can add a comment. It's mainly so that we can get some metrics over how long we spend GC'ing |
aaah! makes much more sense - thanks :) |
d477cee
to
60d53f9
Compare
LGTM. Might want to be careful about merging this to make sure it doesn't end up on one of our servers by accident. |
This also adds a metric for amount of time spent in GC.