SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
<Insert Picture Here>
Tiered Compilation
Igor Veresov
Goals
• Server performance
• With client startup
• Adaptive policy with minimal or no machine-
dependent tuning: feedback on compilation queue
length as a measure of machine's speed/compilation
speed
Compilation levels
• level 0 - interpreter
• level 1 - C1 with full optimization (no profiling)
• level 2 - C1 with invocation and backedge counters
• level 3 - C1 with full profiling (level 2 + MDO)
• level 4 - C2
• level 3 doesn't do CEE or BE
• level 3 is 35% slower than level 2
Client is hard to beat
• Client compiles when i + b >= 1500 (level 1), needs
no profiling
• Tiered needs to compile in best case:
– level 3 version and profile (code 35% slower)
– compile level 4 version (compilation is slow)
• Only beneficial for workloads when it's possible to
compensate by producing level 4 version fast
• Fortunately most real word apps (and benchmarks)
are like that (run more than a second with high code
reuse factor).
Profiling
• Profiles stored in MethodDataOop (MDO)
• Existing counters used when not profiling(MethodOop)
• Separate counters in MDO (multiple versions can run
concurrently)
• Can profile at levels 0 and 3
• What: branches, call receiver types, typechecks
(checkcast, instanceof, aastore)
• Periodic runtime notifications.
– Invocations: 0:128, 2:2048, 3:1024,
– Backedges: 0:1024, 2:8192, 3:4096
State transitions I
• Starts at level 0
• Ideally needs to transition to level 3
• Scales threshold based on C1 queue length / number
of C1 threads
• May transition to level 2 based on C2 queue length
(spending too much time in level 3 hurts, 30% slower)
• Can start profiling at level 0
State Transitions II
• Profiling: level 3
• Monitors C2 queue length / number of C2 threads and
scales level 4 threshold
• If the method is trivial (small, nothing to profile)
compiles level 1 version immediately
In-queue optimizations
• Prioritization by (rate + 1) * (i + 1) * (b + 1),
rate = d(i + b) / dt
• And methods after deoptimization have advantage
• Stale methods removal
• In-queue level change (3->2).
Common transition patterns
• 0 -> 3 -> 4 (common).
• 0 -> 2 -> 3 -> 4 (C2 queue too long).
• 0 -> (3->2) -> 4 (in queue change).
• 0 -> 3 -> 1 or 0 -> 2 -> 1 (trivial, or can't compile in
C2).
• 0 -> 4 (can't compile in C1, fully profile in interpreter).
• (1,2,3,4) → 0 (deoptimization)
Level switching predicates
• Regular compile:
i > k1 * scale || i > k2 * scale && i + b > k3 * scale
• OSR: b > k4 * scale
• Profile maturity measured the same way
(scale=ProfileMaturityPercentage/100.0 = 0.2)
• Reprofiling support (additional start counters in MDO)
Performance (8 core x86, 1 C1, 2 C2)
Client vs tiered
benchmark: _227_mtrt
startup: 1.857 1.692 diff: 8.88%
settled: 0.5961 0.4107 diff: 31.10%
benchmark: _202_jess
startup: 4.066 3.615 diff: 11.09%
settled: 1.4405 1.2545 diff: 12.91%
benchmark: _201_compress
startup: 4.781 4.467 diff: 6.56%
settled: 3.9605 3.6429 diff: 8.01%
benchmark: _209_db
startup: 9.719 8.863 diff: 8.80%
settled: 6.2362 6.3588 diff: -1.96%
benchmark: _222_mpegaudio
startup: 2.656 2.424 diff: 8.73%
settled: 2.4167 2.2408 diff: 7.27%
benchmark: _228_jack
startup: 3.737 3.339 diff: 10.65%
settled: 1.7389 1.2857 diff: 26.06%
benchmark: _213_javac
startup: 3.714 3.649 diff: 1.75%
settled: 2.0299 1.6375 diff: 19.33%
Server vs tiered
benchmark: _227_mtrt
startup: 2.014 1.692 diff: 15.98%
settled: 0.4234 0.4107 diff: 2.99%
benchmark: _202_jess
startup: 4.633 3.615 diff: 21.97%
settled: 1.3518 1.2545 diff: 7.19%
benchmark: _201_compress
startup: 4.942 4.467 diff: 9.61%
settled: 4.1837 3.6429 diff: 12.92%
benchmark: _209_db
startup: 9.003 8.863 diff: 1.55%
settled: 6.4088 6.3588 diff: 0.78%
benchmark: _222_mpegaudio
startup: 3.035 2.424 diff: 20.13%
settled: 2.2615 2.2408 diff: 0.91%
benchmark: _228_jack
startup: 4.911 3.339 diff: 32.00%
settled: 1.5041 1.2857 diff: 14.52%
benchmark: _213_javac
startup: 5.681 3.649 diff: 35.76%
settled: 1.7092 1.6375 diff: 4.19%
SPECjvm98, each sub-benchmark ran in a fresh JVM for 20 iterations.
startup – first iteration, settled – average of last 10.

Más contenido relacionado

La actualidad más candente

Apache Impalaパフォーマンスチューニング #dbts2018
Apache Impalaパフォーマンスチューニング #dbts2018Apache Impalaパフォーマンスチューニング #dbts2018
Apache Impalaパフォーマンスチューニング #dbts2018Cloudera Japan
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング佑哉 廣岡
 
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)NTT DATA Technology & Innovation
 
