Download presentation
Presentation is loading. Please wait.
Published byErick Shelton Modified over 9 years ago
1
Mohammed Abouzour, Kenneth Salem, Peter Bumbulis Presentation by Mohammed Abouzour SMDB2010
2
Database servers have two main architectures: Worker-per-connection: (Oracle, Sybase ASE) A worker is dedicated for each connection for the life of the connection Worker-per-request: (Oracle, Microsoft SQL Server, Sybase ASE, Sybase SQL Anywhere) A worker pool and a request queue: each worker picks and complete one request at a time. No guarantee that the same worker will service the same connection. 2
3
Efficient in resource use and handling of large number of connections (1) How to choose the size of the worker pool? A large worker pool: Increases the concurrency level of the server Increases contention on server resources Increases working set size of server A smaller worker pool: Under utilization of hardware resources Limit concurrency level of workload Possibility of a server hang due to no workers available to handle outstanding requests 3
4
Dynamically adjust the size of the worker pool (the multiprogramming level of the server) Benefits of dynamic MPL: One less parameter for DBAs to worry about One of the design goals of Sybase SQL Anywhere Improve server performance for different workloads Better handling of changes in workload transaction mix We used throughput as a way to detect degraded server performance 4
5
Introduction to Problem Controller Design and Tuning Algorithms Experimental Study Results Future Work 5
6
6
7
7
8
Tuning algorithms are based on a paper by Heiss and Wagner (2) : Incremental Steps algorithm (IS) Parabola Approximation (PA) Original algorithms were studied in simulation Our contribution to the original algorithms (3) : We have extended the IS algorithm We have used a commercial database system and an industry standard benchmark (TPC-C) We have studied the behaviour of the above two algorithms under different workloads 8
9
NotationDescription titi End of current control interval and start of the next control interval t i+1 P(t i )The actual measured throughput level of the server at time t i. Throughput is the number of request completed during the previous measurement interval n(t i )The workload concurrency level at time t i n * (t i )The number of workers the server has available. 9
10
Original IS algorithm did not handle a throughput curve that flattens out Modified the IS algorithm as follows: Follow the throughput curve up as long as percentage of change in throughput is greater than C times the percentage of change in number of threads Follow the throughput curve down as long as throughput increases Built-in bias to keep the number of threads as low as possible 10
11
Model the throughput curve as a parabolic function: Collect two points from the last two measurements and use the origin Only make adjustments if the computed parabolic curve is concave down, otherwise just make a random adjustment 11
12
Used the TPC-C workload for our benchmark Used two workloads variations: TPCC1:Standard TPC-C transaction mix TPCC2:Modified TPC-C transaction mix (lighter on I/O and higher CPU component) Two different buffer pool configurations: BIGMEM:1.0GB SMALLMEM:0.5GB Three different workload configurations: TPCC1-BIGMEM TPCC1-SMALLMEM TPCC2-BIGMEM 12
13
Workload characterization experiments: Ran each workload under different fixed MPL setting and generated a throughput curve for each workload Experiments: Auto-tuning experiments: We ran each of the workloads and allowed the auto tuning algorithms to adjust MPL dynamically Changing workloads experiments: We start with one workload and half way in the experiment we switch to a different workload 13
14
TPCC1-BIGMEM TPCC1-SMALLMEM 14
15
Hill Climbing Global Parabola Approximation 15
16
Hill Climbing Global Parabola Approximation 16
17
Hill Climbing Global Parabola Approximation 17
18
Not all workloads in database systems have hill- shaped throughput curve Both algorithms were able to react appropriately to workloads changes The Hill Climbing algorithm: Smoother in making adjustments (more desirable) Takes longer to reach optimal values Can get stuck in a local minima The Global Parabola approximation algorithm: Takes variable step sizes and hence reacts faster to changes Very sensitive to normal minor workload fluctuations 18
19
A hybrid controller: Uses the Hill Climbing algorithm for a number of steps and collects data Uses the data collected with the Parabola Approximation algorithm We reduced the control interval length Hill Climbing modifications: Take dynamic step sizes to speed up algorithm C parameter reduced to make algorithm more aggressive Parabola Approximation modifications: Use least-square method to do curve fitting on collected data Results: 90-95% of optimal tpmC compared to a hand tuned version In other internal CPU-bound benchmark was able to improve performance by 32% 19
20
Dynamically adjusting the MPL: Improves server performance in some workloads compared to a fixed MPL Handles changes to workload conditions effectively Brings us one step closer to a self managing database system Algorithm parameters can affect the performance of the algorithms: Control interval length Hill Climbing: Step sizes C parameter The algorithms did not behave good for the following workloads: Bursty workloads: busy periods followed by idle periods followed by busy periods Long running requests: e.g. creating an index Use response time to help the auto tuning algorithm 20
21
1. B. Schroeder, M. Harchol-Balter, A. Iyengar, E. Nahum, and A. Wierman, “How to determine a good multi-programming level for external scheduling,” in Proceedings of the 22 nd International Conference on Data Engineering. Washington, DC, USA: IEEE Computer Society, 2006, p. 60. 2. H.-U. Heiss and R. Wagner. “Adaptive load control in transaction processing systems,” in VLDB ‘91: Proceedings of the 17 th International Conference on Very Large Data Bases. San Francisco, CA, USA: Morgan Kaufmann Publishers Inc., 1991, pp. 47-54. 3. M. Abouzour, “Automatically tuning database server multiprogramming level,” Master’s thesis, University of Waterloo, 2007 21
22
22
23
150 Warehouses 10 clients per warehouse 500 connections C = 0.4, Delta = 10 Gamma=0.333, Delta = 10 Windows 2003 32-bit Dual 1.80Ghz Intel Xeon 48 Spindles 10K RPM SCSI drives 23
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.