„Oracle Code ONE 2018“ JVM CPU & Memory Settings

Slides:



Advertisements
Similar presentations
Question examples. Session 1 Objectives Why certify? Positioning of the non-technical version What is Java? Key advantages of Java Java Applications vs.
Advertisements

In Production Juan Marin. Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment.
CloudStack Scalability Testing, Development, Results, and Futures Anthony Xu Apache CloudStack contributor.
DEV-13: You've Got a Problem, Here’s How to Find It
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Bonrix SMPP Client. Index Introduction Software and Hardware Requirements Architecture Set Up Installation HTTP API Features Screen-shots.
JA-SIG 12/4/20051 JMX For Monitoring and Maintenance JA-SIG - December 4, 2005 – Atlanta, GA Eric Dalquist Division of Information Technology University.
Running Kuali: A Technical Perspective Ailish Byrne - Indiana University Jay Sissom - Indiana University Foundation.
Conrad Benham Java Opcode and Runtime Data Analysis By: Conrad Benham Supervisor: Professor Arthur Sale.
Settings and properties Sergey Sukhonosov, Dr. Sergey Belov National Oceanographic Data Centre, Russia Training course on establishment of the ODP regional.
Oracle Data Integrator Architecture Components.
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science.
A New Approach to Java Clients Robert Buffone Chief Architect Nexaweb Technologies By
Consulting Services JobScheduler Architecture Decision Template Information for Consulting Parties Information for Consulting Parties.
Running Kuali: A Technical Perspective Ailish Byrne (Indiana University) Jonathan Keller (University of California, Davis)
Challenges and Solutions for Embedded Java Michael Wortley Computer Integrated Surgery March 1, 2001.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
Consulting Services JobScheduler Architecture Decision Template Information for Consulting Parties Information for Consulting Parties.
Common Language Runtime Introduction  The common language runtime is one of the most essential component of the.Net Framework.  It acts.
Build and Deployment Process Understand NCI’s DevOps and continuous integration requirements Understand NCI’s build and distribution requirements.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
JBOSS Online Training. Introduction to JBOSS Red Hat JBoss Middleware leverages community powered enlighten innovation and standalone open source application.
#msitconf. Damien Caro Technical Evangelist Manager, Что будет, если приложение поместить в контейнер? What happens if the application.
Consulting Services JobScheduler Architecture Decision Template
Deployment Architectures For Containers
GlassFish Performance Tuning: Tips from the Field
ONAP/K8S Deployment OOM Team
Before You Begin Nahla Abuel-ola /WIT.
Dockerize OpenEdge Srinivasa Rao Nalla.
CHT Project Progress Report
Consulting Services JobScheduler Architecture Decision Template
Revision Control, Automated Testing and Docker RSE Conference 2017
Dmytro Mykhailov How HashiCorp platform tools can make the difference in development and deployment Target and goal of HashiCorp.
Nano Server in the cloud - some real use cases to take away
Software Architecture in Practice
ONAP/OOM for Developers Michael O’Brien | Amdocs
Acutelearn Best Devops Online Training in Hyderabad Classroom Training Instructor led trainings at Acutelearn premises Corporate Training Custom tailored.
Event driven Microservices with VERT.X & Kubernetes
Kubernetes Container Orchestration
Flight Recorder in OpenJDK
Microservices and Docker
Jose Marcano, Sr. Software Engineer, May 15, 2018
Azure Container Service - the most open container orchestration service yet Saurya Das Program Manager.
Using docker containers
Azure Container Instances
Container technology. Let’s dive into the world of docker and kubernetes Bjarte Brandt, DevOps Architect TV2.
11/27/2018 4:20 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Optimize Your Java Code By Tools
Continuous deployment best practices, methods and tools.
ColdFusion Performance Troubleshooting and Tuning
Adaptive Code Unloading for Resource-Constrained JVMs
Intro about Contanier and Docker Technology
From Source to Production: The Latest in Container Dev
Java History, Editions, Version Features
F II 1. Background Objectives
Inside SQL Server Containers
Testing inside of Kubernetes and Openshift
OpenStack Summit Berlin – November 14, 2018
Kubernetes.
Managing and monitoring SQL Server on Linux from the command line
New GC collectors in Java 11
Java Virtual Machine Profiling. Agenda Introduction JVM overview Performance concepts Monitoring Profiling VisualVM demo Tuning Conclusions.
Building, Debugging & Deploying Containerized
Docker for DBAs SQL Saturday 8/17/2019.
SQL Server Devops with production data
Presentation transcript:

