improving system performance using application-level...
TRANSCRIPT
Introduction Implementation Results Future work
Improving system performance usingapplication-level hints
Bjorn Dobel<[email protected]>
24.06.2005
Bjorn Dobel Application-Level Hints 24.06.2005 1 / 18
Introduction Implementation Results Future work
Contents
1 IntroductionThe problemApplication-level hints
2 Implementation
3 Results
4 Future work
Bjorn Dobel Application-Level Hints 24.06.2005 2 / 18
Introduction Implementation Results Future work
1 IntroductionThe problemApplication-level hints
2 Implementation
3 Results
4 Future work
Bjorn Dobel Application-Level Hints 24.06.2005 3 / 18
Introduction Implementation Results Future work
The problem
Scenario: Application startup
cold caches after bootup
disk accesses
interleaving with CPU operationsdistributed all over run timenot independent
solution:
find out which parts of which files are accessedperform prefetching
Bjorn Dobel Application-Level Hints 24.06.2005 4 / 18
Introduction Implementation Results Future work
The problem
Scenario: Application startup
cold caches after bootup
disk accesses
interleaving with CPU operationsdistributed all over run timenot independent
solution:
find out which parts of which files are accessedperform prefetching
Bjorn Dobel Application-Level Hints 24.06.2005 4 / 18
Introduction Implementation Results Future work
The problem
The problem in general
operating system manages resources
operating system cannot predict future resource usage
But we can predict it by using
heuristics
statistics
informed methods
Bjorn Dobel Application-Level Hints 24.06.2005 5 / 18
Introduction Implementation Results Future work
The problem
The problem in general
operating system manages resources
operating system cannot predict future resource usage
But we can predict it by using
heuristics
statistics
informed methods
Bjorn Dobel Application-Level Hints 24.06.2005 5 / 18
Introduction Implementation Results Future work
Application-level hints
Application-Level Hints
Definition
Application-level hints: hints issued by (user-space) applicationsthat help the operating system predict future resource accesses.The operating system decides what to do with this information.
explicit hints (asynchronous I/O)
implicit hints (prefetching)
Bjorn Dobel Application-Level Hints 24.06.2005 6 / 18
Introduction Implementation Results Future work
1 IntroductionThe problemApplication-level hints
2 Implementation
3 Results
4 Future work
Bjorn Dobel Application-Level Hints 24.06.2005 7 / 18
Introduction Implementation Results Future work
Prerequisites
What needs to be done?
1 Identify necessary data
file namesaccessed file sections
2 Obtain data
various options (next slide)
3 Data processing
generation of application-level hints
4 Application of hints
prefetch data described by hints
Bjorn Dobel Application-Level Hints 24.06.2005 8 / 18
Introduction Implementation Results Future work
Prerequisites
What needs to be done?
1 Identify necessary data
file namesaccessed file sections
2 Obtain data
various options (next slide)
3 Data processing
generation of application-level hints
4 Application of hints
prefetch data described by hints
Bjorn Dobel Application-Level Hints 24.06.2005 8 / 18
Introduction Implementation Results Future work
Prerequisites
What needs to be done?
1 Identify necessary data
file namesaccessed file sections
2 Obtain data
various options (next slide)
3 Data processing
generation of application-level hints
4 Application of hints
prefetch data described by hints
Bjorn Dobel Application-Level Hints 24.06.2005 8 / 18
Introduction Implementation Results Future work
Prerequisites
What needs to be done?
1 Identify necessary data
file namesaccessed file sections
2 Obtain data
various options (next slide)
3 Data processing
generation of application-level hints
4 Application of hints
prefetch data described by hints
Bjorn Dobel Application-Level Hints 24.06.2005 8 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Monitoring options
Obtaining data
strace
restricted to system calls
ld preload
restricted to dynamically linked libraries
kProbes
Linux Tracing Toolkit
huge amount of data
implement own monitor
Bjorn Dobel Application-Level Hints 24.06.2005 9 / 18
Introduction Implementation Results Future work
Architecture
Architecture overview
Hint
devices
perf_insert_data()
Hint Generators
(e.g., HintGen) Applications
(e.g. ReadPref)
Hinting
Storage
User space
Kernel space
Sensors
Kernel subsystems
HintMod
Bjorn Dobel Application-Level Hints 24.06.2005 10 / 18
Introduction Implementation Results Future work
Kernel enhancements
Linux kernel enhancements
1 active sensors at certain points
sys open()add to page cache()
2 register callback to obtain sensor data3 HintMod kernel module
ring buffers to store sensor datadevice interface for user-space applications
Bjorn Dobel Application-Level Hints 24.06.2005 11 / 18
Introduction Implementation Results Future work
Kernel enhancements
Linux kernel enhancements
1 active sensors at certain points
sys open()add to page cache()
2 register callback to obtain sensor data
3 HintMod kernel module
ring buffers to store sensor datadevice interface for user-space applications
Bjorn Dobel Application-Level Hints 24.06.2005 11 / 18
Introduction Implementation Results Future work
Kernel enhancements
Linux kernel enhancements
1 active sensors at certain points
sys open()add to page cache()
2 register callback to obtain sensor data3 HintMod kernel module
ring buffers to store sensor datadevice interface for user-space applications
Bjorn Dobel Application-Level Hints 24.06.2005 11 / 18
Introduction Implementation Results Future work
Hint generation
Hint generation
scenario-specific
for the application startup scenario:
establish a connection between different kinds of sensor datamerge adjacent disk jobsorder disk jobs
Example from the KDE hint file/lib/tls/libcrypt.so.1
/usr/bin/startkde
0 3
/usr/lib/libqt-mt.so.3
0 495
508 330
861 143
1007 32
Bjorn Dobel Application-Level Hints 24.06.2005 12 / 18
Introduction Implementation Results Future work
Hint generation
Hint generation
scenario-specific
for the application startup scenario:
establish a connection between different kinds of sensor data
merge adjacent disk jobsorder disk jobs
Example from the KDE hint file/lib/tls/libcrypt.so.1
/usr/bin/startkde
0 3
/usr/lib/libqt-mt.so.3
0 495
508 330
861 143
1007 32
Bjorn Dobel Application-Level Hints 24.06.2005 12 / 18
Introduction Implementation Results Future work
Hint generation
Hint generation
scenario-specific
for the application startup scenario:
establish a connection between different kinds of sensor datamerge adjacent disk jobsorder disk jobs
Example from the KDE hint file/lib/tls/libcrypt.so.1
/usr/bin/startkde
0 3
/usr/lib/libqt-mt.so.3
0 495
508 330
861 143
1007 32
Bjorn Dobel Application-Level Hints 24.06.2005 12 / 18
Introduction Implementation Results Future work
Hint generation
Hint generation
scenario-specific
for the application startup scenario:
establish a connection between different kinds of sensor datamerge adjacent disk jobsorder disk jobs
Example from the KDE hint file/lib/tls/libcrypt.so.1
/usr/bin/startkde
0 3
/usr/lib/libqt-mt.so.3
0 495
508 330
861 143
1007 32
Bjorn Dobel Application-Level Hints 24.06.2005 12 / 18
Introduction Implementation Results Future work
Application of hints
Application of hints
ReadPref daemon
read(ahead) sections of files as described in hint filelow priority
decreases later application startups by up to 43%
Problem 1: Interference with “real” disk jobs
monitor number of currently active disk jobs
Problem 2: Cache overrun
can be solved in a similar way
Bjorn Dobel Application-Level Hints 24.06.2005 13 / 18
Introduction Implementation Results Future work
Application of hints
Application of hints
ReadPref daemon
read(ahead) sections of files as described in hint filelow priority
decreases later application startups by up to 43%
Problem 1: Interference with “real” disk jobs
monitor number of currently active disk jobs
Problem 2: Cache overrun
can be solved in a similar way
Bjorn Dobel Application-Level Hints 24.06.2005 13 / 18
Introduction Implementation Results Future work
Application of hints
Application of hints
ReadPref daemon
read(ahead) sections of files as described in hint filelow priority
decreases later application startups by up to 43%
Problem 1: Interference with “real” disk jobs
monitor number of currently active disk jobs
Problem 2: Cache overrun
can be solved in a similar way
Bjorn Dobel Application-Level Hints 24.06.2005 13 / 18
Introduction Implementation Results Future work
1 IntroductionThe problemApplication-level hints
2 Implementation
3 Results
4 Future work
Bjorn Dobel Application-Level Hints 24.06.2005 14 / 18
Introduction Implementation Results Future work
Measurements
Measurements
cold cache prefetched improvementstartup time startup time in %
GDM + X 12.78 s 12.15 s 5.00
KDE 18.90 s 11.81 s 37.50
Mozilla 5.14 s 2.89 s 43.80
Kate 4.10 s 2.91 s 29.00
The Gimp 7.68 s 6.83 s 13.10
Bjorn Dobel Application-Level Hints 24.06.2005 15 / 18
Introduction Implementation Results Future work
Measurements
Measurements ctd.
cold cache startup
warm cache startup
GDM KDE Mozilla Kate TheGIMP
prefetched startup
��������������������������������
��������������������������������
������������
������������
������������������������
������������������������
������������
������������
��������
��������
���
���
������
������
���
���
�����������
�����������
������������������
������������������
time / s
3
6
18
15
12
9
21
Bjorn Dobel Application-Level Hints 24.06.2005 16 / 18
Introduction Implementation Results Future work
Future work
Open issues
solve cache overrun problem
further investigation of scenarios
care for parallel prefetching
generate “informed” hints
acquire user-specific information
Bjorn Dobel Application-Level Hints 24.06.2005 17 / 18
Introduction Implementation Results Future work
Future work
Open issues
solve cache overrun problem
further investigation of scenarios
care for parallel prefetching
generate “informed” hints
acquire user-specific information
Bjorn Dobel Application-Level Hints 24.06.2005 17 / 18
Introduction Implementation Results Future work
Future work
Open issues
solve cache overrun problem
further investigation of scenarios
care for parallel prefetching
generate “informed” hints
acquire user-specific information
Bjorn Dobel Application-Level Hints 24.06.2005 17 / 18
Introduction Implementation Results Future work
Future work
Open issues
solve cache overrun problem
further investigation of scenarios
care for parallel prefetching
generate “informed” hints
acquire user-specific information
Bjorn Dobel Application-Level Hints 24.06.2005 17 / 18
Introduction Implementation Results Future work
Future work
Open issues
solve cache overrun problem
further investigation of scenarios
care for parallel prefetching
generate “informed” hints
acquire user-specific information
Bjorn Dobel Application-Level Hints 24.06.2005 17 / 18
Introduction Implementation Results Future work
Future work
The end
Feel free to ask questions.
Bjorn Dobel Application-Level Hints 24.06.2005 18 / 18