diff mbox series

[bug#49256,3/4] guix.texi: Document wondershaper-service-type.

Message ID 20210628152232.31073-4-ep@stern-data.com
State New
Headers show
Series [bug#49254,1/4] gnu: Add wondershaper. | expand

Commit Message

Aljosha Papsch June 28, 2021, 3:22 p.m. UTC
* doc/guix.texi: Document wondershaper-service-type and
  wondershaper-configuration fields.
---
 doc/guix.texi | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index e71ec70859..14764bfae4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16890,6 +16890,79 @@  See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor
 project's documentation} for more information.
 @end deffn
 
+@cindex Wondershaper
+@defvr {Scheme Variable} wondershaper-service-type
+This is the type for a service that runs
+@uref{https://github.com/magnific0/wondershaper, Wonder Shaper} once
+during boot.  It configures traffic control (tc) with a Hierarchy Token
+Bucket (htb) queue both for upload and download.  For upload three
+classes are added in order to prioritize traffic. Priority 1 is the
+highest priority and priority 3 is the lowest priority.  Interactive
+traffic (e.g. ssh) is designated priority 1, while non-interactive
+traffic is designated priority 2.  Priority 3 is reserved for specially
+configured ports and addresses.  The service is configured using a
+@code{<wondershaper-configuration>} record.  Some options below are not
+found in the original upstream release but are maintained
+@uref{https://github.com/apapsch/wondershaper, in a fork} until merged.
+These options are marked specially.
+
+@end defvr
+
+@deftp {Data Type} wondershaper-configuration
+@table @asis
+@item @code{wondershaper} (default: @code{wondershaper})
+The package that provides Wonder Shaper.  This package is expected to
+provide the script at @file{bin/wondershaper} relative to its output
+directory.  The default package is
+@uref{https://github.com/apapsch/wondershaper, a fork of Wonder Shaper}
+adding more configuration options.
+
+@item @code{interface} (default: @code{"eth0"})
+The interface for which the limits shall be applied.
+
+@item @code{download-speed} (default: @code{2048})
+Maximum download speed in kbits. Tune this parameter to be a bit less than
+your actual download speed.
+
+@item @code{upload-speed} (default: @code{512})
+Maximum upload speed in kbits. Tune this parameter to be a bit less than
+your actual upload speed.
+
+@item @code{prio-3-rate} (default: @code{download-speed * 20 / 100})
+Maximum rate (kbits) for the priority 3 class, which is the lowest priority for
+upload traffic.  In a desktop environment the default computed value
+should suffice, while in a controlled environment you might want to set
+a static value.  This option exists only in the fork!
+
+@item @code{prio-3-ceil} (default: @code{download-speed * 90 / 100})
+Maximum burst rate (kbits) for the priority 3 class.  The same remarks as
+for @code{prio-3-rate} apply. This option exists only in the fork!
+
+@item @code{high-prio-dest} (default: @code{'()})
+List of destination IP addresses for which traffic is designated
+priority 1.  This applies to upload only.  Note that SSH (not SCP), ICMP
+and packets smaller than 64b are automatically designated priority 1 no
+matter the destination address.
+
+@item @code{no-prio-host-src} (default: @code{'()})
+List of source IP addresses for which traffic is designated priority 3.
+This applies to upload only.
+
+@item @code{no-prio-host-dest} (default: @code{'()})
+List of destination IP addresses for which traffic is designated
+priority 3.  This applies to upload only.
+
+@item @code{no-prio-port-src} (default: @code{'()})
+List of source port numbers for which traffic is designated priority 3.
+This applies to upload only.
+
+@item @code{no-prio-port-dest} (default: @code{'()})
+List of destination port numbers for which traffic is designated
+priority 3.  This applies to upload only.
+
+@end table
+@end deftp
+
 The @code{(gnu services rsync)} module provides the following services:
 
 You might want an rsync daemon if you have files that you want available