docker-micro-benchmark

command
v0.0.0-...-fa18c62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

README

Docker Micro Benchmark

Docker micro benchmark is a tool aimed at benchmarking docker operations which are critical to Kubelet performance, such as docker ps, docker inspect etc.

Description

Docker micro benchmark benchmarks the following docker operations:

  • docker ps [-a]: Kubelet does periodical docker ps -a to detect container state changes, so its performance is crucial to Kubelet.
  • docker inspect: Kubelet does docker inspect to get detailed information of specific container when it finds out a container state is changed. So inspect is also relatively frequent.
  • docker create & docker start: The performance of docker create and docker start are important for Kubelet when creating pods, especially for batch creation.
  • docker stop & docker remove: The same with above.

Docker micro benchmark supports 4 kinds of benchmarks:

  • Benchmark docker ps, docker ps -a and docker inspect with different number of dead and alive containers.
  • Benchmark docker ps, docker ps -a and docker inspect with different operation intervals.
  • Benchmark docker ps -a and docker inspect with different number of goroutines.
  • Benchmark docker create & docker start and docker stop & docker remove with different operation rate limits.

Instructions

Dependencies
  • golang
  • sysstat
  • gnuplot
Build

godep go build k8s.io/contrib/docker-micro-benchmark

Usage

benchmark.sh is the script starting the benchmark.

Usage : benchmark.sh -[o|c|i|r]:

  • -o: Run docker create/start/stop/remove benchmark.
  • -c: Run docker list/inspect with different number of containers. Notice that containers created in this benchmark won't be removed even after benchmark is over. That's intended because creating containers is really slow, it's better to reuse these containers in the following benchmarks. If you want to remove all the containers, just run shell/remove_all_containers.sh.
  • -i: Run docker list/inspect with different operation intervals.
  • -r: Run docker list/inspect with different number of goroutines.

You can run benchmark.sh with multiple options, the script will run benchmark corresponding to each of the options one by one. Notice that it's better to put -c in front of -i and -r, so that they can reuse the containers created in -c benchmark.

Result

After the benchmark finishes, all results will be generated in result/ directory. Different benchmark results locate in different sub-directories.

There are two forms of benchmark result:

  • *.dat: Table formatted text result.
  • *.png: Graph result auto-generated from the text result. Notice that there is no graph for sar result. If you want to analyse the data in sar result, you can use another tool kSar.

Result

Here are links of some previous benchmark results:

TODOs

  • Support event stream benchmark. The old event stream benchmark is removed in this version.
  • Add error statisitcs and sanity check in current benchmarks to analyze docker reliability.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/fsouza/go-dockerclient
Package docker provides a client for the Docker remote API.
Package docker provides a client for the Docker remote API.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/go-units
Package units provides helper function to parse and print size and time units in human-readable format.
Package units provides helper function to parse and print size and time units in human-readable format.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/fsouza/go-dockerclient/external/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix
Package unix contains an interface to the low-level operating system primitives.
Package unix contains an interface to the low-level operating system primitives.
_workspace/src/github.com/fsouza/go-dockerclient/testing
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
_workspace/src/github.com/juju/ratelimit
The ratelimit package provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
The ratelimit package provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL