Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.5.1
-
None
-
Release Note
Description
When running under Docker, even if the set of available CPUs a container can be scheduled on (see --cpuset-cpus, https://docs.docker.com/engine/reference/run/#/runtime-constraints-on-resources) KV-engine does not respect the setting.
This is because the API we use to detect CPUs - sysconf(SC_NPROCESSORS_ONLN) - _always reports the total CPU count on the host machine. An alternative API - sched_getaffinity exists which can be used to interrogate how many CPUs the process is capable of running on. We can essentially treat that as the number of CPU cores available to us (as it would not be possible to run concurrently on more CPUs than the size of that set).
This will improve our out-of-the-box Docker behaviour.
Attachments
Issue Links
- blocks
-
MB-20290 4.6.0 Point Release
- Closed