Jason Gerlowski created SOLR-18241:
--------------------------------------

             Summary: LoadAverageCircuitBreaker should cache LoadAverage 
measurements
                 Key: SOLR-18241
                 URL: https://issues.apache.org/jira/browse/SOLR-18241
             Project: Solr
          Issue Type: Improvement
          Components: Circuit Breakers
    Affects Versions: 9.10.1, 10.0, main(11.0)
            Reporter: Jason Gerlowski


Each call to LoadAverageCircuitBreaker.isTripped() requests the current system 
load average from the OS.

This is cheap in isolation but quickly gets expensive when done concurrently at 
a decent QPS.  We noticed this recently causing problems in a performance test, 
where LoadAverageCircuitBreaker.isTripped() was accounting for over half of the 
total CPU cycles!

The javadocs for the underlying metric read 
"OperatingSystemMXBean.getSystemLoadAverage()" indicate that the value returned 
represents the average for the past minute.  This is large enough that we 
should be able to take advantage of caching to reduce the number of 
metric-reads being done.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to