Quantifying and Improving Garbage Collection Performance

March 2, 2005
2:50 pm - 4:00 pm
Halligan 108
Speaker: Matt Hertz, U Mass
Host: Carla Brodley

Abstract

While garbage collection offers many software engineering benefits, its perceived performance disadvantage is often cited as a barrier to adoption of garbage collection. however, little research has examined if this perception has any real basis. Quantifying garbage collection performance has additional benefits. By determining where performance suffers most, this study also focuses research towards those areas where performance improvements are most needed. Unfortunately, programmers using garbage-collected languages do not directly deallocate memory thereby precluding a direct comparison with our touchstone, explicit memory management. In this talk, I describe oracular memory management, which uses object reachability traces to direct the explicit freeing of memory. This approach is difficult using existing methods of trace generation. While traditional trace generation methods can require over 3 months for programs that normally run in 1 minute, my solution to this problem, the Merlin lifetime analysis algorithm, can improve trace generation times by orders of magnitude. By using Merlin and the oracular memory managemer, I will show that garbage collection performance is competitive with explicit memory management when memory is plentiful, but orders of magnitude slower when paging. While this paging performance is unavoidable without cooperation between the garbage collector and virtual memory manager,I present a new algorithm that works with the virtual memory manager to avoid or eliminate paging. I will show how this new collector, called bookmarking collection, uses cooperation to reduce execution times over the next best collector by up to a factor of 4. Garbage collection's perceived performance and its very real paging > performance may prevent programmers from gaining the software > engineering benefits garbage collection provides. This talk shows > when programmers can use garbage collection without hurting overall > performance and introduces solutions to those enable garbage > collections use in environments where its performance still lags.

Title: Quantifying and Improving Garbage Collection Performance

While garbage collection offers many software engineering benefits, its perceived performance disadvantage is often cited as a barrier to adoption of garbage collection. Little research, however, has examined if this perception has any real basis. Quantifying garbage collection performance has additional benefits. By determining where performance suffers most, this study also focuses research towards those areas where performance improvements are most needed.

Unfortunately, programmers using garbage-collected languages do not directly deallocate memory thereby precluding a direct comparison with our touchstone, explicit memory management. In this talk, I describe oracular memory management, which uses object reachability traces to direct the explicit freeing of memory. This approach is difficult using existing methods of trace generation. While traditional trace generation methods can require over 3 months for programs that normally run in 1 minute, my solution to this problem, the Merlin lifetime analysis algorithm, can improve trace generation times by orders of magnitude.

By using Merlin and the oracular memory manager, I will show that garbage collection performance is competitive with explicit memory management when memory is plentiful, but orders of magnitude slower when paging. While this paging performance is unavoidable without cooperation between the garbage collector and virtual memory manager, I present a new algorithm that works with the virtual memory manager to avoid or eliminate paging. I will show how this new collector, called bookmarking collection, uses cooperation to reduce execution times over the next best collector by up to a factor of 4.

Garbage collection's perceived performance and its very real paging performance may prevent programmers from gaining the software engineering benefits garbage collection provides. This talk shows when programmers can use garbage collection without hurting overall performance and introduces solutions to those enable garbage collections use in environments where its performance still lags.