I tested redis container based on. https://index.docker.io/u/dockerfile/redis/
With same redis-benchmark, redis-server runs inside a container much slower, than run
The container appears to be slower because you are going through an extra network layer.
In that case, instead of connecting directly to Redis, to connect to the Docker userland proxy, which itself connects back to the container (and instead of going over a local interface, this connection goes over a veth interface).
This adds a little bit of latency (not measurable compared to, e.g, a 10ms webpage generation; but 50µs is still faster than 150µs, if you see what I mean).
If you want to do a more "apples to apples" comparison, you could: