Enhanced Userspace and In-Kernel Trace Filtering for Production Systems

Trace tools like LTTng have a very low impact on the traced software as compared with traditional debuggers. However, for long runs, in resource constrained and high throughput environments, such as embedded network switching nodes and production servers, the collective tracing impact on the target software adds up considerably. The overhead is not just in terms of execution time but also in terms of the huge amount of data to be stored, processed and analyzed offline. This paper presents a novel way of dealing with such huge trace data generation by introducing a Just-In-Time (JIT) filter based tracing system, for sieving through the flood of high frequency events, and recording only those that are relevant, when a specific condition is met. With a tiny filtering cost, the user can filter out most events and focus only on the events of interest. We show that in certain scenarios, the JIT compiled filters prove to be three times more effective than similar interpreted filters. We also show that with the increasing number of filter predicates and context variables, the benefits of JIT compilation increase with some JIT compiled filters being even three times faster than their interpreted counterparts. We further present a new architecture, using our filtering system, which can enable co-operative tracing between kernel and process tracing VMs (virtual machines) that share data efficiently. We demonstrate its use through a tracing scenario where the user can dynamically specify syscall latency through the userspace tracing VM whose effect is reflected in tracing decisions made by the kernel tracing VM. We compare the data access performance on our shared memory system and show an almost 100 times improvement over traditional data sharing for co-operative tracing.

[1]  Steven McCanne,et al.  BPF+: exploiting global data-flow optimization in a generalized packet filter architecture , 1999, SIGCOMM '99.

[2]  David Gregg,et al.  The Behavior of Efficient Virtual Machine Interpreters on Modern Architectures , 2001, Euro-Par.

[3]  Sebastian Burckhardt,et al.  Deconstructing concurrency heisenbugs , 2009, 2009 31st International Conference on Software Engineering - Companion Volume.

[4]  M. Desnoyers Low-Impact Operating System Tracing , 2009 .

[5]  Rafael M. Gasca,et al.  Communicating between the kernel and user-space in Linux using Netlink sockets , 2010 .

[6]  Bryan Cantrill,et al.  Dynamic Instrumentation of Production Systems , 2004, USENIX Annual Technical Conference, General Track.

[7]  David Goulet Unified Kernel/User-Space Efficient Linux Tracing Architecture , 2012 .

[8]  Steven McCanne,et al.  The BSD Packet Filter: A New Architecture for User-level Packet Capture , 1993, USENIX Winter.

[9]  Brendan Gregg,et al.  Solaris Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris , 2006 .

[10]  Romik Guha Anjoy,et al.  Efficiency of LTTng as a Kernel and Userspace Tracer on Multicore Environment , 2010 .

[11]  Jeffrey C. Mogul,et al.  The packer filter: an efficient mechanism for user-level network code , 1987, SOSP '87.

[12]  Dawson R. Engler,et al.  DPF: Fast, Flexible Message Demultiplexing Using Dynamic Code Generation , 1996, SIGCOMM.

[13]  David Gregg,et al.  The case for virtual register machines , 2003, IVME '03.

[14]  David Gregg,et al.  Virtual machine showdown: stack versus registers , 2005, VEE '05.

[15]  Rafael M. Gasca,et al.  Communicating between the kernel and user‐space in Linux using Netlink sockets , 2010, Softw. Pract. Exp..

[16]  Jonathan Walpole,et al.  User-Level Implementations of Read-Copy Update , 2012, IEEE Transactions on Parallel and Distributed Systems.

[17]  Paul E. McKenney,et al.  Is Parallel Programming Hard, And, If So, What Can You Do About It? , 2017, 1701.00854.

[18]  Nickolai Zeldovich,et al.  Practical and Effective Sandboxing for Non-root Users , 2013, USENIX ATC.

[19]  Naser Ezzati Jivan Multi-Level Trace Abstraction, Linking and Display , 2014 .

[20]  A. Brown,et al.  The Architecture of Open Source Applications , 2011 .

[21]  Laurie J. Hendren,et al.  SableVM: A Research Framework for the Efficient Execution of Java Bytecode , 2001, Java Virtual Machine Research and Technology Symposium.

[22]  Zhenyu Wu,et al.  Design and Implementation of a Fast Dynamic Packet Filter , 2011, IEEE/ACM Transactions on Networking.

[23]  Louis Sobel,et al.  Secure Input Overlays: Increasing Security for Sensitive Data on Android , 2015 .

[24]  Jeffrey K. Hollingsworth,et al.  An API for Runtime Code Patching , 2000, Int. J. High Perform. Comput. Appl..

[25]  Brad Chen,et al.  Locating System Problems Using Dynamic Instrumentation , 2010 .

[26]  Michel Dagenais,et al.  Linux Low-Latency Tracing for Multicore Hard Real-Time Systems , 2015 .

[27]  Mathieu Desnoyers,et al.  Linux Kernel Debugging on Google-sized clusters , 2007 .

[28]  Larry L. Peterson,et al.  PathFinder: A Pattern-Based Packet Classifier , 1994, OSDI.

[29]  Vijay Janapa Reddi,et al.  PIN: a binary instrumentation tool for computer architecture research and education , 2004, WCAE '04.

[30]  Michel Dagenais,et al.  Fine-grained preemption analysis for latency investigation across virtual machines , 2014, Journal of Cloud Computing.