[remote "gerrit-mirror02"]
url = git://localhost:port/gerrit-mirror/repositories/${name}.git
adminUrl = appUsername@box-name.company.com:/path/to/gerrit-mirror/repositories/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
push = +refs/changes/*:refs/changes/*
push = +refs/notes/*:refs/notes/*
push = +refs/meta/*:refs/meta/*
push = +refs/users/*:refs/users/*
push = +refs/starred-changes/*:refs/starred-changes/*
push = +refs/sequences/*:refs/sequences/*
push = +refs/groups/*:refs/groups/*
mirror = true
threads = 5On 22 Oct 2019, at 20:06, Doug Luedtke <douglas...@gmail.com> wrote:We have over a dozen mirrors. I think I have too many refs configured to go to the mirrors. I'm trying to reduce the Gerrit task queue that seems to have more than 100 replication tasks queued throughout the day.
The replication documentation has a part for replication of account data (NoteDb), but it doesn't mention the groups or the basic refs to include. I've added some to use a mirror for a NoteDB backup also. I now want to minimize the number of refs to other mirrors. Any input would be greatly appreciated.We do git tunneling over ssh to save up to 50% of the transport time around the world. The tunneling script runs a autossh command for a list of mirrors.
Example section in the replication config:[remote "gerrit-mirror02"]
url = git://localhost:port/gerrit-mirror/repositories/${name}.git
adminUrl = appUsername@box-name.company.com:/path/to/gerrit-mirror/repositories/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
push = +refs/changes/*:refs/changes/*
push = +refs/notes/*:refs/notes/*
push = +refs/meta/*:refs/meta/*
push = +refs/users/*:refs/users/*
push = +refs/starred-changes/*:refs/starred-changes/*
push = +refs/sequences/*:refs/sequences/*
push = +refs/groups/*:refs/groups/*
mirror = true
threads = 5Which refs can I safely remove and allow users to still clone?
Should I have All-Users as a separate section in the replication config?
Each of the 15 mirrors has its own section in the replication config.Also, we only allow SSH for cloning from the mirrors.
----
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 on the web visit https://groups.google.com/d/msgid/repo-discuss/d2026493-f0f8-4cc4-a6dd-8e9355a23ece%40googlegroups.com.
--
On 22 Oct 2019, at 20:06, Doug Luedtke <douglas...@gmail.com> wrote:We have over a dozen mirrors. I think I have too many refs configured to go to the mirrors. I'm trying to reduce the Gerrit task queue that seems to have more than 100 replication tasks queued throughout the day.How may active repos do you have? How many refs in total per repo?
What are you using the replicas for? CI builds? DR-sites?
The replication documentation has a part for replication of account data (NoteDb), but it doesn't mention the groups or the basic refs to include. I've added some to use a mirror for a NoteDB backup also. I now want to minimize the number of refs to other mirrors. Any input would be greatly appreciated.We do git tunneling over ssh to save up to 50% of the transport time around the world. The tunneling script runs a autossh command for a list of mirrors.The most effective protocol for replication would be Git/HTTPS, however, the Git protocol over SSH Tunnels is the 2nd best choice.Example section in the replication config:[remote "gerrit-mirror02"]
url = git://localhost:port/gerrit-mirror/repositories/${name}.git
adminUrl = appUsername@box-name.company.com:/path/to/gerrit-mirror/repositories/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
push = +refs/changes/*:refs/changes/*
push = +refs/notes/*:refs/notes/*
push = +refs/meta/*:refs/meta/*
push = +refs/users/*:refs/users/*
push = +refs/starred-changes/*:refs/starred-changes/*
push = +refs/sequences/*:refs/sequences/*
push = +refs/groups/*:refs/groups/*
mirror = true
threads = 5Which refs can I safely remove and allow users to still clone?Who is service the Git protocol on the replicas? A simple Git server? A Gerrit slave?
Should I have All-Users as a separate section in the replication config?I believe so, they are a sort of "unusual repos". If you do not have Gerrit slaves service the Git protocol on the mirrors, you may not need them at all.Each of the 15 mirrors has its own section in the replication config.Also, we only allow SSH for cloning from the mirrors.
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-d...@googlegroups.com.
Depending on the amount of ref-updates you are experiencing, having 15 mirrors could be more than you can handle with your current setup (we can only handle about 5 destinations). Do you find that you are WAN limited? Are all 15 mirrors at different sites with different WANs? We avoid having more than one replication entry per site and force the mirrors on each site to share the back end so as to spare the WAN and master loads.
If you already make good use of your WAN, and the master is your limit, then you may want to consider the improvements being proposed to make replication scale better for more destinations by using more masters, see here: https://gerrit-review.googlesource.com/c/homepage/+/239032/8 I suspect the proposed solution would work even if you added masters just for replication,
-Martin
[2019-11-01 09:09:28,133] [] scheduling replication path/to/repository:refs/changes/55/852555/6 => git://localhost:9432/big-instance-mirror/repositories/path/to/repository.git
[2019-11-01 09:09:28,169] [] scheduled path/to/repository:refs/changes/55/852555/meta => [95beb892] push git://localhost:9432/big-instance-mirror/repositories/path/to/repository.git to run after 15s
[2019-11-01 09:09:40,690] [b6bad426] Rescheduling replication to git://localhost:9424/path/to/another/repository.git to avoid collision with the in-flight push [8cc53412].
[2019-11-01 09:09:43,135] [95beb892] Replication to git://localhost:9432/big-instance-mirror/repositories/path/to/repository.git started...
[2019-11-01 09:09:43,135] [95beb892] Push to git://localhost:9432/big-instance-mirror/repositories/path/to/repository.git references: [RemoteRefUpdate[remoteName=refs/changes/55/852555/6, NOT_ATTEMPTED, (null)...SHA1------------------------------------, srcRef=refs/changes/55/852555/6, forceUpdate, message=null], RemoteRefUpdate[remoteName=refs/changes/55/852555/meta, NOT_ATTEMPTED, (null)...SHA1-Another----------------------------, srcRef=refs/changes/55/852555/meta, forceUpdate, message=null]]
[2019-11-01 09:09:43,263] [95beb892] Replication to git://localhost:9432/big-instance-mirror/repositories/path/to/repository.git completed in 128ms, 15001ms delay, 0 retries--
--
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 on the web visit https://groups.google.com/d/msgid/repo-discuss/ecd2140d-322e-405b-b0d2-5db5f1d94e83%40googlegroups.com.
On 2 Nov 2019, at 01:19, mf...@codeaurora.org wrote:I think that yes, with notedb each change upload now has at least two refs to replicate instead of one (I'm not sure if that's the case for each patchset?). These events should get consolidated into a single push assuming that you have a long enough replication delay, but it is a bit more data.
However now every comment, every vote, and every addition of reviewer or ccer will also result in a relationship event. Effectively every state change since there is no DB anymore. I suspect this includes every edit to unpublished comments, every "resolved" comment toggle, etc.. If you have a CI system that marks every patchset, this can add up quickly. I would expect anywhere from 5-20x more replication events with Notedb. While these are likely small events data wise, much of the overhead is the same as with larger data events. Maybe someone using NoteDb can post some data on how many more replication events they see now?
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/d626caad-4c1d-4843-8fb6-793aeb347f12%40email.android.com.
[remote "gerrit-mirror02"]
url = git://localhost:port/gerrit-mirror/repositories/${name}.git
adminUrl = appUsername@box-name.company.com:/path/to/gerrit-mirror/repositories/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
push = +refs/changes/*:refs/changes/*
push = +refs/notes/*:refs/notes/*
push = +refs/meta/*:refs/meta/*
push = +refs/users/*:refs/users/*
push = +refs/starred-changes/*:refs/starred-changes/*
push = +refs/sequences/*:refs/sequences/*
push = +refs/groups/*:refs/groups/*
replicationDelay = 60On 5 Nov 2019, at 19:00, Doug Luedtke <douglas...@gmail.com> wrote:
Thank you, Martin and Luca.I've since tried adding a delay of 60 seconds and I'm not noticing a change in the task queue. We are single master and many mirrors, are there any branches I can eliminate from being replicated? If a branch is not replicated, will the replication still try to replicate the unchanged portion of the repository? For testing the replicationDelay = 60, I only made that change to one of the 15 mirrors.
[remote "gerrit-mirror02"]
url = git://localhost:port/gerrit-mirror/repositories/${name}.git
adminUrl = appUsername@box-name.company.com:/path/to/gerrit-mirror/repositories/${name}.git
push = +refs/heads
/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
push = +refs/changes/*:refs/changes/*
push = +refs/notes/*:refs/notes/*
push = +refs/meta/*:refs/meta/*
push = +refs/users/*:refs/users/*
push = +refs/starred-changes/*:refs/starred-changes/* (*NOT NEEDED*)
push = +refs/sequences/*:refs/sequences/* (*NOT NEEDED*)
push = +refs/groups/*:refs/groups/*
replicationDelay = 60
mirror = true
threads = 5
P.S. you should get some statistics from your replication log and start doing some profiling of the slowest ones. P.S. Do you regularly GC the repos on the slaves also?
On 5 Nov 2019, at 21:36, Doug Luedtke <douglas...@gmail.com> wrote:Which branches contain the comments, votes, reviewers, and non-essential for source code cloning?
What if I eliminated those for the mirrors? Is there documentation about the Gerrit created branches?
--
--
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 on the web visit https://groups.google.com/d/msgid/repo-discuss/174d4c92-8dfb-489e-b0aa-8296bd8cd6c0%40googlegroups.com.
Starting from Gerrit v3.1, thanks to the Git Protocol v2 support, having so many refs won't be a slowdown anymore.Luca.
On 7 Nov 2019, at 18:45, Carbon Robin <douglas...@gmail.com> wrote:Luca,You said refs/starred-changes/* is (* NOT NEEDED *), but the replication plugin documentation shows replication of NoteDB account data requires that branch from the All-Users repository.
Is that only needed for Multi-Master or also for the slave mirrors?
--
--
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 on the web visit https://groups.google.com/d/msgid/repo-discuss/a0a95e27-f68f-4bb7-a934-85d7f9393fb3%40googlegroups.com.
On 7 Nov 2019, at 21:08, Luca Milanesio <luca.mi...@gmail.com> wrote:On 7 Nov 2019, at 18:45, Carbon Robin <douglas...@gmail.com> wrote:Luca,You said refs/starred-changes/* is (* NOT NEEDED *), but the replication plugin documentation shows replication of NoteDB account data requires that branch from the All-Users repository.I believe there is a typo in the documentation: the starred changes is not needed for slaves, as they don't have a GUI.I'll upload a fix on that.