diff options
author | Lingfu <shanks.cyp@gmail.com> | 2018-09-19 13:34:28 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-19 13:35:42 -0700 |
commit | f0a92b6b67382a1f8da5ef2622c59afdb1c40f13 (patch) | |
tree | 451879158e08d1ad8d08782353e8d95c752ac208 /pkg/tcpip/link/fdbased/endpoint.go | |
parent | bd12e952479dead5adc84a611ee21ab76ce1b100 (diff) |
Add docker command line args support for --cpuset-cpus and --cpus
`docker run --cpuset-cpus=/--cpus=` will generate cpu resource info in config.json
(runtime spec file). When nginx worker_connections is configured as auto, the worker is
generated according to the number of CPUs. If the cgroup is already set on the host, but
it is not displayed correctly in the sandbox, performance may be degraded.
This patch can get cpus info from spec file and apply to sentry on bootup, so the
/proc/cpuinfo can show the correct cpu numbers. `lscpu` and other commands rely on
`/sys/devices/system/cpu/online` are also affected by this patch.
e.g.
--cpuset-cpus=2,3 -> cpu number:2
--cpuset-cpus=4-7 -> cpu number:4
--cpus=2.8 -> cpu number:3
--cpus=0.5 -> cpu number:1
Change-Id: Ideb22e125758d4322a12be7c51795f8018e3d316
PiperOrigin-RevId: 213685199
Diffstat (limited to 'pkg/tcpip/link/fdbased/endpoint.go')
0 files changed, 0 insertions, 0 deletions