• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Docker In Action: performance?

 
Ranch Hand
Posts: 458
Scala jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does using Docker impact performance? Is there an extra 'hop' when using a Docker image?
 
Sheriff
Posts: 7421
504
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe author would find it easier to answer the question if you'd specify "comparing to what?".
 
Author
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The general answer to that question is that a program running inside a container on a Linux container host will observe:

* no cpu and memory access overhead
* potentially measurable, but low networking overhead on the order of 1% or lower for throughput heavy applications
* significant storage write throughput performance impact if using an overlay filesystem... but you probably shouldn't do that because it sounds like you're storing data inside an ephemeral container filesystem; you should probably take a look at Chapter 4 and bind-mount a directory from the host or use a volume instead
 
Saloon Keeper
Posts: 21593
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not whether or not there's an impact. Yes, a Docker container is a virtual environment and it has virtualization overhead. But then, any general-purpose OS has overhead. If 100% hardware efficiency was that important, you'd custom-craft your own system.

But hardware these days is cheap enough that you could literally hand out small systems as party favors, and custom OS design is not, since it requires a great deal of work by specialized developers.

Suffice it to say that I found it more effective in the long run to move my stand-alone OS apps into Docker containers than to leave them free of the Docker overhead.
 
Evacuate the building! Here, take this tiny ad with you:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!