SlideShare a Scribd company logo
1 of 16
Hyojeong Lee
Distributed Computing System Laboratory
Department of Computer Science and Engineering
Seoul National University, Korea
Progress Report
● Swap-aware JVM GC policy
● Parallel logging
Table of Contents
● Motivation
● Necessity of swapping
● Performing memory-intensive workloads such as deep learning algorithm,
the size of generated data is large and unpredictable.
● Current GC policy is not aware of swapping.
● ParallelCompact, default GC policy of Java8 do not consider whether data
is swapped.
● Swap I/O by processing swapped data results in long GC time.
● For examples,
● SVD++ in Sparkbench (swap I/O & execution time)
Motivation
Swap I/O occurs when…
dense_prefix
Swap space
● Features
● High Memory usage
● High Locality
(So, there is compaction for swapped data.)
● Target workloads
● Simple java program for validation
● Java benchmarks
● DaCapo, SPECjvm2008, JOlden, Hyracks
● Real workloads
● Neo4j, Spark, Deeplearning4Java
Targets
● Solutions
● Swap-aware GC policy
● (Fine-grained) Checking pagemap → Inserting DS maintaining
swap info
● (Coarse-grained) Adding reference counter + LRU list
● Optimized GC policy (TODO)
Solutions
dense_prefix
Virtual (heap)
Physical (kernel)
Actually, no need to compact
→ Just remapping virtual space!
● Implementation scheme
Swap-aware JVM GC Policy
dense_prefix
Swap space Swapped live data
Process of Full GC
1. Mark
2. Summarize
3. Compact
Assume that,
- Swapped region =
LRU → Do not need to
swapin.
source_reg
dest_addr
live_size
…
512k
Metadata of Region
Bitmap
1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
Add variable
‘_swpness’ &
check it using
pagemap
1. Mark
: Set bit for live object by
tracking root set
2. Summarize
: Fill metadata & set
dense prefix
3. Compact
: push_region to stack → do sliding
compaction (memcpy)
…
Region stack list
Region stacks for each GC thread
When src’s _swpness > 0,
skip pushing/copying
draining and
stealing over
stacks
● Attempts
1. Can’t skip entire memcpy.
2. ‘Validation after GC error’ because of wrong metadata.
3. DOING
● Evaluation
● Simple java program (microbench)
● Make swapped objects target for compaction
● Benchmarks (benchmark)
● DaCapo, SPECjvm2008, JOlden, Hyracks
● Neo4j (real workload)
● embedded, disk-based, fully transactional Java persistence engine that
manages graph data
● Spark (real workload)
● Sparkbench’s Graph-computation & Machine-learning algorithm
● Deeplearning4Java (real workload)
● Deep learning platform for Java
Swap-aware JVM GC Policy
● Kernel(page) level: Swap flag - Attempt (1)
● Evaluation w/ Simple java program
● Simple java program
● Make swapped objects target for compaction
● Result
Swap-aware JVM GC Policy
Allocate 30
objects
Allocate 10 objects
(objects 0 to 9 are
swapped out)
Access 0 to 9 (objects 10 to
19 are swapped out)
&
Make null objects 0 to 9 (be
GC targets)
GC triggered, do mark and
summarize (checking swpness
consumes about 24 sec)
Do compact
Allocate 30
objects
Allocate 10 objects
(objects 0 to 9 are
swapped out)
Access 0 to 9 (objects 10 to
19 are swapped out)
&
Make null objects 0 to 9 (be
GC targets)
GC triggered, do mark and
summarize & Do compact
● Kernel(page) level: Swap flag - Attempt (2)
● Evaluation w/ Simple java program
Swap-aware JVM GC Policy
● Kernel(page) level: Swap flag - Attempt (2)
● Evaluation w/ Simple java program
Swap-aware JVM GC Policy
● Kernel(page) level: Swap flag - Attempt (2)
● Evaluation w/ DL4J
● Object Detection: House Number Detection
● Dataset: http://ufldl.stanford.edu/housenumbers/
● 73,257 digit images for training
● 26,032 digit images for testing
● 531,131 additional, somewhat less difficult samples, to use as
extra training data
● Result
● Baseline (DONE)
● Iteration for training: 100 times
● FGC: 2 times
● Memory usage: ~ 9 GB
● Optimized (TODO)
Swap-aware JVM GC Policy
● Swap-aware JVM GC policy
● ~ 02.28
● Complete page level solution
● Validation with real workloads (DL4J, Spark)
● Compare with existing GC policies
● Plan for optimized GC policy
● Parallel logging
● ~ 02.28
● Parallel logging on Lustre file system
● Improve paper: An Efficient Journaling Mechanism in Lustre
File System for Fast Storage Devices
TODO (outline)
Backup slides
(cf) JVM GC policies
# Policy
Copy swapped
obj
Traverse for
allocation
Other issues etc
1
Concurrent Mark
and Sweep (CMS)
X O
Floating garbage /
More logics to deal with fragmentation /
More space for list
long-lived obj 비율 높고 pause
time 제약 있는 앱에 적합
2 Parallel Compact O X X
pause time 제약 있는 앱에 적합
default in java 8
3 Garbage first (G1) O X X default in java 9
4
SAGP (Swap-
aware Parallel
Compact)
X X
Floating garbage /
Check pagemap (fopen, close) /
More fragmentation
기존 allocation 정책 그대로 사용
가능
커널의 swap 정보를 역으로 읽어
올 수 있으면 오버헤드 제거 가능
https://docs.google.com/presentation/d/1rLyJyny7NMmSLpd9f_z_arjzzngL4bxjAbgo0d5Lnik/edit?usp=sharing
Swap-aware JVM GC Policy
Allocate 30
objects
Allocate 10 objects
(objects 0 to 9 are
swapped out)
Access 0 to 9 (objects 10 to
19 are swapped out)
&
Make null objects 0 to 9 (be
GC targets)
GC triggered, do mark and
summarize (checking swpness
consumes about 24 sec)
Do compact
Allocate 30
objects
Allocate 10 objects
(objects 0 to 9 are
swapped out)
Access 0 to 9 (objects 10 to
19 are swapped out)
&
Make null objects 0 to 9 (be
GC targets)
GC triggered, do mark and
summarize & Do compact
Comments:
- 최적화 전(오른쪽) / 후(왼쪽) 이며, 각 GC 스텝은 빨간색 화살표로 표기
- 현재 미완성 버전은 모든 swapped region을 skip하지 못하지만, 일차적으로 베이스라인과 성능을 비교해본 결과,
- Swap I/O: swapin 약 300mb 감소 / swapout 약 600mb 감소
- Execution time: 약 15초 증가
- 최적화 완료 후에는 swapin/out 각각 10gb 이상 감소할 것으로 예상
- 따라서, 실행 시간이 증가한 것은 check_swpness가 24초 가량 소요됨을 감안하면 최적화 완료 후 개선의 여지가 있
음
swapin (mb) swapout (mb) total time (sec)
optimized 31109 41253 180
baseline 31411 41866 165