„Oracle Code ONE 2018“ JVM CPU & Memory Settings for docker containers in production DEV6060 Andreas Hochleitner 22.10.2018

Starting questions Orientation and/or background Technical, dev, ops, business, sales, management Which JDK are you using in PRODUCTION 11 10 9 8 (<=u121, <=u131) 7 <7 Who is using … in Production Containers: Docker, LXC, .. Orchestration: Kubernetes, Docker Swarm, Rancher, ..

Java Dev Perspective: impact of production platform to the Java Development No impact Slight impact Huge impact

My professional background Studies Informatics at Technical University Vienna (TU Wien) / Austria 30 years in the IT business Development centric > 20 years Java / JavaEE (J2EE) > 10 years independant consultant as Architect

Current projects Consulting JavaEE-Product Development for Startup (development, process, state-of-the-art) Solution Architect in a large component-oriented Landscape (JavaEE, CI/CD, strong integration aspects) Wildfly / Jenkins / Groovy / Docker / Kubernetes

Prerequisites for this talk Basic Docker Knowhow Basic Kubernetes Knowhow Basis Linux Knowhow

Structure 1 Background – Motivation 2 Overview 3 JDK – 7 8 9 10 11 4 Container-Basis: Docker - K8S 5 Different Aspects with examples Memory CPU Threads 6 Summary

1 Background – Motivation Last JavaOne Session „Java inside docker: What you must know to not FAIL“ Rafael Benevides, Burr Sutter Different articles/blogs about „Don‘t use Java in Containers“ or „How to not fail using Java in Containers“ JDK 9 – special parameters -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap Backported to JDK 8 u131 Master-Agent-Jenkins in OnPrem-Kubernetes ==> OOM Killer Problem

2 Overview Production oriented JDK versions are not arbitrarily choosable Moving existing applications into container directions What you must know? Which problems can occur? How to deal with or fix the problems?

3 JDK – 7 8 9 10 11 Examples are based on OpenJDK from DockerHub OpenJDK 8u121 OpenJDK 8 (8u181) OpenJDK 9 OpenJDK 10 (OpenJDK 11)

4 Container-Basis: Docker - K8S Docker 18.03.1-ce on Linux (Ubuntu 16.04) Kubernetes OnPrem (large K8S-Cluster, Minikube)

Docker – Mini Basics What are Docker Containers Linux cgroups & namespaces Dockerfile „docker build“ „docker run“

Kubernetes – Mini Basics Kubernetes Cluster What is a Pod? Kubectl Manifest-File (yaml-file)

Basic Problem JVM in a container sees Host Settings and not Cgroup-Settings Depending on JDK version OOM Killer (out-of-memory killer)

Different Aspects with examples Memory CPU Threads

JDK 10 Ergonomics Process to improve application performance by JVM and Garbage collection heuristics (behavior-based heuristics) Server class 2 or more physical processors 2 or more GB of physical memory

JDK 10 Ergonomics Server class defaults Similar to other JDKs Garbage-first (G1) collector Inital heap size of 1/64 of physical memory Maximum heap size of ¼ of physical memory Tiered compiler, using both C1 andC2 Similar to other JDKs

JDK 9 Improvements (8 backport) -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap (-XX:MaxRAMFraction=1) With these Settings JVM will use Cgroup-infos, and not Host-infos

JDK 10 Container Support (improvements) Improve docker container detection and resource configuration usage JDK-8146115) -XX:-UseContainerSupport -XX:ActiveProcessorCount=count Allow more flexibility in selecting Heap % of available RAM (JDK-8186248) -XX:InitialRAMPercentage -XX:MaxRAMPercentage -XX:MinRAMPercentage attach in Linux should be relative to /proc/pid/root and namespace aware (JDK-8179498) -XX:+UseContainerSupport is default

JVM Settings for the worst case -XX:ParallelGCThreads -XX:CICompilerCount -Xmx -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap

6 Summary Understand your JVM application Memory Cpu usage Thread counts Analyse & test your concrete JVM in realistic production environment Use up-do-date JDK version (11 → 10 → 9 → 8 → 7) as far it is possible Set JDK/Container/Pod-Settings according to availablilty

Q & A

Thank You! Mail: andreas.hochleitner@hochis.at Twitter: @ahochleitner