Unified JVM Logging
Unified JVM LoggingUnified JVM Logging
Unified JVM LoggingYuji Kubota
 
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用Motonori Shindo
 
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)NTT DATA Technology & Innovation
 
java.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javajava.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javaYuji Kubota
 
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決オラクルエンジニア通信
 
JVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesJVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesKris Mok
 
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~Shinji Takao
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudNoritaka Sekiyama
 
HBase スキーマ設計のポイント
HBase スキーマ設計のポイントHBase スキーマ設計のポイント
HBase スキーマ設計のポイントdaisuke-a-matsui
 
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)NTT DATA Technology & Innovation
 
Quarkus Technical Deep Dive - Japanese
Quarkus Technical Deep Dive - JapaneseQuarkus Technical Deep Dive - Japanese
Quarkus Technical Deep Dive - JapaneseChihiro Ito
 
Tomcatの実装から学ぶクラスローダリーク #渋谷Java
Tomcatの実装から学ぶクラスローダリーク #渋谷JavaTomcatの実装から学ぶクラスローダリーク #渋谷Java
Tomcatの実装から学ぶクラスローダリーク #渋谷JavaNorito Agetsuma
 
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)NTT DATA Technology & Innovation
 
std::pin の勘所
std::pin の勘所std::pin の勘所
std::pin の勘所Hiroaki Goto
 

La actualidad más candente (20)

Apache Impalaパフォーマンスチューニング #dbts2018
Apache Impalaパフォーマンスチューニング #dbts2018Apache Impalaパフォーマンスチューニング #dbts2018
Apache Impalaパフォーマンスチューニング #dbts2018
 
Native Memory Tracking
Native Memory TrackingNative Memory Tracking
Native Memory Tracking
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング
 
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)
Javaコードが速く実⾏される秘密 - JITコンパイラ⼊⾨(JJUG CCC 2020 Fall講演資料)
 
Unified JVM Logging
Unified JVM LoggingUnified JVM Logging
Unified JVM Logging
 
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
 
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
 
java.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javajava.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷java
 
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
(Tech DeepDive #1) Java Flight Recorder を活用した問題解決
 
JVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesJVM: A Platform for Multiple Languages
JVM: A Platform for Multiple Languages
 
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~
GraalVM を普通の Java VM として使う ~クラウドベンチマークなどでの比較~
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
HBase スキーマ設計のポイント
HBase スキーマ設計のポイントHBase スキーマ設計のポイント
HBase スキーマ設計のポイント
 
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)
JAVA_HOME/binにあるコマンド、いくつ使っていますか?[JVM関連ツール編](JJUGナイトセミナー「Java解析ツール特集」 発表資料)
 
Quarkus Technical Deep Dive - Japanese
Quarkus Technical Deep Dive - JapaneseQuarkus Technical Deep Dive - Japanese
Quarkus Technical Deep Dive - Japanese
 
