vvivekiyer commented on code in PR #10373: URL: https://github.com/apache/pinot/pull/10373#discussion_r1124906255
########## pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java: ########## @@ -724,14 +745,14 @@ void killAllQueries() { */ private void killMostExpensiveQuery() { if (!_aggregatedUsagePerActiveQuery.isEmpty() && _numQueriesKilledConsecutively >= _gcTriggerCount) { - System.gc(); _numQueriesKilledConsecutively = 0; + System.gc(); try { - Thread.sleep(_normalSleepTime); + Thread.sleep(_gcWaitTime); } catch (InterruptedException ignored) { } _usedBytes = MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed(); - if (_usedBytes < _criticalLevel) { + if (_usedBytes < _criticalLevelAfterGC) { Review Comment: Would this end up killing more queries than usual? Let's say criticalThreshold=95% usedMemory=96% CriticalLevelAFterGC=80% After performing GC in L749, if the usedMemory=85%, we would end up killing the most expensive query even though the criticalThreshold is 95%. Is that expected? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org