More Related Content

What's hot

H2O World - GLM - Tomas Nykodym
H2O World - GLM - Tomas NykodymH2O World - GLM - Tomas Nykodym
H2O World - GLM - Tomas NykodymSri Ambati
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015Jeff McKenna
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalCodemotion Tel Aviv
 
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big DataPingCAP
 
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander KukushkinPGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander KukushkinEqunix Business Solutions
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011Jeff McKenna
 
Fight with Metaspace OOM
Fight with Metaspace OOMFight with Metaspace OOM
Fight with Metaspace OOMLeon Chen
 
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganShared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganHazelcast
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJoseph Kuo
 
Community Update at OpenStack Summit Boston
Community Update at OpenStack Summit BostonCommunity Update at OpenStack Summit Boston
Community Update at OpenStack Summit BostonSage Weil
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsJoseph Kuo
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Odinot Stanislas
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展Leon Chen
 
WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010Jeff McKenna
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internalsKostas Tzoumas
 
Ceph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldCeph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldSage Weil
 
(JVM) Garbage Collection - Brown Bag Session
(JVM) Garbage Collection - Brown Bag Session(JVM) Garbage Collection - Brown Bag Session
(JVM) Garbage Collection - Brown Bag SessionJens Hadlich
 

What's hot (20)

H2O World - GLM - Tomas Nykodym
H2O World - GLM - Tomas NykodymH2O World - GLM - Tomas Nykodym
H2O World - GLM - Tomas Nykodym
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, Tikal
 
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data
[Paper Reading]Orca: A Modular Query Optimizer Architecture for Big Data
 
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander KukushkinPGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
 
Java GC, Off-heap workshop
Java GC, Off-heap workshopJava GC, Off-heap workshop
Java GC, Off-heap workshop
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011
 
Fight with Metaspace OOM
Fight with Metaspace OOMFight with Metaspace OOM
Fight with Metaspace OOM
 
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorganShared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
Shared Memory Performance: Beyond TCP/IP with Ben Cotton, JPMorgan
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of Java
 
Community Update at OpenStack Summit Boston
Community Update at OpenStack Summit BostonCommunity Update at OpenStack Summit Boston
Community Update at OpenStack Summit Boston
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internals
 
Ceph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldCeph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud world
 
(JVM) Garbage Collection - Brown Bag Session
(JVM) Garbage Collection - Brown Bag Session(JVM) Garbage Collection - Brown Bag Session
(JVM) Garbage Collection - Brown Bag Session
 

Similar to Progress_190213

Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...
Paper_An Efficient Garbage Collection in Java Virtual  Machine via Swap I/O O...Paper_An Efficient Garbage Collection in Java Virtual  Machine via Swap I/O O...
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...Hyo jeong Lee
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Anatomy of in memory processing in Spark
Anatomy of in memory processing in SparkAnatomy of in memory processing in Spark
Anatomy of in memory processing in Sparkdatamantra
 
It's Time To Stop Using Lambda Architecture
It's Time To Stop Using Lambda ArchitectureIt's Time To Stop Using Lambda Architecture
It's Time To Stop Using Lambda ArchitectureYaroslav Tkachenko
 
Scala & Spark(1.6) in Performance Aspect for Scala Taiwan
Scala & Spark(1.6) in Performance Aspect for Scala TaiwanScala & Spark(1.6) in Performance Aspect for Scala Taiwan
Scala & Spark(1.6) in Performance Aspect for Scala TaiwanJimin Hsieh
 
TeraCache: Efficient Caching Over Fast Storage Devices
TeraCache: Efficient Caching Over Fast Storage DevicesTeraCache: Efficient Caching Over Fast Storage Devices
TeraCache: Efficient Caching Over Fast Storage DevicesDatabricks
 
Scaling up wso2 bam for billions of requests and terabytes of data
Scaling up wso2 bam for billions of requests and terabytes of dataScaling up wso2 bam for billions of requests and terabytes of data
Scaling up wso2 bam for billions of requests and terabytes of dataWSO2
 
Spark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, StreamingSpark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, StreamingPetr Zapletal
 
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyIt's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyHostedbyConfluent
 
2015 01-17 Lambda Architecture with Apache Spark, NextML Conference
2015 01-17 Lambda Architecture with Apache Spark, NextML Conference2015 01-17 Lambda Architecture with Apache Spark, NextML Conference
2015 01-17 Lambda Architecture with Apache Spark, NextML ConferenceDB Tsai
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
Looming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfLooming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfjexp
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's NewNicola Pedot
 
Spark Overview and Performance Issues
Spark Overview and Performance IssuesSpark Overview and Performance Issues
Spark Overview and Performance IssuesAntonios Katsarakis
 

Similar to Progress_190213 (20)

Progress_190118
Progress_190118Progress_190118
Progress_190118
 
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...
Paper_An Efficient Garbage Collection in Java Virtual  Machine via Swap I/O O...Paper_An Efficient Garbage Collection in Java Virtual  Machine via Swap I/O O...
Paper_An Efficient Garbage Collection in Java Virtual Machine via Swap I/O O...
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Anatomy of in memory processing in Spark
Anatomy of in memory processing in SparkAnatomy of in memory processing in Spark
Anatomy of in memory processing in Spark
 
It's Time To Stop Using Lambda Architecture
It's Time To Stop Using Lambda ArchitectureIt's Time To Stop Using Lambda Architecture
It's Time To Stop Using Lambda Architecture
 
Scala & Spark(1.6) in Performance Aspect for Scala Taiwan
Scala & Spark(1.6) in Performance Aspect for Scala TaiwanScala & Spark(1.6) in Performance Aspect for Scala Taiwan
Scala & Spark(1.6) in Performance Aspect for Scala Taiwan
 
TeraCache: Efficient Caching Over Fast Storage Devices
TeraCache: Efficient Caching Over Fast Storage DevicesTeraCache: Efficient Caching Over Fast Storage Devices
TeraCache: Efficient Caching Over Fast Storage Devices
 
Scaling up wso2 bam for billions of requests and terabytes of data
Scaling up wso2 bam for billions of requests and terabytes of dataScaling up wso2 bam for billions of requests and terabytes of data
Scaling up wso2 bam for billions of requests and terabytes of data
 
Spark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, StreamingSpark Concepts - Spark SQL, Graphx, Streaming
Spark Concepts - Spark SQL, Graphx, Streaming
 
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, ShopifyIt's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
 
