Typical Issues with Middleware

Similar documents
How to keep capacity predictions on target and cut CPU usage by 5x

JVM Memory Model and GC

2011 Oracle Corporation and Affiliates. Do not re-distribute!

OS-caused Long JVM Pauses - Deep Dive and Solutions

Kodewerk. Java Performance Services. The War on Latency. Reducing Dead Time Kirk Pepperdine Principle Kodewerk Ltd.

Lesson 2 Dissecting Memory Problems

MEMORY MANAGEMENT HEAP, STACK AND GARBAGE COLLECTION

Java & Coherence Simon Cook - Sales Consultant, FMW for Financial Services

Fundamentals of GC Tuning. Charlie Hunt JVM & Performance Junkie

Java Without the Jitter

Java Performance Tuning From A Garbage Collection Perspective. Nagendra Nagarajayya MDE

NG2C: Pretenuring Garbage Collection with Dynamic Generations for HotSpot Big Data Applications

Application Management Webinar. Daniela Field

Oracle Database and Application Solutions

10/26/2017 Universal Java GC analysis tool - Java Garbage collection log analysis made easy

Attila Szegedi, Software

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Do Your GC Logs Speak To You

JVM and application bottlenecks troubleshooting

The Fundamentals of JVM Tuning

Common Pitfalls in Complex Apps Performance Troubleshooting

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

Diagnostics in Testing and Performance Engineering

White Paper. Major Performance Tuning Considerations for Weblogic Server

Virtualizing JBoss Enterprise Middleware with Azul

Runtime Application Self-Protection (RASP) Performance Metrics

A JVM Does What? Eva Andreasson Product Manager, Azul Systems

Low latency & Mechanical Sympathy: Issues and solutions

G1 Garbage Collector Details and Tuning. Simone Bordet

Oracle VM 3.3. Planning and Implementing

vsphere 4 The Best Platform for Business-Critical Applications Gaetan Castelein Sr Product Marketing Manager VMware, Inc.

Virtualizing Oracle on VMware

Java Memory Management. Märt Bakhoff Java Fundamentals

Insight Case Studies. Tuning the Beloved DB-Engines. Presented By Nithya Koka and Michael Arnold

JVM Troubleshooting MOOC: Troubleshooting Memory Issues in Java Applications

Java performance - not so scary after all

Infrastructure Tuning

Scaling Up Performance Benchmarking

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Practical MySQL Performance Optimization. Peter Zaitsev, CEO, Percona July 02, 2015 Percona Technical Webinars

A Side-channel Attack on HotSpot Heap Management. Xiaofeng Wu, Kun Suo, Yong Zhao, Jia Rao The University of Texas at Arlington

Here, we consider Database bottleneck as a problem and provide solution for some of common problems.

The Garbage-First Garbage Collector

<Insert Picture Here> DBA Best Practices: A Primer on Managing Oracle Databases

Performance & Scalability Testing in Virtual Environment Hemant Gaidhani, Senior Technical Marketing Manager, VMware

THE TROUBLE WITH MEMORY

Concurrent Garbage Collection

Enabling Java in Latency Sensitive Environments

The Business Value of Virtualizing Oracle ebusiness Suite. Haroon Qureshi QSolve, Inc.

CHAPTER 16 - VIRTUAL MACHINES

SPECjAppServer2002 Statistics. Methodology. Agenda. Tuning Philosophy. More Hardware Tuning. Hardware Tuning.

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Java Performance Tuning

1Z Oracle Application Grid 11g Essentials Exam Summary Syllabus Questions

@joerg_schad Nightmares of a Container Orchestration System

Samsung SDS Enterprise Cloud

davidklee.net heraflux.com linkedin.com/in/davidaklee

Using Automated Network Management at Fiserv. June 2012

Java Performance: The Definitive Guide

Low Latency Java in the Real World

WHY SHOULD I USE OVM. For Oracle Databases By Francisco Munoz Alvarez Oracle Professional Services Manager

Future of JRockit & Tools

Introduction. Architecture Overview

Oracle Exadata X7. Uwe Kirchhoff Oracle ACS - Delivery Senior Principal Service Delivery Engineer

High density deployments using Weblogic Multitenancy

Storage Monitoring Made Easy for DBAs: Diagnosing Performance Problems. Senior Product Manager Consulting Member of Technical Staff

Software Architect, Deutsche Bank

HBase Practice At Xiaomi.

Presentation Abstract

JVM Performance Study Comparing Java HotSpot to Azul Zing Using Red Hat JBoss Data Grid

Manjunath Subburathinam Sterling L2 Apps Support 11 Feb Lessons Learned. Peak Season IBM Corporation

EM 12c: Broadest, Most Complete Range of Enterprise Services

Take Your Oracle WebLogic Applications to The Next Level with Oracle Enterprise Manager 12c

Oracle Database 11g: Real Application Testing & Manageability Overview

Don t Dump Thread Dumps. Ram Lakshmanan Founder GCeasy.io & fastthread.io

Enabling Java-based VoIP backend platforms through JVM performance tuning

Oracle Enterprise Architecture. Software. Hardware. Complete. Oracle Exalogic.

