Page MenuHomePhabricator

Configure h2 cache pruning
Closed, DeclinedPublic

Description

I have spend days to figure out why the caches files were way larger than they should and found a setting to give more time to H2 to compact them on startup. T323754#8419742 We should adjust our config for Gerrit 3.10.

We have -Dh2.maxCompactTime=15000 (milliseconds) it is unclear whether that is still needed. Hopefully the auto pruning has a longer time hardcoded in.

Config: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cachePruning

Event Timeline

cachePruning.startTime defaults to 01:00 and cachePruning.interval defaults to 1d, so Gerrit now prune the cache on a daily basis.

I don't think the startup clean causes much delay on startup, at least not on our instance and in my experience. I thus don't think we need to disable cachePruning.pruneOnStartup.