Re:Containers vs. Zones vs. Jails vs. VMs (2017)
by wmf on Monday April 06, 2020 @06:51PM
(#22798663)
No. Docker volumes aka bind mounts have little or no overhead. You don't want to run a database in an ephemeral "cattle" container without some kind of HA because you'd lose data.
[ Parent
| on HN ]
Re:Containers vs. Zones vs. Jails vs. VMs (2017)
by MuffinFlavored on Tuesday April 07, 2020 @10:34PM
(#22809524)
docker run --rm \
--name postgresql \
-e POSTGRES_PASSWORD=postgres \
-d \
-p 5432:5432 \
--cpuset-cpus="0-1" \
--cpus 2.0 \
-m=1024m \
--mount type=bind,source=$HOME/docker/volumes/postgres,target=/var/lib/postgresql/data \
postgres:12.2
native results on a digitalocean VM: $ pgbench -c 100 -j 2 -T 60 postgres
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 1
query mode: simple
number of clients: 100
number of threads: 2
duration: 60 s
number of transactions actually processed: 17660
latency average = 342.761 ms
tps = 291.748482 (including connections establishing)
tps = 291.791293 (excluding connections establishing)
in a docker container: starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 1
query mode: simple
number of clients: 100
number of threads: 2
duration: 60 s
number of transactions actually processed: 13014
latency average = 466.928 ms
tps = 214.165822 (including connections establishing)
tps = 214.199201 (excluding connections establishing)
214tps in docker, 291tps outside of docker26% decrease, with a bind mount on ubuntu 18.04
Re:Containers vs. Zones vs. Jails vs. VMs (2017)
by takeda on Wednesday April 08, 2020 @02:22AM
(#22810513)
Docker introduces all kinds of performance issues. I for example noticed higher latency even with just pgbouncer. It was very visible when running integration tests, which normally took 15 minutes, but as a container it was 45min - 1h.