Bandbreitenlimit für die Übertragung #28

Closed
thorsten.spille wants to merge 0 commits from thorsten.spille/feature-9-bandwidth-limit into main AGit

Setzt #9 um (Wunsch aus GitHub-Issue #2).

Änderung

  • neue Einstellung bandwidth_limit (leer = kein Limit = bisheriges Verhalten), Bytes pro Sekunde mit k/m/g (1024er-Basis), z. B. 10m = 10 MiB/s ≈ 84 Mbit/s
  • ist pv auf dem Backupserver installiert, läuft der Stream bei Erst- und Delta-Replikation durch pv -q -L <limit> zwischen zfs send und zfs receive
  • ohne pv oder bei ungültigem Wert: [WARN], Übertragung ohne Limit
  • der Stream läuft über die Funktion throttle(), damit spätere Änderungen am send-Befehl (Resume, #8) das Limit nicht berühren
  • Paket: Suggests: pv (wird nicht automatisch installiert, da standardmäßig aus)
  • Template, zsync.conf.example, Config-Log, README („Bandwidth limit“), DOCUMENTATION_DE, CHANGELOG

Tests

  • 20-bandwidth (pv in beiden Pipes), 21-bandwidth-no-pv (Warnung, Aufrufe wie bisher), 22-bandwidth-invalid (Warnung) mit pv-Stub
  • alle anderen 19 Szenarien: verändernde Aufrufe identisch zu main
  • mit echtem pv gemessen: 2 × 3 MiB bei 1m → 6,1 s, ohne Limit 0,16 s, alle Bytes empfangen

Closes #9

🤖 Generated with Claude Code

Setzt #9 um (Wunsch aus GitHub-Issue #2). ## Änderung - neue Einstellung `bandwidth_limit` (leer = kein Limit = bisheriges Verhalten), Bytes pro Sekunde mit `k`/`m`/`g` (1024er-Basis), z. B. `10m` = 10 MiB/s ≈ 84 Mbit/s - ist `pv` auf dem Backupserver installiert, läuft der Stream bei Erst- und Delta-Replikation durch `pv -q -L <limit>` zwischen `zfs send` und `zfs receive` - ohne `pv` oder bei ungültigem Wert: `[WARN]`, Übertragung ohne Limit - der Stream läuft über die Funktion `throttle()`, damit spätere Änderungen am send-Befehl (Resume, #8) das Limit nicht berühren - Paket: `Suggests: pv` (wird nicht automatisch installiert, da standardmäßig aus) - Template, `zsync.conf.example`, Config-Log, README („Bandwidth limit“), DOCUMENTATION_DE, CHANGELOG ## Tests - `20-bandwidth` (pv in beiden Pipes), `21-bandwidth-no-pv` (Warnung, Aufrufe wie bisher), `22-bandwidth-invalid` (Warnung) mit pv-Stub - alle anderen 19 Szenarien: verändernde Aufrufe identisch zu `main` - mit echtem `pv` gemessen: 2 × 3 MiB bei `1m` → 6,1 s, ohne Limit 0,16 s, alle Bytes empfangen Closes #9 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Limit the bandwidth of the transfer with pv
All checks were successful
/ build (pull_request) Successful in 25s
/ test (debian-13) (pull_request) Successful in 42s
/ test (ubuntu-24.04) (pull_request) Successful in 45s
/ test (debian-12) (pull_request) Successful in 48s
/ test (ubuntu-26.04) (pull_request) Successful in 48s
/ publish (pull_request) Has been skipped
/ package (pull_request) Successful in 0s
005b53879d
New setting bandwidth_limit (bytes per second with k/m/g, e.g. 10m), empty by
default. If set and pv is installed on the backup server, the stream runs
through "pv -q -L <limit>" between zfs send and zfs receive, for the initial and
the incremental replication. Without pv or with an invalid value the transfer
runs without limit and a warning is logged.

The stream passes the function throttle(), so later changes of the send command
(resume) do not have to touch the limit. pv is suggested by the package.

Tests: scenarios 20 (pv in both pipes), 21 (no pv), 22 (invalid value) with a pv
stub; all other scenarios identical to main. Measured with real pv: 2 x 3 MiB
at 1m took 6.1 s, without limit 0.16 s, all bytes received.

Refs #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Manuell nach main gemergt (e534d53), CI inkl. publish nach testing grün. Schließe den PR.

Manuell nach `main` gemergt (e534d53), CI inkl. publish nach testing grün. Schließe den PR.
thorsten.spille closed this pull request 2026-10-15 21:00:37 +02:00
All checks were successful
/ build (pull_request) Successful in 25s
/ test (debian-13) (pull_request) Successful in 42s
/ test (ubuntu-24.04) (pull_request) Successful in 45s
/ test (debian-12) (pull_request) Successful in 48s
/ test (ubuntu-26.04) (pull_request) Successful in 48s
/ publish (pull_request) Has been skipped
/ package (pull_request) Successful in 0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bashclub/zsync!28
No description provided.