[
https://issues.apache.org/jira/browse/OAK-2613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14636826#comment-14636826
]
Vikas Saurabh commented on OAK-2613:
------------------------------------
Copying
[comment|https://issues.apache.org/jira/browse/OAK-3070?focusedCommentId=14636722&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14636722]
from OAK-3070 about some stats from a test setup.
{panel}
{noformat}
# grep " Version garbage collected in" error.log*
error.log:22.07.2015 02:51:10.195 *INFO* [pool-5-thread-16]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 51.16 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=621383, splitDocGCCount=2448,
intermediateSplitDocGCCount=265, timeToCollectDeletedDocs=3.496 min,
timeTakenToDeleteDocs=47.54 min}
error.log.2015-07-15:15.07.2015 02:34:46.895 *INFO* [pool-5-thread-9]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 34.77 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=557486, splitDocGCCount=2364,
intermediateSplitDocGCCount=257, timeToCollectDeletedDocs=1.735 min,
timeTakenToDeleteDocs=32.74 min}
error.log.2015-07-16:16.07.2015 02:31:47.559 *INFO* [pool-5-thread-11]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 31.79 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=559512, splitDocGCCount=2302,
intermediateSplitDocGCCount=249, timeToCollectDeletedDocs=1.124 min,
timeTakenToDeleteDocs=30.27 min}
error.log.2015-07-17:17.07.2015 02:35:16.096 *INFO* [pool-5-thread-10]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 35.26 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=560226, splitDocGCCount=2351,
intermediateSplitDocGCCount=257, timeToCollectDeletedDocs=1.537 min,
timeTakenToDeleteDocs=33.54 min}
error.log.2015-07-18:18.07.2015 02:52:02.542 *INFO* [pool-5-thread-11]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 42.19 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=556254, splitDocGCCount=2304,
intermediateSplitDocGCCount=245, timeToCollectDeletedDocs=2.341 min,
timeTakenToDeleteDocs=39.02 min}
error.log.2015-07-19:19.07.2015 02:41:59.809 *INFO* [pool-5-thread-14]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 41.98 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=556036, splitDocGCCount=2285,
intermediateSplitDocGCCount=252, timeToCollectDeletedDocs=2.637 min,
timeTakenToDeleteDocs=39.05 min}
error.log.2015-07-20:20.07.2015 02:46:04.002 *INFO* [pool-5-thread-5]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 46.06 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=555721, splitDocGCCount=2320,
intermediateSplitDocGCCount=249, timeToCollectDeletedDocs=2.836 min,
timeTakenToDeleteDocs=42.57 min}
error.log.2015-07-21:21.07.2015 02:45:08.122 *INFO* [pool-5-thread-15]
org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version
garbage collected in 45.12 min. VersionGCStats{ignoredGCDueToCheckPoint=false,
deletedDocGCCount=552140, splitDocGCCount=2267,
intermediateSplitDocGCCount=245, timeToCollectDeletedDocs=3.238 min,
timeTakenToDeleteDocs=41.72 min}
{noformat}
Number of docs getting collected everyday is around half million (there aren't
stats do see how many candidates got fetched). Fetching candidate docs ranged
from ~1min to ~3.5 minutes.
This setup is a 2 node cluster with Mongo backend using Oak-1.3.2. It doesn't
have {{oak.mongo.disableVersionGCIndexHint}} set, so index hint to use deleted
once is being sent.
{panel}
So, the continuous read doesn't quite a take a lot of time (in order of
minutes). Otoh, the longer part of the operation of deleting the documents is
already throttled by the fact that each candidate doc is assessed individually
if it's deletable (and not modified in the mean time) and then removed (ie it's
not a bulk operation)
(cc [~egli], [~chetanm], [~mreutegg])
> Do versionGC more frequently and at adjusted speed
> --------------------------------------------------
>
> Key: OAK-2613
> URL: https://issues.apache.org/jira/browse/OAK-2613
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core, mongomk
> Affects Versions: 1.0.12
> Reporter: Stefan Egli
> Labels: observation, resilience
> Fix For: 1.3.5
>
>
> This is a follow-up ticket from
> [here|https://issues.apache.org/jira/browse/OAK-2557?focusedCommentId=14355322&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14355322]
> 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:
> {quote}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
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)