Java Performance Tuning and Optimization Student Guide

SAP ENTERPRISE PORTAL. Scalability Study - Windows

Practical MySQL Performance Optimization. Peter Zaitsev, CEO, Percona July 20 th, 2016 Percona Technical Webinars

JVM Memory Management and ColdFusion Log Analysis

Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option

NoSQL Databases MongoDB vs Cassandra. Kenny Huynh, Andre Chik, Kevin Vu

The Z Garbage Collector Scalable Low-Latency GC in JDK 11

What every DBA needs to know about JDBC connection pools Bridging the language barrier between DBA and Middleware Administrators

White Paper Amazon Aurora A Fast, Affordable and Powerful RDBMS

Virtualization and the Metrics of Performance & Capacity Management

ORACLE ENTERPRISE MANAGER 10g ORACLE DIAGNOSTICS PACK FOR NON-ORACLE MIDDLEWARE

Implementation and Evaluation of Moderate Parallelism in the BIND9 DNS Server

CSE 120 Principles of Operating Systems

Virtualizing Oracle 11g/R2 RAC Database on Oracle VM: Methods/Tips

Debugging Your Production JVM TM Machine

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

AppDynamics Lite vs. Pro Edition

2010 (c)2013 OraPub, Inc. This presentation was given by Craig Shallahamer at the NoCOUG conference on 15-AUG-2013.

Oracle Exalogic Elastic Cloud Overview. Peter Hoffmann Technical Account Manager

Oracle JRockit. Performance Tuning Guide Release R28 E

<Insert Picture Here> Exadata MAA Best Practices Series Session #4: Exadata and OLTP Applications

Distributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems

Towards High Performance Processing in Modern Java-based Control Systems. Marek Misiowiec Wojciech Buczak, Mark Buttner CERN ICalepcs 2011

Transcription:

Typical Issues with Middleware HrOUG 2016 Timur Akhmadeev October 2016

About Me Database Consultant at Pythian 10+ years with Database and Java Systems Performance and Architecture OakTable member 3 rd conference as a speaker timurakhmadeev.wordpress.com pythian.com/blog/author/akhmadeev twitter.com/tmmdv timur.akhmadeev@gmail.com

About Pythian 10K+ Systems 400+ People in 200 cities in 35 countries Founded in 1997 Global Leader In IT Transformation And Operational Excellence Unparalleled Expertise Top 5% in Databases, Applications, Infrastructure, Big Data, Cloud, Data Science, and DevOps Unmatched Certifications 9 Oracle ACEs, 4 Oracle ACE Directors, 1 Oracle ACE Associate 6 Microsoft MVPs, 1 Microsoft Certified Master 5 Google Platform Qualified Developers 1 Cloudera Champion of Big Data 1 Mongo DB Certified DBA Associate Level 1 DataStax Certified Partner, 1 MVP Broad Technical Experience Oracle, Microsoft, MySQL, Oracle EBS, Hadoop, Cassandra, MongoDB, virtualization, configuration management, monitoring, trending, and more

Agenda Background Architecture Typical Issues Approach to Troubleshooting

Architecture NOC Net Dev DBA Storage

Typical MW Issues Failures Out of Memory, Crashes Stability Hangs, changes in response times

Typical Reasons of Issues

8 Inefficient Memory Usage

OS Memory Usage Database Still very common to miss HugePages HugePages are a must Lock SGA in memory Reduce OS page tables footprint Reduce sys% CPU time THP have to be disabled

OS Memory Usage Middleware Possible to use HugePages with Java Recommended by Oracle Oracle Commerce MAA Configuration Best Practices, July 2015 Recommended by VMware Large Pages Performance case study Recommended to disable THP

Pre-Java 8 Memory Layout Heap Perm Gen Code Cache Threads, Libs, mmap-ed files, internal structs -Xms10G -Xmx10G Dynamic, app specific -XX:PermSize=256M -XX:MaxPermSize=256M -XX:InitialCodeCacheSize=128M -XX:ReservedCodeCacheSize=128M

Pre-Java 8 Memory Layout Can be allocated in HugePages with -XX:+UseLargePages -Xms10G -Xmx10G Threads, Libs, mmap-ed files, internal structs Dynamic, app specific -XX:PermSize=256M -XX:MaxPermSize=256M -XX:InitialCodeCacheSize=128M -XX:ReservedCodeCacheSize=128M

Java 8 Memory Layout Heap Perm Gen Code Cache Threads, Libs, mmap-ed files, internal structs -Xms10G -Xmx10G Dynamic, app specific -XX:InitialCodeCacheSize=128M -XX:ReservedCodeCacheSize=128M

Java 8 Memory Layout Heap Meta space Code Cache Threads, Libs, mmap-ed files, internal structs -Xms10G -Xmx10G Dynamic, app specific -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256M -XX:InitialCodeCacheSize=128M -XX:ReservedCodeCacheSize=128M

