Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2613

Do versionGC more frequently and at adjusted speed



    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.0.12
    • None
    • core, mongomk


      This is a follow-up ticket from here mixed with an offline discussion with mreutegg:

      • we could make the VersionGC play nicely to existing load on the system: it could progress slower if the load is higher and vice-verca. One simple measure could be: if the observation queue is small (eg below 10) then the load is low and it could progress full-speed. Otherwise it could add some artificial sleeping in between.
      • we could run versionGC more regularly than once a day but instead kind of 'continuously' let it run in the background. While the speed of the gc would be adjusted to the load - it also would have to be assured that it doesn't run too slow (and would never finish if instance is under some constant load)

      Note that 'adjusted speed' would also imply some intelligence about the system load, as pointed out by chetanm on OAK-2557:

      Version GC currently ensures that query fired is made against the Secondary (if present). However having some throttling in such background task would be good thing to have. But first we need to have some SystemLoadIndicator notion in Oak which can be provide details say in percentage 1..100 about system load. We can then expose configurable threshold which VersionGC would listen for and adjust its working accordingly.

      It can be a JMX bean which emits notification and we have our components listen to those notification (or use OSGi SR/Events). That can be used in other places like Observation processing, Blob GC etc




            Unassigned Unassigned
            stefanegli Stefan Egli
            0 Vote for this issue
            3 Start watching this issue