Visualising Dynamic Memory Allocators
A.M. Cheadle, A.J. Field, J.W. Ayres, N. Dunn, R.A. Hayden, J. Nyström-Persson Department of Computing, Imperial College London
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 1/26
Visualising Dynamic Memory Allocators A.M. Cheadle, A.J. Field, J.W. - - PowerPoint PPT Presentation
Visualising Dynamic Memory Allocators A.M. Cheadle, A.J. Field, J.W. Ayres, N. Dunn, R.A. Hayden , J. Nystrm-Persson Department of Computing, Imperial College London ISMM 06 - Visualising Dynamic Memory Allocators p. 1/26 Motivation...
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 1/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 2/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 3/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 4/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 5/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 6/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 7/26
Mark Scan Sweep Copy...
Heap
Driver Alloc Coll App Application program (server) Visualisation (client) Stream GC events update visualisation via streams GC events (minor/major collections), O(0.1 − 10)? per second
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 8/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 9/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 10/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 11/26
Application thread Network thread e.g. stream update commands, Server commands Client From client To client Server thread architecture
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 12/26
Controlled by client Signals render completion updates changes between Caches stream Buffers flushed to client periodically Stream update thread Network thread buffers
...
Update Ack Application thread update Client rate Sample Commands Commands As before Server From client To client To From
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 13/26
Update App Time From Update App Time From Sampling interval
Dirtied blocks Dirtied blocks To client To client 1 / "Frame rate" Buffer Buffer
Communication time time Rendering Server
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 14/26
Unused Operating System (Virtual) memory Megablock Allocator Allocator Block Garbage Collected Heap (Incremental) 1Mb Allocated 4Kb
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 15/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 16/26
dlmalloc smallbins
Contiguous
smallbin 1 smallbin 2
...
treebins
treebin 1 treebin 2 treebin n
...
key
space group
(with zoom capability)
indexed space space
mspaces smallbin n
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 17/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 18/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 19/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 20/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 21/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 22/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 23/26
Sampling 2000 tiles 8000 tiles interval Measurement Mean inter-event time (µs) Mean inter-event time (µs) (ms)
50 100 50 100
1347 566 354 4932 1601 978 100
14.62 5.04 3.33 151.09 39.87 24.01 Effective frame rate 2.59 2.65 2.63 0.43 0.49 0.52
1585 938 629 6953 2897 1836 200
22.62 9.14 5.89 200.81 78.03 44.42 Effective frame rate 2.07 2.08 2.10 0.40 0.42 0.47
1893 1643 1229 7784 5770 3926 500
38.17 17.74 10.81 292.20 153.45 102.30 Effective frame rate 1.32 1.28 1.29 0.35 0.42 0.39
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 24/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 25/26
ISMM ’06 - Visualising Dynamic Memory Allocators – p. 26/26