Java 8 Memory Layout Can be allocated in HugePages with -XX:+UseLargePages -XX:+UseLargePagesInMetaspace -XX:-UseCompressedClassPointers -Xms10G -Xmx10G Threads, Libs, mmap-ed files, internal structs Dynamic, app specific -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256M -XX:InitialCodeCacheSize=128M -XX:ReservedCodeCacheSize=128M

Java 8 Memory and HugePages -XX:+UseLargePages If not enough pages, default pages are used For Metaspace in HugePages as well: -XX:+UseLargePagesInMetaspace -XX:-UseCompressedClassPointers

Memory Usage Java Heap Application creates objects in heap Heap is cleaned up automatically Cleaning is called Garbage Collection Major cause of pause time with Java based apps

Memory Usage Java Heap Long GC pause is a result of poor sizing and configuration insufficient heap memory leak application deficiencies May lead to java.lang.outofmemoryerror More OOM https://plumbr.eu/outofmemoryerror

Memory Usage Java Heap Survivor0 (S0) Young Eden Generation Old Generation Survivor1 (S1)

Memory Usage Java Heap

Memory Usage Java Heap

Memory Usage Java Heap

Memory Usage Java Heap High allocation rates in general is not an issue As long as objects become garbage quick enough Short requests are usually easier to handle Long running requests are challenging for GC Those that keep large active data set Large live set is an issue GC takes proportionally more time

High Level Comparison of Collectors Feature ParallelOld mcms G1 Live Data Set Small to Medium Medium to Large Medium to XXL Major GC pauses Up to few secs 50..500ms+ Up to few secs Memory Usage Minimal Medium Large Target Throughput Latency Throughput or Latency Downsides High pause times with large live sets * Fragmentation * Serial Full GC if promotion failure * Complicated * Often it is slower than CMS (yet)

Tools for GC Monitoring GC log + GCViewer / http://gceasy.io jstat: command line, tabular output jstat -gcutil PID 5s 10 jconsole/jvisualvm/jmc

41 Resources Allocation

Memory Allocation

CPU Allocation

Resources Allocation Advice Follow generic sizing rules Do not allocate less than 4 vcpus per JVM Run 1 App Server per VM

Resources Allocation Advice Do not allocate more than 2 node MW cluster If you don t know how many you really need Allocate dedicated instances for critical services Split short & batch tasks between nodes

Resources Allocation Advice Know the limits of an App Server instance concurrent users requests/second traffic/second and /request queries/second and /request garbage/second how big live set could be bottlenecks

Resources Allocation DB Connections Large dynamic connection pools do not work http://www.youtube.com/watch?v=oo-tbpvewp4 http://www.youtube.com/watch?v=xzn8rp6gleo The problem is easy to appear with large MW clusters multiple connection pools to same DB

DB Connections Advice DBCPUs*10/N

49 Optimistic Use of Oracle RAC

Optimistic Use of RAC Clients want RAC because HA & scalable Especially those clients that never had it in-house Expectations are all apps scale well in RAC RAC provides protection from node failures Often licenses are acquired in advance

Optimistic Use of RAC SQL spending time in gc waits App behaves worse than with single instance DB Sometimes clients think it s not enough HW and try to add more nodes to RAC

RAC Advice Treat it as a consolidation platform Use services. Even without RAC! Service Affinity to single node

Optimistic Use of RAC

RAC Advice Using 5y+ HW makes no sense Follow OraCHK recommendations (carefully) Active GridLink with WebLogic https://docs.oracle.com/middleware/1212/wls/jdbca/ gridlink_datasources.htm

57 Unreliable Statistics Management

Typical Statistics Management Default task makes changes in production silently with no change control same effect as testing code in production right away Usually runs way more often than needed Some clients run it manually even more often Histograms by default METHOD_OPT

Histograms By default Oracle creates a histogram when Column is used in SQL condition Skew in the column data distribution

Histograms When App really needs a histogram Column is used in SQL condition Skew in the column data distribution App uses literals in SQL condition Histogram helps SQL to run optimally

All Columns Histogram required Columns with automatically created histograms

Consequences of Histograms As a result of unnecessary histograms Increased number of plans in memory Unnecessary CPU, memory and disk overheads Unexpected plan changes with bind peeking Adaptive features suppose to help sometimes People fix it with different plan stability options Without even trying to analyze the cause

Statistics Management Advice Statistics as a code Do not let Oracle to change your code at random Set statistics as part of the code delivery Fix Min/Max, bad histograms, partition stats, temp tables, new tables, etc. Create histograms manually

64 Inadequate Monitoring and Troubleshooting

Troubleshooting

Minimal Diagnostics OS level metrics GC activity: log and/or jstat Thread Dumps: top + poor man s profiler http://www.pythian.com/blog/a-simple-way-to-monitorjava-in-linux/ jvmtop https://github.com/patric-r/jvmtop SJK https://github.com/aragozin/jvm-tools Heap Dump + Memory Analyzer

Troubleshooting Recommended things to have Application Performance Management software AppDynamics NewRelic Java Flight Recorder JVisualVM

APM

Summary Memory efficiency Start small. Scale up first RAC as a consolidation platform Think and plan stats management Don t just restart. Gather diagnostics.

Thank You! Q & A 73