About cache size

27 views
Skip to first unread message

Z

unread,
4:30 AM (14 hours ago) 4:30 AM
to Repo and Gerrit Discussion
Dear Gerrit Community,

     gerrit version 3.12.4  and  following cache
      git_file_diff-v2.mv.db
      git_modified_files-v2.mv.db
      modified_files-v2.mv.db
       diff_summary-v2.mv.db
       change_kind-v2.mv.db
       web_sessions-v2.mv.db
        gerrit_file_diff-v2.mv.db    

If these caches become unusually large, what problems might that cause?

Thanks.

Matthias Sohn

unread,
4:40 AM (14 hours ago) 4:40 AM
to Z, Repo and Gerrit Discussion
We found that huge persistent h2 caches can lead to OOM errors and that such huge h2 caches
can be caused by offline reindexing the complete changes index.
We mitigated this with https://gerrit-review.googlesource.com/c/gerrit/+/473823 which allows to make persistent
caches read-only during offline reindexing. This feature is available since Gerrit 3.13. 
 
Thanks.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/4b4c7fa0-fb12-41f8-aa65-6fa7b4b673b9n%40googlegroups.com.

Luca Milanesio

unread,
4:55 AM (14 hours ago) 4:55 AM
to Repo and Gerrit Discussion, Luca Milanesio, Z, Matthias Sohn

On 2 Mar 2026, at 09:40, Matthias Sohn <matthi...@gmail.com> wrote:

On Mon, Mar 2, 2026 at 10:30 AM Z <vista...@gmail.com> wrote:
Dear Gerrit Community,

     gerrit version 3.12.4  and  following cache
      git_file_diff-v2.mv.db
      git_modified_files-v2.mv.db
      modified_files-v2.mv.db
       diff_summary-v2.mv.db
       change_kind-v2.mv.db
       web_sessions-v2.mv.db
        gerrit_file_diff-v2.mv.db    

If these caches become unusually large, what problems might that cause?

We found that huge persistent h2 caches can lead to OOM errors and that such huge h2 caches
can be caused by offline reindexing the complete changes index.

Yep,

I have also verified that large H2 caches can be *so slow* that running Gerrit without caches would make it faster, which could be counter-intuitive :-)

We mitigated this with https://gerrit-review.googlesource.com/c/gerrit/+/473823 which allows to make persistent
caches read-only during offline reindexing. This feature is available since Gerrit 3.13. 

+1 indeed.

Also, you may want to use a more efficient cache implementation that doesn’t degrade when the size grows.
See [1].

HTH

Luca.


 
Thanks.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/4b4c7fa0-fb12-41f8-aa65-6fa7b4b673b9n%40googlegroups.com.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Luca Milanesio

unread,
5:49 AM (13 hours ago) 5:49 AM
to Repo and Gerrit Discussion, Luca Milanesio


On 2 Mar 2026, at 10:12, Z <vista...@gmail.com> wrote:

Hi,luca:

 Thank you for your reply.

>>>    If the cache-chroniclemap also becomes very large, could it lead to OOM (Out of Memory)?

Nope, that’s the main difference between H2 and cache-chroniclemap.
See the last talk about Gerrit persistent caches options at [2].

HTH

Luca.



Thank you.



Luca Milanesio 在 2026年3月2日 星期一下午5:55:58 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages