Libra: A Library OS for a JVM Glenn Ammons, Jonathan Appavoo, Maria Butrico, Dilma Da Silva, David Grove, Kiyokuni Kawachiya, Orran Krieger, Bryan Rosenburg, Eric Van Hensbergen, Robert Wisniewski T.J. Watson Research Center Tokyo Research Lab 13 - June - 2007 Monday, August 10, 2009
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Libra: A Library OS for a JVMGlenn Ammons, Jonathan Appavoo, Maria Butrico, Dilma Da Silva, David Grove, Kiyokuni Kawachiya, Orran Krieger, Bryan Rosenburg, Eric Van Hensbergen, Robert Wisniewski
T.J. Watson Research CenterTokyo Research Lab
13 - June - 2007
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Motivation Customized operating system support for
Index and some raw data must be in memory Nutch query back-end relies on OS buffer cache Going to control partition is expensive Solution: cache files locally in Libra Average lseek() & read() cost for back-end:
– J9/Linux: 2.25 usec– J9/Libra: 0.9 usec
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Libra optimizations: socket streaming
Nutch query back-end is a streaming application Requests buffered in control partition Fetching them on-demand adds latency Sending results ties up worker threads Solution: stage socket data into/out of Libra partition
– New requests are always available locally– Results are sent asynchronously in batches
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch/Lucene Query performance
Single back-end server 10 GB document set
Configuration Queries / second
Default 5.9
File caching 12.8
File caching & Socket streaming
16.0
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Performance evaluation
Platform– JS21 (PowerPC) blade– IBM BladeCenter– XenPPC– Partitions with 1 core, 1920 MB of memory
Supporting network directly on Libra Pursuing JVM optimizations
– “safe-points” to support type-accurate garbage collection– Real-Time Java support
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Why is it named Libra?
We chose the name “Libra” because our goal – to provide well-balanced services -- aligns with the imagery associated with the constellation of the same name.
JVM
Libra
cache stre
amI/
O
stat
Nutch
Only the necessary components can be chosen.
Constellation Libra
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Stop!
The talk ended with the previous slide Everything else is backup stuff
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
One slide summary Specializing OS for application is attractive Prior attempts had trouble supporting legacy code Our current approach leverages
– Hypervisor– Library OS handles target optimizations; side car handles the
rest– 9P protocol for distributed resources
We did it: we run JVMs on a user domain partition without an OS
We explore performance optimization opportunities We profit from management simplification
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
System architecture (cont)
Using hypervisor instead of exokernel– App can use privileged execution mode and instructions– A pared-down linux can run as libOS
Apps can be like OSes or like micro-kernels Criticism for virtualization approach
– Focus on parts; no general view• In Libra control partition provides general view
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
J9/Libra implementation J9’s portability layer Threading and synchronization Incremental
– Started with smallest J9 • no JIT, no optional VM features, CLDC J2ME class libraries
– Started with dummy implementations on port and thread libraries– Added features as required by workload– Added features back into J9
Debugging Currently
• Running full JIT and largest set of IBM class libraries for J9 version• 50 % of port “dummies” refer to signal handling, shared memory regions,
socket/network
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Libra Internals Memory management
– Simple two-level management– Heap allocated when requested
File system services– Needed for loading Java class files and providing I/O– Mapped to 9P protocol
Subset of pthreads libraries– Designed for scalability but currently only supports 1 processor per partition
– No preemptive time-slicing Socket interface
– Operations forwarded to gateway server– From outside, app seems to be running on the system network server
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Q
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end3. Each back-end searches its data segment, ranks results
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end3. Each back-end searches its data segment, ranks results
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Q
Q
Q
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end3. Each back-end searches its data segment, ranks results4. Back-end send their partial results to front-end
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end3. Each back-end searches its data segment, ranks results4. Back-end send their partial results to front-end
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
Nutch query
1. Front-end receives query (“foo AND bar”)2. Front-end sends query to each back-end3. Each back-end searches its data segment, ranks results4. Back-end send their partial results to front-end5. Front-end selects top results overall
Driver Front-end
Back-end
Back-end
Back-end
data
throughput measurement
data
data
R
Monday, August 10, 2009
13 June 2007 - VEE’07 Libra
IBM Research
File Block I/O Performance
Performance of forwarding standard read/write 128 MB file with varying buffer size