1 / 16

Mark-Compact Sweep Garbage Collection & Automatic Heap Resizing: A Valuable Combination

Mark-Compact Sweep Garbage Collection & Automatic Heap Resizing: A Valuable Combination. The Problem. Processes require different heap sizes Mark sweep garbage collectors have some disadvantages What combination of heap size and garbage collection will increase performance?.

barth
Download Presentation

Mark-Compact Sweep Garbage Collection & Automatic Heap Resizing: A Valuable Combination

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mark-Compact Sweep Garbage Collection & Automatic Heap Resizing: A Valuable Combination

  2. The Problem • Processes require different heap sizes • Mark sweep garbage collectors have some disadvantages • What combination of heap size and garbage collection will increase performance?

  3. Problem with Heap Sizes Small heap Large Heap

  4. Problem with Mark Sweep Garbage Collection (a) Before Collection (b) After Collection

  5. The Solution • Run the Dacapo Suite and GCBench benchmarks on the Jikes RVM using several different configurations: • MSwithHR • MSwithoutHR • MSCwithHR • MSCwithoutHR • NOGCwithHR

  6. Benchmarks (Dacapo Suite)

  7. Benchmarks (GCBench) • focuses on modeling allocation requests in ways that are especially stressful to memory • objects are allocated to create trees of differing heights and sizes.

  8. Heap Resizing Algorithm • Calculate the live ratio (amount of memory in use/current heap size) • Calculate heap change ratio • How much garbage collection has been done? • Calculate heap change ratio based on live ratio, GC Load and function matrix • New size = old heap size * heap change ratio • If new size != old size • Change the heap size • Inform VM that the heap size has changed

  9. Results (GCBench)

  10. Results (fop)

  11. Garbage Collection Results

  12. Garbage Collection Results

  13. Conclusions • The variation of mark compact sweep implemented in the Jikes RVM works just as well as the basic mark sweep algorithm, even in the face of compaction and when complemented with automatic heap resizing • In some cases, we need to examine the application itself to determine which algorithm is better suited for our needs.

  14. Conclusions • Only using garbage collection gives worse performance than choosing heap resizing in conjunction with garbage collection in situations in which we do not have adequate memory to execute our entire program • Only using heap resizing gives worse performance in situations in which the footprint of the application is much smaller than the maximum heap size. In these situations, a conjunction of heap resizing with automatic garbage collection gives the best performance

  15. Conclusions • While the amount of time spent in garbage collection and heap resizing varies in cases in which the program’s footprint is much smaller than the maximum heap size, both amount approximately to the same execution times

  16. Questions??

More Related