Giraph+Gora in ApacheCon14
Giraph+Gora in ApacheCon14Giraph+Gora in ApacheCon14
Giraph+Gora in ApacheCon14
 
2015 01-17 Lambda Architecture with Apache Spark, NextML Conference
2015 01-17 Lambda Architecture with Apache Spark, NextML Conference2015 01-17 Lambda Architecture with Apache Spark, NextML Conference
2015 01-17 Lambda Architecture with Apache Spark, NextML Conference
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
Looming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfLooming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdf
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Spark Overview and Performance Issues
Spark Overview and Performance IssuesSpark Overview and Performance Issues
Spark Overview and Performance Issues
 
Java On Speed
Java On SpeedJava On Speed
Java On Speed
 

More from Hyo jeong Lee

Project_Automatic Photo Classification Web Service
Project_Automatic Photo Classification Web ServiceProject_Automatic Photo Classification Web Service
Project_Automatic Photo Classification Web ServiceHyo jeong Lee
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresHyo jeong Lee
 
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector Policy
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector PolicyPaper_Design of Swap-aware Java Virtual Machine Garbage Collector Policy
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector PolicyHyo jeong Lee
 
Howto_Tensorflow-slim
Howto_Tensorflow-slimHowto_Tensorflow-slim
Howto_Tensorflow-slimHyo jeong Lee
 
Howto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHowto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHyo jeong Lee
 

More from Hyo jeong Lee (6)

Project_Automatic Photo Classification Web Service
Project_Automatic Photo Classification Web ServiceProject_Automatic Photo Classification Web Service
Project_Automatic Photo Classification Web Service
 
Progress_190412
Progress_190412Progress_190412
Progress_190412
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicores
 
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector Policy
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector PolicyPaper_Design of Swap-aware Java Virtual Machine Garbage Collector Policy
Paper_Design of Swap-aware Java Virtual Machine Garbage Collector Policy
 
Howto_Tensorflow-slim
Howto_Tensorflow-slimHowto_Tensorflow-slim
Howto_Tensorflow-slim
 
Howto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear RegressionHowto_Tensorflow+Linear Regression
Howto_Tensorflow+Linear Regression
 

Recently uploaded

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 

