Download presentation
Presentation is loading. Please wait.
Published byAmice Ferguson Modified over 9 years ago
1
© Toni Cortes Improving Application Performance through Swap Compression R. Cervera, T. Cortes, Y. Becerra and S. Lucas
2
© Toni Cortes Motivation Problem Large applications Highly-loaded systems Laptops Laptops usually have less resources than desktops Homework Home machines are usually smaller than office machines Solution Swapping mechanism But … IT IS VERY SLOW !!!
3
© Toni Cortes Objectives Increase swapping performance Without adding more memory Increase swapping space Without adding more disk Performance is more important than space Modify the kernel as little as possible Mechanism feasible in user-level libraries
4
© Toni Cortes Traditional Swapping Path Operating System Page Fault Swap Out Swap In Process A Process B Swap Device Process C Process D
5
© Toni Cortes Proposal Cache for swapped pages If the system uses memory for the cache Then the applications lose this memory Problem: Less fast memory More slow memory Compression of swapped pages More than one compressed page per buffer
6
© Toni Cortes Compressed Swapping v1.0 Cache CD Operating System D Swap Device
7
© Toni Cortes Hit Ratio and Its Kinds There are two kind of cache hits Hits due write Page recently swapped out Hits due read Page brought to the cache with another request Many more hits due write than hits due read Different swap-in and swap-out order No spatial locality Reads produce interferences in the cache
8
© Toni Cortes Optimizations Different read and write paths Reads do not place information in the cache Reads use the cache (hits due write) Reads do not modify the cache Writes place information in the cache Writes modify the cache Batched writes Write many cache buffers to disk at the same time Write them contiguously A page is never split among two buffers Reads perform, at most, one disk access
9
© Toni Cortes Compressed Swapping v2.0 Cache C Operating System D D Swap Device
10
© Toni Cortes Evaluated Environment Environment Pentium II - 350Mhz 64 Mbytes of memory Ultra-SCSI disk, 128 Mbytes swap partition Bencmarks
11
© Toni Cortes Performance Evaluation Parameters Cache size = 1Mbyte Cleaning threshold =50% Better performance Speedups better than 1.2 FFT Speedup = 0.96 Bad compression ratio Working set Simulator x5 Good compression ratio All pages fit in the cache 6,5
12
© Toni Cortes Cache-size Influence No perfect cache size Large caches are bad Use too much application memory Recomended size Around 1Mbyte
13
© Toni Cortes Batched-write Influence Small values are bad Small writes Latency is not hidden Large values Mono-process bench Good Multi process bench Reads confilct with cleans Recommended value Around 10%
14
© Toni Cortes New-swap Capacity Some improvement achieved Allows larger applications Depends on Compression ratio Fragmentation
15
© Toni Cortes Related Work Compressed cache (Douglis93) No difference between reads and writes Limited batched writes Performance gains only for applications with high compression ratio Single process benchmarks MagnaRAM Memory compression for Windows Not very good results
16
© Toni Cortes Conclusions Simple mechanism to: Increase performance of large applications Increase swap space Easy to implement Modified 6 routines and 2 files Added 9 routines and 1 include file (.h ) Easy to port from one version to another 15 minutes Can be used in out-of-core applications
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.