Remix: online detection and repair of cache contention for the JVM
Authors:
Open Access
- 2 June 2016
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 251-265
Abstract
As ever more computation shifts onto multicore architectures, it is increasingly critical to find effective ways of dealing with multithreaded performance bugs like true and false sharing. Previous approaches to fixing false sharing in unmanaged languages have employed highly-invasive runtime program modifications. We observe that managed language runtimes, with garbage collection and JIT code compilation, present unique opportunities to repair such bugs directly, mirroring the techniques used in manual repairs. We present Remix, a modified version of the Oracle HotSpot JVM which can detect cache contention bugs and repair false sharing at runtime. Remix's detection mechanism leverages recent performance counter improvements on Intel platforms, which allow for precise, unobtrusive monitoring of cache contention at the hardware level. Remix can detect and repair known false sharing issues in the LMAX Disruptor high-performance inter-thread messaging library and the Spring Reactor event-processing framework, automatically providing 1.5-2x speedups over unoptimized code and matching the performance of hand-optimization. Remix also finds a new false sharing bug in SPECjvm2008, and uncovers a true sharing bug in the HotSpot JVM that, when fixed, improves the performance of three NAS Parallel Benchmarks by 7-25x. Remix incurs no statistically-significant performance overhead on other benchmarks that do not exhibit cache contention, making Remix practical for always-on use.Keywords
Funding Information
- NSF (SHF-1525296)
This publication has 28 references indexed in Scilit:
- Continuously measuring critical section pressure with the free-lunch profilerACM SIGPLAN Notices, 2014
- RadixVM2013
- Whose cache line is it anyway?2013
- Scalable address spaces using RCU balanced trees2012
- SHERIFF2011
- Automatic feedback-directed object fusingACM Transactions on Architecture and Code Optimization, 2010
- Automatic array inlining in java virtual machines2008
- Using hpm-sampling to drive dynamic compilation2007
- Automatic feedback-directed object inlining in the java hotspot™ virtual machine2007
- Prefetch injection based on hardware monitoring and object metadata2004