RFR: 1052: Memory leak in RestRequestCache
erikj at openjdk.java.net
Wed May 26 13:10:02 UTC 2021
On Wed, 26 May 2021 12:55:24 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> That is a good point. In my initial patch I used the scheduling frequency (which is what the watchdog uses) instead of this new configuration value, which is 10 seconds, and it worked fine on staging. I thought that was a bit excessive so I increased to a default of 5 mins, which matches the lowest "maxAge" in the cache.
>> While we could certainly live with a longer interval here, 24h would still solve our problems, I don't think we have much to gain from increasing it longer than my suggested 5 mins. The nature of the bots is that they run pretty much non stop, using a lot of cpu. I can't see how running this little method will have any noticeable impact on performance, even if the cache has thousands or even millions of valid entries. It shouldn't take more than milliseconds on one of 8-32 threads (depending on bot runner config).
>> If we start seeing problems, this value can always be changed in the future, or configured for any specific bot runner configuration.
> Seems OK to me.
Also just to clarify as I realized there was a misunderstanding in offline discussion. This patch is not changing the functional behavior of the cache in any way. The entries that are being removed are just those older than "maxAge", which were already disqualified in the send method.
I have also verified the behavior in staging over night and the metrics show that we have the same amount of cache hits/min with the patch as before.
More information about the skara-dev