Tomcatの実装から学ぶクラスローダリーク #渋谷Java
Tomcatの実装から学ぶクラスローダリーク #渋谷JavaTomcatの実装から学ぶクラスローダリーク #渋谷Java
Tomcatの実装から学ぶクラスローダリーク #渋谷Java
 
PostgreSQLの運用・監視にまつわるエトセトラ
PostgreSQLの運用・監視にまつわるエトセトラPostgreSQLの運用・監視にまつわるエトセトラ
PostgreSQLの運用・監視にまつわるエトセトラ
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
 
std::pin の勘所
std::pin の勘所std::pin の勘所
std::pin の勘所
 

Similar a Tiered Compilation in Hotspot JVM

IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudGábor Szárnyas
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on androidKoan-Sin Tan
 
Application Assessment - Executive Summary Report
Application Assessment - Executive Summary ReportApplication Assessment - Executive Summary Report
Application Assessment - Executive Summary ReportCAST
 
Getting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testingGetting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testingRISC-V International
 
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXCassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXVinay Kumar Chella
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming satyajit patra
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
Compiler design
Compiler designCompiler design
Compiler designsowfi
 
SOC Application Studies: Image Compression
SOC Application Studies: Image CompressionSOC Application Studies: Image Compression
SOC Application Studies: Image CompressionA B Shinde
 
Incremental Model Queries for Model-Dirven Software Engineering
Incremental Model Queries for Model-Dirven Software EngineeringIncremental Model Queries for Model-Dirven Software Engineering
Incremental Model Queries for Model-Dirven Software EngineeringÁkos Horváth
 
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)Charl Fontini
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudCeph Community
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudPatrick McGarry
 
Cloud computing_processing frameworks
Cloud computing_processing frameworksCloud computing_processing frameworks
Cloud computing_processing frameworksReem Abdel-Rahman
 
Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design LogsAk
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple dataSyed Zaid Irshad
 
Nokia kpi and_core_optimization
Nokia kpi and_core_optimizationNokia kpi and_core_optimization
Nokia kpi and_core_optimizationdebasish goswami
 

Similar a Tiered Compilation in Hotspot JVM (20)

IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the Cloud
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
 
Application Assessment - Executive Summary Report
Application Assessment - Executive Summary ReportApplication Assessment - Executive Summary Report
Application Assessment - Executive Summary Report
 
Getting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testingGetting started with RISC-V verification what's next after compliance testing
Getting started with RISC-V verification what's next after compliance testing
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
 
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXCassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
Compiler design
Compiler designCompiler design
Compiler design
 
SOC Application Studies: Image Compression
SOC Application Studies: Image CompressionSOC Application Studies: Image Compression
SOC Application Studies: Image Compression
 
Incremental Model Queries for Model-Dirven Software Engineering
Incremental Model Queries for Model-Dirven Software EngineeringIncremental Model Queries for Model-Dirven Software Engineering
Incremental Model Queries for Model-Dirven Software Engineering
 
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)
Vieworks - Hybrid TDI Cameras Technology (Wojciech Majewski)
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
 
Cloud computing_processing frameworks
Cloud computing_processing frameworksCloud computing_processing frameworks
Cloud computing_processing frameworks
 
Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design
 
embedded C.pptx
embedded C.pptxembedded C.pptx
embedded C.pptx
 
Java Decompiler
Java DecompilerJava Decompiler
Java Decompiler
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
 
