ABSTRACT
Java Util Concurrent (JUC) is a widely used library in multithreaded Java applications. JUC provides a variety of tools such as locks, thread pools and blocking queues. Many of these constructs use Thread Park, a mechanism which allows threads to be blocked from execution, as a means of thread synchronization.
We modified the IBM Java Virtual Machine (JVM) creating a near zero overhead tool that measures and reports park contention data using a variety of metrics. This information can then be used to identify bottlenecks and consequently accelerate Java code.
We demonstrate the usefulness of this JUC Park Contention Tool in two example code patterns where it successfully identifies the JUC lock bottleneck. Furthermore, we also compare theoretical with measured values of the metrics in an example program. Finally, we use our tool to profile the Java benchmarks SPECjbb2005, SPECjbb2013 and the DaCapo benchmark suite.
- IBM Java Virtual Machine (JVM). http://publib.boulder.ibm.com/infocenter/java7sdk/v7r0/index.jsp, April 17, 2013.Google Scholar
- IBM Monitoring and Diagnostic Tools for Java - Health Center Version 2.1. http://www.ibm.com/developerworks/java/jdk/tools/healthcenter, April 17, 2013.Google Scholar
- Java platform, standard edition 7 api specification. http://w3.java.ibm.com/java/docs/java7/api/, April 17, 2013.Google Scholar
- Multicore Software Development Kit. https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=9a29d9f0-11b1-4d29-9359-a6fd9678a2e8, August 13, 2013.Google Scholar
- SPECjbb2005. http://www.spec.org/jbb2005/, August 13, 2014.Google Scholar
- SPECjbb2013. http://www.spec.org/jbb2013/, August 13, 2014.Google Scholar
- S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, and S. Z. Guyer. The dacapo benchmarks: Java benchmarking development and analysis. In ACM Sigplan Notices, volume 41, pages 169--190. ACM, 2006. Google ScholarDigital Library
- G. Chen and P. Stenstrom. Critical lock analysis: diagnosing critical section bottlenecks in multithreaded applications. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, page 71. IEEE Computer Society Press, 2012. Google ScholarDigital Library
- D. Eklov, N. Nikoleris, and E. Hagersten. A Profiling Method for Analyzing Scalability Bottlenecks on Multicores. Technical Report 2012-030, Department of Information Technology, Uppsala University, Oct. 2012.Google Scholar
- B. Goetz, T. Peierls, J. Bloch, J. Bowebeer, D. Holmes, and L. Doug. Java concurrency in practice. Addison-Wesley Professional, 2006. Google ScholarDigital Library
- J. Gosling, B. Joy, G. L. S. Jr, G. Bracha, and A. Buckley. The Java Language Specification. Addison-Wesley, 2013. Google ScholarDigital Library
- T. Lindholm and F. Yellin. The Java virtual machine specification, volume 297. Addison-Wesley Reading, 1997. Google ScholarDigital Library
- P. Patros. Measuring Java Util Concurrent Parking Contention in the IBM J9 Virtual Machine. Master's Thesis, UNB, 2014.Google Scholar
- N. R. Tallent, J. M. Mellor-Crummey, and A. Porterfield. Analyzing lock contention in multithreaded applications. In ACM Sigplan Notices, volume 45, pages 269--280. ACM, 2010. Google ScholarDigital Library
Index Terms
- A Java util concurrent park contention tool
Recommendations
Efficient Sampling-based Lock Contention Profiling for Java
ICPE '17: Proceedings of the 8th ACM/SPEC on International Conference on Performance EngineeringConcurrent code commonly uses locks. Choosing between simpler but less scalable and more sophisticated but error-prone locking mechanisms is difficult during development. Therefore, lock contention analysis at run-time is crucial to aid such decisions.
...
Lock elision for read-only critical sections in Java
PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and ImplementationIt is not uncommon in parallel workloads to encounter shared data structures with read-mostly access patterns, where operations that update data are infrequent and most operations are read-only. Typically, data consistency is guaranteed using mutual ...
Lock elision for read-only critical sections in Java
PLDI '10It is not uncommon in parallel workloads to encounter shared data structures with read-mostly access patterns, where operations that update data are infrequent and most operations are read-only. Typically, data consistency is guaranteed using mutual ...
Comments