Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. # Java in Docker pitfalls
  2.  
  3. ---
  4.  
  5. ## Why Java is a special case
  6.  
  7. - JVM ergonomics
  8. - Libraries ergonomics
  9.  
  10. JVM and libraries decide how much memory and how many threads to use.
  11. This decision is based on a host hardware configuration. They are designed to take full advantage of all available resources.
  12.  
  13. ---
  14.  
  15. ## Docker is a leaking abstraction
  16.  
  17. - Docker uses Linux namespaces and cgroups
  18. - In a docker instance, an application can access a host hardware configuration
  19. - Java doesn't know about Docker, cgroups and namespaces (before April 2017)
  20.  
  21. ---
  22.  
  23. ## Memory examples
  24.  
  25. - What if memory limit less than JVM wants to allocate for heap
  26. - What if memory limit is a little bit more than JVM wants to allocate for heap
  27.  
  28. JVM allocates memory for
  29. - Heap
  30. - Metaspace
  31. - Code
  32. - GC
  33. - Threads
  34. - Native objects
  35.  
  36. ---
  37.  
  38. ## CPU examples
  39.  
  40. ---
  41.  
  42. ## Java 9 and Java 8 u131(April 2017)
  43.  
  44. - CPU limits work out of the box
  45. - for a memory, JVM option is still required
  46.  
  47. ---
  48.  
  49. ## Q&A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement