Download Aggressive Writeback in the Linux Kernel

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Aggressive Writeback in the Linux
Kernel
DIMACS REU Project
Robert Renaud
Aggressive Writeback in the Linux Kernel – p. 1
About Linux
Open Source Operating System
Aggressive Writeback in the Linux Kernel – p. 2
About Linux
Open Source Operating System
100s or more contributors
Aggressive Writeback in the Linux Kernel – p. 2
About Linux
Open Source Operating System
100s or more contributors
7 contributors with rutgers.edu emails
Aggressive Writeback in the Linux Kernel – p. 2
About Linux
Open Source Operating System
100s or more contributors
7 contributors with rutgers.edu emails
hope to make it 8
Aggressive Writeback in the Linux Kernel – p. 2
About Linux
Open Source Operating System
100s or more contributors
7 contributors with rutgers.edu emails
hope to make it 8
cute mascot
Aggressive Writeback in the Linux Kernel – p. 2
About Linux
Open Source Operating System
100s or more contributors
7 contributors with rutgers.edu emails
hope to make it 8
cute mascot
Aggressive Writeback in the Linux Kernel – p. 2
Two Level Memory
RAM
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
high bandwidth - GB/s
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
high bandwidth - GB/s
Disk
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
high bandwidth - GB/s
Disk
enormous latency - milliseconds
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
high bandwidth - GB/s
Disk
enormous latency - milliseconds
large capacity
Aggressive Writeback in the Linux Kernel – p. 3
Two Level Memory
RAM
low latency - nanoseconds
small capacity
high bandwidth - GB/s
Disk
enormous latency - milliseconds
large capacity
medium bandwidth - 10s of MB/s
Aggressive Writeback in the Linux Kernel – p. 3
Latency/Bandwidth Ratio
use blocks
Aggressive Writeback in the Linux Kernel – p. 4
Latency/Bandwidth Ratio
use blocks
amortized latency = latency / block accesses
Aggressive Writeback in the Linux Kernel – p. 4
Latency/Bandwidth Ratio
use blocks
amortized latency = latency / block accesses
exploits locality of reference
Aggressive Writeback in the Linux Kernel – p. 4
Memory Abstraction
Virtual Memory
Aggressive Writeback in the Linux Kernel – p. 5
Memory Abstraction
Virtual Memory
Hide real location of data
Aggressive Writeback in the Linux Kernel – p. 5
Memory Abstraction
Virtual Memory
Hide real location of data
Evict pages when needed
Aggressive Writeback in the Linux Kernel – p. 5
Eviction
Clean vs Dirty
Aggressive Writeback in the Linux Kernel – p. 6
Eviction
Clean vs Dirty
Dirty write back costly
Aggressive Writeback in the Linux Kernel – p. 6
Eviction
Clean vs Dirty
Dirty write back costly
Eviction Policy
Least Recently Used
Least Frequently Used
Aggressive Writeback in the Linux Kernel – p. 6
LRU in Linux
active list
Aggressive Writeback in the Linux Kernel – p. 7
LRU in Linux
active list
inactive list
Aggressive Writeback in the Linux Kernel – p. 7
LRU in Linux
active list
inactive list
on reference, move up
Aggressive Writeback in the Linux Kernel – p. 7
LRU in Linux
active list
inactive list
on reference, move up
periodically, refill inactive
Aggressive Writeback in the Linux Kernel – p. 7
LRU in Linux
active list
inactive list
on reference, move up
periodically, refill inactive
only approximation to LRU
Aggressive Writeback in the Linux Kernel – p. 7
LRU insufficient
Databases do own memory management
Aggressive Writeback in the Linux Kernel – p. 8
LRU insufficient
Databases do own memory management
Clashes with OS
Aggressive Writeback in the Linux Kernel – p. 8
Properties of Disk
mechanical movement
disk seeks slow
small writes costly
Aggressive Writeback in the Linux Kernel – p. 9
Properties of Disk
mechanical movement
disk seeks slow
small writes costly
the big secret
page write cost
track write cost
Aggressive Writeback in the Linux Kernel – p. 9
Properties of Disk
mechanical movement
disk seeks slow
small writes costly
the big secret
page write cost
track write cost
about 30 pages per track
Aggressive Writeback in the Linux Kernel – p. 9
Properties of Disk
mechanical movement
disk seeks slow
small writes costly
the big secret
page write cost
track write cost
about 30 pages per track
try to cluster page writes
Aggressive Writeback in the Linux Kernel – p. 9
Properties of Disk
mechanical movement
disk seeks slow
small writes costly
the big secret
page write cost
track write cost
about 30 pages per track
try to cluster page writes
benchmark
Sequential page writes - 8 MB/s
Random page writes - .35 MB/s
Aggressive Writeback in the Linux Kernel – p. 9
Aggressive Write back
LRU decides to evict a page
Aggressive Writeback in the Linux Kernel – p. 10
Aggressive Write back
LRU decides to evict a page
Aggressively write back nearby pages
Aggressive Writeback in the Linux Kernel – p. 10
Aggressive Write back
LRU decides to evict a page
Aggressively write back nearby pages
Relatively easy to bolt on
Aggressive Writeback in the Linux Kernel – p. 10
Aggressive Write back
LRU decides to evict a page
Aggressively write back nearby pages
Relatively easy to bolt on
Theoretically wrong
Aggressive Writeback in the Linux Kernel – p. 10
Better Idea
dirtiness should be bigger factor
Aggressive Writeback in the Linux Kernel – p. 11
Better Idea
dirtiness should be bigger factor
prefer dirtier tracks
Aggressive Writeback in the Linux Kernel – p. 11
Better Idea
dirtiness should be bigger factor
prefer dirtier tracks
out of scope of project
Aggressive Writeback in the Linux Kernel – p. 11
Progress
some source code level understanding
Aggressive Writeback in the Linux Kernel – p. 12
Progress
some source code level understanding
printing out data structures in kernel
Aggressive Writeback in the Linux Kernel – p. 12
Progress
some source code level understanding
printing out data structures in kernel
no behavioral modification yet
Aggressive Writeback in the Linux Kernel – p. 12
Acknowledgements
DIMACS
Aggressive Writeback in the Linux Kernel – p. 13
Acknowledgements
DIMACS
Martin Farach-Colton
Aggressive Writeback in the Linux Kernel – p. 13
Acknowledgements
DIMACS
Martin Farach-Colton
All the REU students
Aggressive Writeback in the Linux Kernel – p. 13