Thanks.Br,Yingchun--
--
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/2cedbeec-d6d3-466d-bece-62ef86c62a5cn%40googlegroups.com.
On Thu, Jun 19, 2025 at 5:40 AM Yingchun Li <sword.l...@gmail.com> wrote:Hi,When I using `ssh xxx gerrit show-caches`, s, I noticed a very low cache hit ratio for change_notes:ssh -p 29418 localhost gerrit show-cachesGerrit Code Review 3.10.5 now 11:10:21 UTC
uptime 11 days 6 hrs
Name |Entries | AvgGet |Hit Ratio|
| Mem Disk Space| |Mem Disk|
--------------------------------+---------------------+---------+---------+
adv_bases | | | 93% |
change_notes | 147 | 610.7us | 20% |...However, I couldn't find the default value for change_notes in the documentation and am unsure how to set this value. Could you please provide some advice?Sorry that's missing from the docs, I'll get that added today. The default is 10MiB for the memory limit and by default the disk cache is disabled. The sizing is based on the size of each ChangeNotes object, which varies based on the size of the change (# of patch sets, # of reviewers, # of comments, etc). I would recommend the memoryLimit of this cache should be set large enough to at least fit all changes being accessed (via web UI, SSH/REST APIs, and git) concurrently. That will help ensure there are no scenarios where a cache entry is loaded and then evicted before a single request is completed. If you want to use some disk space, you could set the diskLimit to something larger than the memoryLimit and that will help for cases where other recently loaded changes are accessed again.
On Friday, June 20, 2025 at 12:32:33 AM UTC+8 Nasser Grainawi wrote:On Thu, Jun 19, 2025 at 5:40 AM Yingchun Li <sword.l...@gmail.com> wrote:Hi,When I using `ssh xxx gerrit show-caches`, s, I noticed a very low cache hit ratio for change_notes:ssh -p 29418 localhost gerrit show-cachesGerrit Code Review 3.10.5 now 11:10:21 UTC
uptime 11 days 6 hrs
Name |Entries | AvgGet |Hit Ratio|
| Mem Disk Space| |Mem Disk|
--------------------------------+---------------------+---------+---------+
adv_bases | | | 93% |
change_notes | 147 | 610.7us | 20% |...However, I couldn't find the default value for change_notes in the documentation and am unsure how to set this value. Could you please provide some advice?Sorry that's missing from the docs, I'll get that added today. The default is 10MiB for the memory limit and by default the disk cache is disabled. The sizing is based on the size of each ChangeNotes object, which varies based on the size of the change (# of patch sets, # of reviewers, # of comments, etc). I would recommend the memoryLimit of this cache should be set large enough to at least fit all changes being accessed (via web UI, SSH/REST APIs, and git) concurrently. That will help ensure there are no scenarios where a cache entry is loaded and then evicted before a single request is completed. If you want to use some disk space, you could set the diskLimit to something larger than the memoryLimit and that will help for cases where other recently loaded changes are accessed again.There are other entries dont have default value:conflicts, mergeability, change_kind.Thanks a lot.
"adv_bases": default is 4096
"git_modified_files": default is 10m (10 MiB of memory)
...
"change_notes": disk storage is disabled by default
"diff_summary": default is 1g (1 GiB of disk space)
...
--NasserThanks.Br,Yingchun--
--
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/2cedbeec-d6d3-466d-bece-62ef86c62a5cn%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.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/5701ff78-c459-46b0-8efb-8b2cf4c4066en%40googlegroups.com.
On Fri, Jun 20, 2025 at 5:16 AM Yingchun Li <sword.l...@gmail.com> wrote:On Friday, June 20, 2025 at 12:32:33 AM UTC+8 Nasser Grainawi wrote:On Thu, Jun 19, 2025 at 5:40 AM Yingchun Li <sword.l...@gmail.com> wrote:Hi,When I using `ssh xxx gerrit show-caches`, s, I noticed a very low cache hit ratio for change_notes:ssh -p 29418 localhost gerrit show-cachesGerrit Code Review 3.10.5 now 11:10:21 UTC
uptime 11 days 6 hrs
Name |Entries | AvgGet |Hit Ratio|
| Mem Disk Space| |Mem Disk|
--------------------------------+---------------------+---------+---------+
adv_bases | | | 93% |
change_notes | 147 | 610.7us | 20% |...However, I couldn't find the default value for change_notes in the documentation and am unsure how to set this value. Could you please provide some advice?Sorry that's missing from the docs, I'll get that added today. The default is 10MiB for the memory limit and by default the disk cache is disabled. The sizing is based on the size of each ChangeNotes object, which varies based on the size of the change (# of patch sets, # of reviewers, # of comments, etc). I would recommend the memoryLimit of this cache should be set large enough to at least fit all changes being accessed (via web UI, SSH/REST APIs, and git) concurrently. That will help ensure there are no scenarios where a cache entry is loaded and then evicted before a single request is completed. If you want to use some disk space, you could set the diskLimit to something larger than the memoryLimit and that will help for cases where other recently loaded changes are accessed again.There are other entries dont have default value:conflicts, mergeability, change_kind.Thanks a lot.https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cache.name.memoryLimit says:Default is 1024 for most caches, except:
"adv_bases": default is 4096
"git_modified_files": default is 10m (10 MiB of memory)
...