Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SJK Example

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

SJK Example

Avatar for aragozin

aragozin

June 20, 2018
Tweet

More Decks by aragozin

Other Decks in Programming

Transcript

  1. ALIGN TECHNOLOGY, INC 2 Problem • Java server side application

    running in Docker • Growth of response metrics for one of the popular requests it handles • Higher CPU usage compared to daily stats • Existing metrics does not have “per class” precision, hard to identify root cause 99% 95%
  2. ALIGN TECHNOLOGY, INC 3 Why SJK • Does not require

    any special jvm options • Works in Docker (compared to async-profiler by A. Pangin) • Way better than with further manual analysis and transfer back to dev machine for i in {1..15000}; do jstack 1 > $i.stack done
  3. ALIGN TECHNOLOGY, INC 4 Collection and analysis • Ttop just

    to take a look. It shown cpu usage in tomcat threads • Time to sample stacks: • Use --thread-info and --histo for rough overview what do we collected and how to filter out irrelevant info • Build flame graph and meditate java -jar sjk.jar stcap -p 1 -o dump.std -t 60s
  4. ALIGN TECHNOLOGY, INC 5 Findings • Ineffective RSA signature calculation

    on jdk8: https://bugs.openjdk.java.net/browse/JDK-8149554 - Verified with JMH and indeed it’s our case (app does a number of signatures per request) - Fixed with JDK feature flags that enable intrinsics in BigDecimal: -XX:+UseMontgomerySquareIntrinsic -XX:+UseMontgomeryMultiplyIntrinsic • Infrastructure layout issues