Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@alban
Copy link
Member

@alban alban commented Feb 5, 2016

Allow users to tune net network parameters such as somaxconn.

With this patch, users can add a new network configuration:

> # cat /etc/rkt/net.d/mytuning.conf
> {
>       "name": "mytuning",
>       "type": "tuning",
>       "sysctl": {
>               "net.core.somaxconn": "500"
>       }
> }

Then, start rkt with that configuration file:

> # rkt run --net=default,mytuning /tmp/mycontainer.aci

The value /proc/sys/net/core/somaxconn will be set to 500 in the pod but
will remain unchanged on the host.

Only sysctl parameters that belong to the network subsystem can be
modified.


/cc @slallema: In addition to net.core.somaxconn, is there any other settings that would be useful to let users configure?

/cc @steveej

Fixes #2075

@jonboulle
Copy link
Contributor

omg sieht sehr cool aus

On Fri, Feb 5, 2016 at 6:17 PM, Alban Crequy [email protected]
wrote:

Allow users to tune net network parameters such as somaxconn.

With this patch, users can add a new network configuration:

cat /etc/rkt/net.d/mytuning.conf

{
"name": "mytuning",
"type": "tuning",
"somaxconn": 500
}

Then, start rkt with that configuration file:

rkt run --net=default,mytuning /tmp/mycontainer.aci

The value /proc/sys/net/core/somaxconn will be set to 500 in the pod but

will remain unchanged on the host.

/cc @slallema https://github.com/slallema: In addition to
net.core.somaxconn, is there any other settings that would be useful to
let users configure?

/cc @steveej https://github.com/steveeJ

Fixes #2075 #2075

You can view, comment on, or merge this pull request online at:

#2140
Commit Summary

  • network: network tuning

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#2140.

@slallema
Copy link

slallema commented Feb 5, 2016

@alban very cool that you're working on this :)
there are a few parameters that we tune for now like:

net.ipv4.tcp_fin_timeout
net.ipv4.tcp_keepalive_intvl
net.ipv4.tcp_keepalive_probes
net.core.somaxconn
net.ipv4.tcp_tw_recycle
net.ipv4.tcp_tw_reuse
net.ipv4.tcp_max_syn_backlog

and potentially others.
maybe you could make that part of code generic to be able to write in all paths under /proc/sys/net ?

@alban
Copy link
Member Author

alban commented Feb 5, 2016

@slallema: updated :)

@slallema
Copy link

slallema commented Feb 5, 2016

looks good :)
thanks @alban I will test this

@steveej
Copy link
Contributor

steveej commented Feb 5, 2016

Nice @alban! Do you plan on integrating this to CNI too?

@alban
Copy link
Member Author

alban commented Feb 5, 2016

@steveej yes, since this patch changes the CNI code in Godeps, I'll need to send a PR on CNI first before this can be merged in rkt.

@steveej
Copy link
Contributor

steveej commented Feb 6, 2016

@alban okay let's go that route then

alban added a commit to kinvolk-archives/appc-cni that referenced this pull request Feb 8, 2016
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: rkt/rkt#2140
alban added a commit to kinvolk-archives/appc-cni that referenced this pull request Feb 8, 2016
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: rkt/rkt#2140
@alban
Copy link
Member Author

alban commented Feb 8, 2016

I am suggesting this "tuning" network plugin to CNI: containernetworking/cni#117

alban added a commit to kinvolk-archives/appc-cni that referenced this pull request Feb 17, 2016
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: rkt/rkt#2140
alban added a commit to kinvolk-archives/appc-cni that referenced this pull request Feb 18, 2016
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: rkt/rkt#2140
@iaguis
Copy link
Member

iaguis commented Feb 22, 2016

Pending on containernetworking/cni#117

Allow users to tune net network parameters such as somaxconn.

With this patch, users can add a new network configuration:

> # cat /etc/rkt/net.d/mytuning.conf
> {
> 	"name": "mytuning",
> 	"type": "tuning",
> 	"sysctl": {
> 		"net.core.somaxconn": "500"
> 	}
> }

Then, start rkt with that configuration file:

> # rkt run --net=default,mytuning /tmp/mycontainer.aci

The value /proc/sys/net/core/somaxconn will be set to 500 in the pod but
will remain unchanged on the host.

Only sysctl parameters that belong to the network subsystem can be
modified.
@alban
Copy link
Member Author

alban commented Feb 24, 2016

containernetworking/cni#117 is merged, thanks @steveej

I updated this PR.

@alban alban changed the title RFC: network: network tuning network: add network tuning plugin from CNI Feb 24, 2016
@iaguis
Copy link
Member

iaguis commented Feb 25, 2016

LGTM

iaguis added a commit that referenced this pull request Feb 25, 2016
network: add network tuning plugin from CNI
@iaguis iaguis merged commit 7cd5e37 into rkt:master Feb 25, 2016
squeed pushed a commit to squeed/plugins that referenced this pull request May 15, 2017
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: rkt/rkt#2140
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants