support rsync connection limits per role

Bug #1891117 reported by Paul Collins
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Mirror Charm
Confirmed
High
Unassigned

Bug Description

The rsync connection limit is intended to preserve I/O bandwidth.

Depending on the configuration of the mirror, it may be handling multiple roles with separate and essentially independent I/O subsystems.

In this case it might be useful to tune the rsync limits per role.

This can be done by setting "lock file" to a different value in the module config.

To effectively implement a shared global limit, "lock file" in the global context must be set to a unique value not used by any module with its own connection limit. (See comment #2 below.)

See also LP:1891103 for another bug that may have implications for this.

Haw Loeung (hloeung)
Changed in ubuntu-mirror-charm:
status: New → Confirmed
Haw Loeung (hloeung)
Changed in ubuntu-mirror-charm:
importance: Undecided → High
Revision history for this message
Benjamin Allot (ballot) wrote :

Agreed.

Also, we could either set a "global" limit or a "per module" limit.

Setting a global one could be done using the &merge feature in /etc/rsyncd.conf like

&merge /etc/rsync-juju.d
&include /etc/rsync-juju.d

$ cat /etc/rsync-juju.d/global.inc
[global]
max connections = xxx

Revision history for this message
Paul Collins (pjdc) wrote :

This might work, depending on the "lock file" settings in the various modules.

However, it doesn't work in the apparently obvious manner it may appear, because "max connections" is not a global setting. (There's only a handful of truly global settings in rsync, in fact.)

Setting "max connections" in a global context sets a per-module default.

The connection limit will then use the module's "lock file" setting (also a per-module value), which may be shared with other modules.

To effectively configure a shared global connection limit that can be overridden per module we'd need a final configuration along these lines:

[global]
max connections = X
lock file = /run/shared-global-limit.lock

[module1]
max connections = Y
lock file = /run/module1.lock

[module2]
# shares global limit with other modules

[module3]
max connections = Z
lock file = /run/module3.lock

[module4]
# shares global limit with other modules

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.