Docker v1.12.1+ has severe Mac performance issues
robert-bor opened this issue · comments
Terence found out that Docker for Mac has severe performance hits for DB2:
This is also the case for Postgres.
On applying the following patch to the database driver, the problem dissipates: https://gist.github.com/mkrakauer-rio/e7d9de75f5ac680e790365748ca188a4
cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
cat com.docker.driver.amd64-linux/disk/full-sync-on-flush
# if you see true, continue
echo false > com.docker.driver.amd64-linux/disk/full-sync-on-flush
cat com.docker.driver.amd64-linux/disk/full-sync-on-flush
# you should now see false
git add com.docker.driver.amd64-linux/disk/full-sync-on-flush
git commit -s -m "Disable flushing"
# wait for docker to restart
Unit test truncation now works about five times faster. Truncate table cascade
even about ten times faster.
With the upgrade to Docker for Mac 17.03.0-ce, the patch described above is reverted automatically. It does not seem possible to reinstate it. This means that the problem with slow Docker runs has returned.
Patch with flush-fix.sh
: https://github.com/42BV/docker-for-mac-workarounds