Hierarchical Real Time Garbage Collection
Filip Pizlo, Antony Hosking, Jan Vitek (Purdue & MSR, Purdue, Purdue & TJ Watson)
LCTES 2007 San Diego, CA
Hierarchical Real Time Garbage Collection Filip Pizlo , Antony - - PowerPoint PPT Presentation
Hierarchical Real Time Garbage Collection Filip Pizlo , Antony Hosking, Jan Vitek (Purdue & MSR, Purdue, Purdue & TJ Watson) LCTES 2007 San Diego, CA Real Time Java (RTJ) is a growing technology for developing robust,
Filip Pizlo, Antony Hosking, Jan Vitek (Purdue & MSR, Purdue, Purdue & TJ Watson)
LCTES 2007 San Diego, CA
robust, mission-critical, hard real-time systems.
robust, mission-critical, hard real-time systems.
management:
robust, mission-critical, hard real-time systems.
management:
robust, mission-critical, hard real-time systems.
management:
(RTGC) - but sometimes performance is not good enough.
robust, mission-critical, hard real-time systems.
management:
(RTGC) - but sometimes performance is not good enough.
memory management instead (scoped memory, object pools, eventrons, reflexes).
Interruptions from the collector are part of the real-time schedule.
Following interruption, the time before the mutator gets to relinquish control from the collector should be small.
For a given timeslice, the amount of time that the mutator is guaranteed to utilize, is maximized.
Non-RT Thread RT Thread RTGC Thread
Increasing Priority
from the RTGC is determined by the allocation rate of all threads, and the size of the whole heap.
Non-RT Thread RT Thread RTGC Thread
Increasing Priority
from the RTGC is determined by the allocation rate of all threads, and the size of the whole heap.
inversion: the heap usage of a non-real-time task may cause the GC to interfere with a real-time task.
Non-RT Thread RT Thread RTGC Thread
Increasing Priority
Non-RT Thread RT Thread RTGC Thread GC Thread
Increasing Priority
Thread behavior determines GC schedule GC thread interferes with mutator Key
“heaplets”.
Non-RT Thread RT Thread RTGC Thread GC Thread
Increasing Priority
Thread behavior determines GC schedule GC thread interferes with mutator Key
“heaplets”.
collector thread.
Non-RT Thread RT Thread RTGC Thread GC Thread
Increasing Priority
Thread behavior determines GC schedule GC thread interferes with mutator Key
“heaplets”.
collector thread.
time heaplets never interferes with real-time tasks.
Non-RT Thread RT Thread RTGC Thread GC Thread
Increasing Priority
Thread behavior determines GC schedule GC thread interferes with mutator Key
“heaplets”.
collector thread.
time heaplets never interferes with real-time tasks.
affected by the footprint and allocation behavior of the non- real-time code.
Non-RT Thread RT Thread RTGC Thread GC Thread
Increasing Priority
Thread behavior determines GC schedule GC thread interferes with mutator Key
Thread 1 Thread 2 Thread 3 GC Thread
Obj Obj Obj Obj Obj Obj Obj Obj Obj Obj
Thread 1 Thread 2 Thread 3 GC Thread
Obj Obj Obj Obj Obj Obj Obj Obj Obj Obj
GC Thread
Thread 1 Thread 2 Thread 3 GC Thread
Obj Obj Obj Obj Obj Obj Obj Obj Obj Obj
GC Thread
Thread 1 Thread 2 Thread 3 GC Thread
Obj Obj Obj Obj Obj Obj Obj Obj Obj Obj
GC Thread
References between heaplets unrestricted
Obj Obj Obj Obj Obj Obj
Obj
Obj Obj
Obj Obj Obj Obj Obj Obj
Obj
Obj Obj
“up-references” are guaranteed fast
Obj Obj Obj Obj Obj Obj
Obj
Obj Obj
“up-references” are guaranteed fast
“cross-references” are allowed, but come with a penalty
producer and consumer in separate heaplets.
method to create the ORB in our new heaplet.
performance benefits of HRTGC, but the ease with which code can be refactored to use it effectively.
maker.
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
Worst case: 952us
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
HRTGC Worst case: 811us
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
RTGC Worst case: 952us HRTGC Worst case: 811us
1000 2000 3000 4000 5000 200 400 600 800 1000 1200 1400
Number of Iterations Response time in microseconds
RTGC Worst case: 952us HRTGC Worst case: 811us HRTGC: 15% better
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
Worst case: 8.255ms
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
HRTGC Worst case: 6.113ms
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
RTGC Worst case: 8.255ms HRTGC Worst case: 6.113ms
500 1000 1500 2000 3000 4000 5000 6000 7000 8000 9000
Number of Iterations Response time in microseconds
RTGC Worst case: 8.255ms HRTGC Worst case: 6.113ms HRTGC: 26% better
105 106 107 108 109 1010 1011 0.2 0.4 0.6 0.8 1 105 106 107 108 109 1010 1011
HRTGC RTGC
Window size in nanoseconds Mutator Utilization