Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 6d95cf3de40f
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 550e47c687fe
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 15, 2020

  1. nixos/modules/system/boot/networkd: enable socket activation

    Since cd1deda 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.
    andir authored and flokli committed Jun 15, 2020
    Copy the full SHA
    55c09a8 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #89064 from andir/systemd-networkd-socket

    nixos/modules/system/boot/networkd: enable socket activation
    flokli committed Jun 15, 2020
    Copy the full SHA
    550e47c View commit details
    Browse the repository at this point in the history