Reputation: 504
Will there be any performance impact depending running docker container size?Currently in the existing image in our team, apache logs are getting written with in the container.(not mapped to host volume) Even though I never come across any resource that mention any performance impact promotional to container size. Accepting the fact its not a best practice, will there be any performance impact or docker daemon crashed?
Upvotes: 0
Views: 461
Reputation: 4253
Speaking for my own personal experience, I've been running many containers for about a year now, and have never noticed any negative performance impact from logs filling up the container; that said, here's a helpful article on making sure your logs don't fill up your containers by setting a maximum size for them.
https://nickjanetakis.com/blog/docker-tip-69-avoid-running-out-of-disk-space-from-container-logs
Quote from page:
We can change this by editing the daemon.json
file which is located in /etc/docker
on Linux. On Docker for Windows / Mac you can open up your settings and then goto the "Daemon" tab and flip on the "Advanced" settings.
Add this into your daemon.json to cap your container logs to 10gb (1,000x 10mb files):
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "1000"
}
Then restart Docker and you’ll be good to go.
Upvotes: 1