[轉]Huge performance hit on a simple Go server with Docker
https://www.reddit.com/r/golang/comments/8ojjoj/huge_performance_hit_on_a_simple_go_server_with/
Docker’s disk I/O was the bottleneck!
Solved: Disk I/O was the problem. Even though I’m on Debian 9.4, changing to an in-memory sqlite allowed Docker to push 2.9k reqs/sec. Credits to /u/Willson50 for the amazing find!
With file=dco.sqlite3?mode=memory, Docker can push ~2.9k req/sec.
Other way:
PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;