Скачать презентацию Taming the Memory Hogs Using Compiler-Inserted Releases to Скачать презентацию Taming the Memory Hogs Using Compiler-Inserted Releases to

09a147146821e54d0be44c0b7162e65e.ppt

  • Количество слайдов: 18

Taming the Memory Hogs: Using Compiler-Inserted Releases to Manage Physical Memory Intelligently Angela Demke Taming the Memory Hogs: Using Compiler-Inserted Releases to Manage Physical Memory Intelligently Angela Demke Brown, Todd C. Mowry (CMU)

Who are the Memory Hogs? • “out-of-core” applications • Involve data sets > physical Who are the Memory Hogs? • “out-of-core” applications • Involve data sets > physical memory • E. g. scientific visualization, satellite data, etc. Jon Moore DSL Seminar 19 October 2001

Why do they need taming? Jon Moore DSL Seminar 19 October 2001 Why do they need taming? Jon Moore DSL Seminar 19 October 2001

Global vs. local replacement • Global – No regard for ownership • Local – Global vs. local replacement • Global – No regard for ownership • Local – allocation not according to need ( Under-utilization) – Dynamic adjustment complicates OS Jon Moore DSL Seminar 19 October 2001

The Strategy Jon Moore DSL Seminar 19 October 2001 The Strategy Jon Moore DSL Seminar 19 October 2001

OS Support • OS maintains a shared page per app – Current pages in OS Support • OS maintains a shared page per app – Current pages in use – Upper limit on pages that can be used – Bitmap of which pages are in memory • Modified on allocate/release Jon Moore DSL Seminar 19 October 2001

OS Support (2) • Handling prefetches – Discard prefetch if no free pages – OS Support (2) • Handling prefetches – Discard prefetch if no free pages – Prefetches not fully validated and not mapped into TLB • Releaser – new system daemon – Check for recent references – Write back dirty pages – Works as queue – leaves time for rescue Jon Moore DSL Seminar 19 October 2001

OS Support (3) Setting the upper limit: Upper limit = min(max_rss, current_size + tot_freemem OS Support (3) Setting the upper limit: Upper limit = min(max_rss, current_size + tot_freemem – min_freemem) - Not a guarantee, just what’s up for grabs Jon Moore DSL Seminar 19 October 2001

Compiler support • Infer memory access patterns • Most useful with arrays with static Compiler support • Infer memory access patterns • Most useful with arrays with static sizes, nested loops • Schedule prefetches • Aggressive releases – Assign priority Jon Moore DSL Seminar 19 October 2001

Compiler Analysis Example Jon Moore DSL Seminar 19 October 2001 Compiler Analysis Example Jon Moore DSL Seminar 19 October 2001

Runtime system • Prefetch : see if already have it • Releases : 0 Runtime system • Prefetch : see if already have it • Releases : 0 1 2 3 4 tags Jon Moore DSL Seminar Priority list Buffered releases 19 October 2001

Performance Analysis • Get ready for the graphs…. Jon Moore DSL Seminar 19 October Performance Analysis • Get ready for the graphs…. Jon Moore DSL Seminar 19 October 2001

Out-of-core app performance Jon Moore DSL Seminar 19 October 2001 Out-of-core app performance Jon Moore DSL Seminar 19 October 2001

Soft page faults Jon Moore DSL Seminar 19 October 2001 Soft page faults Jon Moore DSL Seminar 19 October 2001

Release effectiveness Jon Moore DSL Seminar 19 October 2001 Release effectiveness Jon Moore DSL Seminar 19 October 2001

Impact on other apps Jon Moore DSL Seminar 19 October 2001 Impact on other apps Jon Moore DSL Seminar 19 October 2001

Related Work • App control of paging – Mach, V++, Exokernel, SPIN, Vino – Related Work • App control of paging – Mach, V++, Exokernel, SPIN, Vino – Programmer burden • File I/O prefetching/releases – TIP – Can be automated, but tracking VM with this system too costly Jon Moore DSL Seminar 19 October 2001

Discussion • Non- (IRIX/MIPS)? • Dynamic code generation – In application – place prefetch/releases Discussion • Non- (IRIX/MIPS)? • Dynamic code generation – In application – place prefetch/releases • Extensions to other apps? – Non-array crunchers – Trickier compiler analysis? • Why is this paper hard to read? Jon Moore DSL Seminar 19 October 2001