Progress_190213

  • 1. Hyojeong Lee Distributed Computing System Laboratory Department of Computer Science and Engineering Seoul National University, Korea Progress Report
  • 2. ● Swap-aware JVM GC policy ● Parallel logging Table of Contents
  • 3. ● Motivation ● Necessity of swapping ● Performing memory-intensive workloads such as deep learning algorithm, the size of generated data is large and unpredictable. ● Current GC policy is not aware of swapping. ● ParallelCompact, default GC policy of Java8 do not consider whether data is swapped. ● Swap I/O by processing swapped data results in long GC time. ● For examples, ● SVD++ in Sparkbench (swap I/O & execution time) Motivation
  • 4. Swap I/O occurs when… dense_prefix Swap space
  • 5. ● Features ● High Memory usage ● High Locality (So, there is compaction for swapped data.) ● Target workloads ● Simple java program for validation ● Java benchmarks ● DaCapo, SPECjvm2008, JOlden, Hyracks ● Real workloads ● Neo4j, Spark, Deeplearning4Java Targets
  • 6. ● Solutions ● Swap-aware GC policy ● (Fine-grained) Checking pagemap → Inserting DS maintaining swap info ● (Coarse-grained) Adding reference counter + LRU list ● Optimized GC policy (TODO) Solutions dense_prefix Virtual (heap) Physical (kernel) Actually, no need to compact → Just remapping virtual space!
  • 7. ● Implementation scheme Swap-aware JVM GC Policy dense_prefix Swap space Swapped live data Process of Full GC 1. Mark 2. Summarize 3. Compact Assume that, - Swapped region = LRU → Do not need to swapin. source_reg dest_addr live_size … 512k Metadata of Region Bitmap 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 Add variable ‘_swpness’ & check it using pagemap 1. Mark : Set bit for live object by tracking root set 2. Summarize : Fill metadata & set dense prefix 3. Compact : push_region to stack → do sliding compaction (memcpy) … Region stack list Region stacks for each GC thread When src’s _swpness > 0, skip pushing/copying draining and stealing over stacks
  • 8. ● Attempts 1. Can’t skip entire memcpy. 2. ‘Validation after GC error’ because of wrong metadata. 3. DOING ● Evaluation ● Simple java program (microbench) ● Make swapped objects target for compaction ● Benchmarks (benchmark) ● DaCapo, SPECjvm2008, JOlden, Hyracks ● Neo4j (real workload) ● embedded, disk-based, fully transactional Java persistence engine that manages graph data ● Spark (real workload) ● Sparkbench’s Graph-computation & Machine-learning algorithm ● Deeplearning4Java (real workload) ● Deep learning platform for Java Swap-aware JVM GC Policy
  • 9. ● Kernel(page) level: Swap flag - Attempt (1) ● Evaluation w/ Simple java program ● Simple java program ● Make swapped objects target for compaction ● Result Swap-aware JVM GC Policy Allocate 30 objects Allocate 10 objects (objects 0 to 9 are swapped out) Access 0 to 9 (objects 10 to 19 are swapped out) & Make null objects 0 to 9 (be GC targets) GC triggered, do mark and summarize (checking swpness consumes about 24 sec) Do compact Allocate 30 objects Allocate 10 objects (objects 0 to 9 are swapped out) Access 0 to 9 (objects 10 to 19 are swapped out) & Make null objects 0 to 9 (be GC targets) GC triggered, do mark and summarize & Do compact
  • 10. ● Kernel(page) level: Swap flag - Attempt (2) ● Evaluation w/ Simple java program Swap-aware JVM GC Policy
  • 11. ● Kernel(page) level: Swap flag - Attempt (2) ● Evaluation w/ Simple java program Swap-aware JVM GC Policy
  • 12. ● Kernel(page) level: Swap flag - Attempt (2) ● Evaluation w/ DL4J ● Object Detection: House Number Detection ● Dataset: http://ufldl.stanford.edu/housenumbers/ ● 73,257 digit images for training ● 26,032 digit images for testing ● 531,131 additional, somewhat less difficult samples, to use as extra training data ● Result ● Baseline (DONE) ● Iteration for training: 100 times ● FGC: 2 times ● Memory usage: ~ 9 GB ● Optimized (TODO) Swap-aware JVM GC Policy
  • 13. ● Swap-aware JVM GC policy ● ~ 02.28 ● Complete page level solution ● Validation with real workloads (DL4J, Spark) ● Compare with existing GC policies ● Plan for optimized GC policy ● Parallel logging ● ~ 02.28 ● Parallel logging on Lustre file system ● Improve paper: An Efficient Journaling Mechanism in Lustre File System for Fast Storage Devices TODO (outline)
  • 15. (cf) JVM GC policies # Policy Copy swapped obj Traverse for allocation Other issues etc 1 Concurrent Mark and Sweep (CMS) X O Floating garbage / More logics to deal with fragmentation / More space for list long-lived obj 비율 높고 pause time 제약 있는 앱에 적합 2 Parallel Compact O X X pause time 제약 있는 앱에 적합 default in java 8 3 Garbage first (G1) O X X default in java 9 4 SAGP (Swap- aware Parallel Compact) X X Floating garbage / Check pagemap (fopen, close) / More fragmentation 기존 allocation 정책 그대로 사용 가능 커널의 swap 정보를 역으로 읽어 올 수 있으면 오버헤드 제거 가능 https://docs.google.com/presentation/d/1rLyJyny7NMmSLpd9f_z_arjzzngL4bxjAbgo0d5Lnik/edit?usp=sharing
  • 16. Swap-aware JVM GC Policy Allocate 30 objects Allocate 10 objects (objects 0 to 9 are swapped out) Access 0 to 9 (objects 10 to 19 are swapped out) & Make null objects 0 to 9 (be GC targets) GC triggered, do mark and summarize (checking swpness consumes about 24 sec) Do compact Allocate 30 objects Allocate 10 objects (objects 0 to 9 are swapped out) Access 0 to 9 (objects 10 to 19 are swapped out) & Make null objects 0 to 9 (be GC targets) GC triggered, do mark and summarize & Do compact Comments: - 최적화 전(오른쪽) / 후(왼쪽) 이며, 각 GC 스텝은 빨간색 화살표로 표기 - 현재 미완성 버전은 모든 swapped region을 skip하지 못하지만, 일차적으로 베이스라인과 성능을 비교해본 결과, - Swap I/O: swapin 약 300mb 감소 / swapout 약 600mb 감소 - Execution time: 약 15초 증가 - 최적화 완료 후에는 swapin/out 각각 10gb 이상 감소할 것으로 예상 - 따라서, 실행 시간이 증가한 것은 check_swpness가 24초 가량 소요됨을 감안하면 최적화 완료 후 개선의 여지가 있 음 swapin (mb) swapout (mb) total time (sec) optimized 31109 41253 180 baseline 31411 41866 165