"Snappy" version of Android with Adaptive GC Policies

WAIT - don't download this version of Snappy.
7/2014: This version of snappy can enter a degenerate configuration where the GC commencement threshold is progressively raised, causing unnecessary (excessive) heap growth.  Snappy2 addresses ths problem with an autonomic memory "spleen" that, like the one that provides humans an extra pint of blood when needed for physical exertion, enables Snappy2 to reset the GC commencement threshold only a minimal risk of memory exhaustion.  Send us mail and and we'll let you know more about the spleen and when it's ready for public consumption.

The automatic memory management system in all versions of Android's Dalvik (J)VM since Froyo (Gingerbread, ICS, JB, KK) have conservative heuristics driven by fixed thresholds that manage heap size and garbage collection scheduling.  These policies can result in excessive interface pauses and energy consumption. 

Snappy Android incorporates an adaptive memory management policy that essentially eliminates interface pauses and also reduces energy consumption.  Both source and binaries are available for download (see below), which are based on CyanogenMod.

In Jan 2013, UTEP News published an article on Snappy..  Our students also presented a poster at NSDI 2014.

  • Baseline policies
    • Limit Heap Growth
      • Baseline heuristics are conservative based upon preset constants
      • Always execute garbage collection (GC) upon heap exhaustion, even if GC has recently completed.
      • Causes frequent heap exhaustion and frequent low-yield GC that consume energy and can cause interface pauses
    • Background GC scheduling
      • Baseline heuristic to trigger background GC is a fixed threshold
      • Threshold does not take into account fragmentation or program behavior
      • Our experiments indicate that this constant threshold is too low for many high-value apps.
  • Snappy Android's "adaptive" policies
    • What they do
      • Limit GC frequency 
      • Adaptively compute low-memory threshold that triggers background GC 
      • Trust our policies and grow the heap upon allocation failure without delaying for an additional GC 
    • What they achieve
      • Few or no pauses due to garbage collection
      • Acceptable heap sizes
      • Lower energy consumption

Obtaining Snappy Android

For more information