From 0b6ad716e8ac5b3eca041cb612bbc629e6f0c132 Mon Sep 17 00:00:00 2001 From: Alban Crequy Date: Mon, 8 Feb 2016 23:28:15 +0100 Subject: [PATCH] new plugin: tuning Allow users to tune net network parameters such as somaxconn. With this patch, users can add a new network configuration: > { > "name": "mytuning", > "type": "tuning", > "sysctl": { > "net.core.somaxconn": "500" > } > } The value /proc/sys/net/core/somaxconn will be set to 500 in the network namespace but will remain unchanged on the host. Only sysctl parameters that belong to the network subsystem can be modified. Related to: https://github.com/coreos/rkt/pull/2140 --- tuning.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tuning.md diff --git a/tuning.md b/tuning.md new file mode 100644 index 00000000..bc786d88 --- /dev/null +++ b/tuning.md @@ -0,0 +1,36 @@ +# tuning plugin + +## Overview + +This plugin can change some system controls (sysctls) in the network namespace. +It does not create any network interfaces and therefore does not bring connectivity by itself. +It is only useful when used in addition to other plugins. + +## Operation +The following network configuration file +``` +{ + "name": "mytuning", + "type": "tuning", + "sysctl": { + "net.core.somaxconn": "500" + } +} +``` +will set /proc/sys/net/core/somaxconn to 500. +Other sysctls can be modified as long as they belong to the network namespace (`/proc/sys/net/*`). + +A successful result would simply be: +``` +{ + "cniVersion": "0.1.0" +} +``` + +## Network sysctls documentation + +Some network sysctls are documented in the Linux sources: + +- [Documentation/sysctl/net.txt](https://www.kernel.org/doc/Documentation/sysctl/net.txt) +- [Documentation/networking/ip-sysctl.txt](https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt) +- [Documentation/networking/](https://www.kernel.org/doc/Documentation/networking/)