Nokia kpi and_core_optimization
Nokia kpi and_core_optimizationNokia kpi and_core_optimization
Nokia kpi and_core_optimization
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Tiered Compilation in Hotspot JVM

  • 1. <Insert Picture Here> Tiered Compilation Igor Veresov
  • 2. Goals • Server performance • With client startup • Adaptive policy with minimal or no machine- dependent tuning: feedback on compilation queue length as a measure of machine's speed/compilation speed
  • 3. Compilation levels • level 0 - interpreter • level 1 - C1 with full optimization (no profiling) • level 2 - C1 with invocation and backedge counters • level 3 - C1 with full profiling (level 2 + MDO) • level 4 - C2 • level 3 doesn't do CEE or BE • level 3 is 35% slower than level 2
  • 4. Client is hard to beat • Client compiles when i + b >= 1500 (level 1), needs no profiling • Tiered needs to compile in best case: – level 3 version and profile (code 35% slower) – compile level 4 version (compilation is slow) • Only beneficial for workloads when it's possible to compensate by producing level 4 version fast • Fortunately most real word apps (and benchmarks) are like that (run more than a second with high code reuse factor).
  • 5. Profiling • Profiles stored in MethodDataOop (MDO) • Existing counters used when not profiling(MethodOop) • Separate counters in MDO (multiple versions can run concurrently) • Can profile at levels 0 and 3 • What: branches, call receiver types, typechecks (checkcast, instanceof, aastore) • Periodic runtime notifications. – Invocations: 0:128, 2:2048, 3:1024, – Backedges: 0:1024, 2:8192, 3:4096
  • 6. State transitions I • Starts at level 0 • Ideally needs to transition to level 3 • Scales threshold based on C1 queue length / number of C1 threads • May transition to level 2 based on C2 queue length (spending too much time in level 3 hurts, 30% slower) • Can start profiling at level 0
  • 7. State Transitions II • Profiling: level 3 • Monitors C2 queue length / number of C2 threads and scales level 4 threshold • If the method is trivial (small, nothing to profile) compiles level 1 version immediately
  • 8. In-queue optimizations • Prioritization by (rate + 1) * (i + 1) * (b + 1), rate = d(i + b) / dt • And methods after deoptimization have advantage • Stale methods removal • In-queue level change (3->2).
  • 9. Common transition patterns • 0 -> 3 -> 4 (common). • 0 -> 2 -> 3 -> 4 (C2 queue too long). • 0 -> (3->2) -> 4 (in queue change). • 0 -> 3 -> 1 or 0 -> 2 -> 1 (trivial, or can't compile in C2). • 0 -> 4 (can't compile in C1, fully profile in interpreter). • (1,2,3,4) → 0 (deoptimization)
  • 10. Level switching predicates • Regular compile: i > k1 * scale || i > k2 * scale && i + b > k3 * scale • OSR: b > k4 * scale • Profile maturity measured the same way (scale=ProfileMaturityPercentage/100.0 = 0.2) • Reprofiling support (additional start counters in MDO)
  • 11. Performance (8 core x86, 1 C1, 2 C2) Client vs tiered benchmark: _227_mtrt startup: 1.857 1.692 diff: 8.88% settled: 0.5961 0.4107 diff: 31.10% benchmark: _202_jess startup: 4.066 3.615 diff: 11.09% settled: 1.4405 1.2545 diff: 12.91% benchmark: _201_compress startup: 4.781 4.467 diff: 6.56% settled: 3.9605 3.6429 diff: 8.01% benchmark: _209_db startup: 9.719 8.863 diff: 8.80% settled: 6.2362 6.3588 diff: -1.96% benchmark: _222_mpegaudio startup: 2.656 2.424 diff: 8.73% settled: 2.4167 2.2408 diff: 7.27% benchmark: _228_jack startup: 3.737 3.339 diff: 10.65% settled: 1.7389 1.2857 diff: 26.06% benchmark: _213_javac startup: 3.714 3.649 diff: 1.75% settled: 2.0299 1.6375 diff: 19.33% Server vs tiered benchmark: _227_mtrt startup: 2.014 1.692 diff: 15.98% settled: 0.4234 0.4107 diff: 2.99% benchmark: _202_jess startup: 4.633 3.615 diff: 21.97% settled: 1.3518 1.2545 diff: 7.19% benchmark: _201_compress startup: 4.942 4.467 diff: 9.61% settled: 4.1837 3.6429 diff: 12.92% benchmark: _209_db startup: 9.003 8.863 diff: 1.55% settled: 6.4088 6.3588 diff: 0.78% benchmark: _222_mpegaudio startup: 3.035 2.424 diff: 20.13% settled: 2.2615 2.2408 diff: 0.91% benchmark: _228_jack startup: 4.911 3.339 diff: 32.00% settled: 1.5041 1.2857 diff: 14.52% benchmark: _213_javac startup: 5.681 3.649 diff: 35.76% settled: 1.7092 1.6375 diff: 4.19% SPECjvm98, each sub-benchmark ran in a fresh JVM for 20 iterations. startup – first iteration, settled – average of last 10.