1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon
Stephen J Day fd0e24b718
daemon/stats: more resilient cpu sampling
To avoid noise in sampling CPU usage metrics, we now sample the system
usage closer to the actual response from the underlying runtime. Because
the response from the runtime may be delayed, this makes the sampling
more resilient in loaded conditions. In addition to this, we also
replace the tick with a sleep to avoid situations where ticks can backup
under loaded conditions.

The trade off here is slightly more load reading the system CPU usage
for each container. There may be an optimization required for large
amounts of containers but the cost is on the order of 15 ms per 1000
containers. If this becomes a problem, we can time slot the sampling,
but the complexity may not be worth it unless we can test further.

Unfortunately, there aren't really any good tests for this condition.
Triggering this behavior is highly system dependent. As a matter of
course, we should qualify the fix with the users that are affected.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-03-07 13:20:21 -08:00
..
caps Add canonical import comment 2018-02-05 16:51:57 -05:00
cluster Move ImageService to new package 2018-02-26 16:49:37 -05:00
config Add canonical import comment 2018-02-05 16:51:57 -05:00
discovery Add canonical import comment 2018-02-05 16:51:57 -05:00
events Add canonical import comment 2018-02-05 16:51:57 -05:00
exec Add canonical import comment 2018-02-05 16:51:57 -05:00
graphdriver devmapper/Remove(): use Rmdir, ignore errors 2018-03-02 18:10:57 -08:00
images Remove unnecessary GetImageIDAndOS use GetImage 2018-02-26 16:49:37 -05:00
initlayer Add canonical import comment 2018-02-05 16:51:57 -05:00
links Add canonical import comment 2018-02-05 16:51:57 -05:00
listeners Add canonical import comment 2018-02-05 16:51:57 -05:00
logger daemon/logger/ring.go: log error not instance 2018-03-03 16:29:57 +00:00
names Add canonical import comment 2018-02-05 16:51:57 -05:00
network Add canonical import comment 2018-02-05 16:51:57 -05:00
stats daemon/stats: more resilient cpu sampling 2018-03-07 13:20:21 -08:00
testdata Remove libtrust dep from api 2017-09-06 12:05:19 -04:00
apparmor_default.go Add canonical import comment 2018-02-05 16:51:57 -05:00
apparmor_default_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
attach.go Add canonical import comment 2018-02-05 16:51:57 -05:00
auth.go Add canonical import comment 2018-02-05 16:51:57 -05:00
bindmount_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
changes.go c.RWLayer: check for nil before use 2018-02-09 11:24:09 -08:00
checkpoint.go Add canonical import comment 2018-02-05 16:51:57 -05:00
cluster.go Add canonical import comment 2018-02-05 16:51:57 -05:00
commit.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
configs.go Merge configs/secrets in unix implementation 2018-02-16 11:25:14 -05:00
configs_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
container_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container_operations.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container_operations_unix.go Merge configs/secrets in unix implementation 2018-02-16 11:25:14 -05:00
container_operations_windows.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
container_unix_test.go Display a warn message when there is binding ports and net mode is host 2018-02-18 13:28:44 +00:00
container_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
create.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
create_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
create_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
create_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
daemon.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
daemon_linux.go Ensure daemon root is unmounted on shutdown 2018-02-15 15:58:20 -05:00
daemon_linux_test.go Ensure daemon root is unmounted on shutdown 2018-02-15 15:58:20 -05:00
daemon_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
daemon_unix.go Remove duplicate rootFSToAPIType 2018-02-14 11:59:18 -05:00
daemon_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
daemon_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
daemon_windows.go Remove duplicate rootFSToAPIType 2018-02-14 11:59:18 -05:00
daemon_windows_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
delete.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
delete_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
dependency.go Add canonical import comment 2018-02-05 16:51:57 -05:00
disk_usage.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
events.go Image events 2018-02-21 18:26:16 -05:00
events_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
exec.go Add canonical import comment 2018-02-05 16:51:57 -05:00
exec_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
exec_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
export.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
health.go Add canonical import comment 2018-02-05 16:51:57 -05:00
health_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
info.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
info_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
info_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
info_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
inspect.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
inspect_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
inspect_test.go c.RWLayer: check for nil before use 2018-02-09 11:24:09 -08:00
inspect_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
keys.go Add canonical import comment 2018-02-05 16:51:57 -05:00
keys_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
kill.go Add canonical import comment 2018-02-05 16:51:57 -05:00
links.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list.go Remove unnecessary GetImageIDAndOS use GetImage 2018-02-26 16:49:37 -05:00
list_test.go Clean some cli-only integration tests 2018-02-19 11:19:19 +01:00
list_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logdrivers_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logdrivers_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logs.go Move log validator logic after plugins are loaded 2018-02-15 11:53:11 -05:00
logs_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
metrics.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
metrics_unix.go Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins 2018-02-21 12:28:13 +01:00
metrics_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
monitor.go Windows: Remove servicing mode 2018-02-27 08:48:31 -08:00
mounts.go Add canonical import comment 2018-02-05 16:51:57 -05:00
names.go Add canonical import comment 2018-02-05 16:51:57 -05:00
network.go Add canonical import comment 2018-02-05 16:51:57 -05:00
oci_linux.go Merge pull request #33702 from aaronlehmann/templated-secrets-and-configs 2018-02-21 13:39:10 +01:00
oci_linux_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
oci_windows.go Merge pull request #36267 from Microsoft/jjh/removeservicing 2018-02-28 01:15:03 +01:00
pause.go Add canonical import comment 2018-02-05 16:51:57 -05:00
prune.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
reload.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
reload_test.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
reload_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
reload_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
rename.go Add canonical import comment 2018-02-05 16:51:57 -05:00
resize.go Add canonical import comment 2018-02-05 16:51:57 -05:00
restart.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_disabled.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
selinux_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
selinux_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
start.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
start_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
start_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats_collector.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stop.go Add canonical import comment 2018-02-05 16:51:57 -05:00
top_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
top_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
top_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
trustkey.go Add canonical import comment 2018-02-05 16:51:57 -05:00
trustkey_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
unpause.go Add canonical import comment 2018-02-05 16:51:57 -05:00
update.go Add canonical import comment 2018-02-05 16:51:57 -05:00
update_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
update_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
volumes.go Merge pull request #36055 from cpuguy83/slave_mounts_for_root 2018-02-15 12:57:25 +01:00
volumes_linux.go Use rslave propagation for mounts from daemon root 2018-02-07 14:27:09 -05:00
volumes_linux_test.go Use rslave propagation for mounts from daemon root 2018-02-07 14:27:09 -05:00
volumes_unit_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
volumes_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
volumes_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
volumes_windows.go Merge pull request #36055 from cpuguy83/slave_mounts_for_root 2018-02-15 12:57:25 +01:00
wait.go Add canonical import comment 2018-02-05 16:51:57 -05:00
workdir.go Add canonical import comment 2018-02-05 16:51:57 -05:00