nixpkgs/nixos/doc/manual
Andreas Rammhold 55c09a884a nixos/modules/system/boot/networkd: enable socket activation
Since cd1dedac67 systemd-networkd has it's
netlink socket created via a systemd.socket unit. One might think that
this doesn't make much sense since networkd is just going to create it's
own socket on startup anyway. The difference here is that we have
configuration-time control over things like socket buffer sizes vs
compile-time constants.

For larger setups where networkd has to create a lot of (virtual)
devices the default buffer size of currently 128MB is not enough.

A good example is a machine with >100 virtual interfaces (e.g.,
wireguard tunnels, VLANs, …) that all have to be brought up during
startup. The receive buffer size will spike due to all the generated
message from the new interfaces. Eventually some of the message will be
dropped since there is not enough (permitted) buffer space available.

By having networkd start through / with a netlink socket created by
systemd we can configure the `ReceiveBufferSize` parameter in the socket
options without recompiling networkd.

Since the actual memory requirements depend on hardware, timing, exact
configurations etc. it isn't currently possible to infer a good default
from within the NixOS module system. Administrators are advised to
monitor the logs of systemd-networkd for `rtnl: kernel receive buffer
overrun` spam and increase the memory as required.

Note: Increasing the ReceiveBufferSize doesn't allocate any memory.  It
just increases the upper bound on the kernel side. The memory allocation
depends on the amount of messages that are queued on the kernel side of
the netlink socket.
2020-06-16 00:41:41 +02:00
..
administration nixos doc: clarify role of boot.debug1devices 2019-11-13 20:39:11 +01:00
configuration nixos/manual: document use of systemd to mount filesystems (#87684) 2020-05-14 18:00:01 +02:00
development nixos/doc: update stale fn name s/copy_file_from_host/copy_from_host/ 2020-06-01 18:05:58 +10:00
installation manual: use less weird way of installing nixos tools 2020-06-14 10:39:43 +02:00
release-notes nixos/modules/system/boot/networkd: enable socket activation 2020-06-16 00:41:41 +02:00
.gitignore nixos docs: ignore generated files 2018-05-01 19:50:02 -04:00
default.nix nixos manual: have a toc for each part and chapter 2019-10-30 10:25:09 +01:00
Makefile nixos/doc/manual: Fix Makefile 2019-09-06 12:40:06 +02:00
man-configuration.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-build-vms.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-enter.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-generate-config.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-install.xml nixos-install: 'nix build' -> nix-build 2020-05-07 13:12:29 +02:00
man-nixos-option.xml Merge pull request #75439 from Ma27/submodule-fixes-for-nixos-option 2020-02-01 10:00:59 +01:00
man-nixos-rebuild.xml nixos-{rebuild,container}: Use flakeref#attrpath syntax 2020-02-05 23:15:18 +01:00
man-nixos-version.xml nixos-version: Add --json flag and show system.configurationRevision 2020-02-05 23:15:18 +01:00
man-pages.xml nixos/doc+manual: update copyright year range end 2019->2020 2020-01-14 07:01:39 -06:00
manual.xml nixos manual: move preface into own file 2019-10-30 10:25:09 +01:00
preface.xml nixos manual: refer to nix and nixpkgs manuals 2019-10-30 10:25:09 +01:00
README nixos/doc/manual: Fix typos in README. 2014-07-23 15:00:25 +02:00
shell.nix doc: Adds xml fixing script. (see previous and next commits) 2018-05-31 21:02:15 -04:00

To build the manual, you need Nix installed on your system (no need
for NixOS). To install Nix, follow the instructions at

    https://nixos.org/nix/download.html

When you have Nix on your system, in the root directory of the project
(i.e., `nixpkgs`), run:

    nix-build nixos/release.nix -A manual.x86_64-linux

When this command successfully finishes, it will tell you where the
manual got generated.