Task Scheduling for Highly Concurrent Analytical and Transactional Main-Memory Workloads Iraklis Psaroudakis (EPFL), Tobias Scheuer (SAP AG), Norman May.

Slides:



Advertisements
Similar presentations
Database Tuning Principles, Experiments and Troubleshooting Techniques Baseado nos slides do tutorial com o mesmo nome da autoria de: Dennis Shasha
Advertisements

Query Task Model (QTM): Modeling Query Execution with Tasks 1 Steffen Zeuch and Johann-Christoph Freytag.
Thread Criticality Predictors for Dynamic Performance, Power, and Resource Management in Chip Multiprocessors Abhishek Bhattacharjee Margaret Martonosi.
Enterprise Job Scheduling for Clustered Environments Stratos Paulakis, Vassileios Tsetsos, and Stathes Hadjiefthymiades P ervasive C omputing R esearch.
Institute of Computer Science Foundation for Research and Technology – Hellas Greece Computer Architecture and VLSI Systems Laboratory Exploiting Spatial.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
Spark: Cluster Computing with Working Sets
CSC457 Seminar YongKang Zhu December 6 th, 2001 About Network Processor.
Presented by Vigneshwar Raghuram
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
What will my performance be? Resource Advisor for DB admins Dushyanth Narayanan, Paul Barham Microsoft Research, Cambridge Eno Thereska, Anastassia Ailamaki.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
Computer Science Lecture 6, page 1 CS677: Distributed OS Processes and Threads Processes and their scheduling Multiprocessor scheduling Threads Distributed.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
The Impact of Performance Asymmetry in Multicore Architectures Saisanthosh Ravi Michael Konrad Balakrishnan Rajwar Upton Lai UW-Madison and, Intel Corp.
ITEC 325 Lecture 29 Memory(6). Review P2 assigned Exam 2 next Friday Demand paging –Page faults –TLB intro.
COLLABORATIVE EXECUTION ENVIRONMENT FOR HETEROGENEOUS PARALLEL SYSTEMS Aleksandar Ili´c, Leonel Sousa 2010 IEEE International Symposium on Parallel & Distributed.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Jonathan Walpole (based on a slide set from Vidhya Sivasankaran)
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
© Pearson Education Limited, Chapter 16 Physical Database Design – Step 7 (Monitor and Tune the Operational System) Transparencies.
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
Architectural Support for Fine-Grained Parallelism on Multi-core Architectures Sanjeev Kumar, Corporate Technology Group, Intel Corporation Christopher.
Politecnico di Torino Dipartimento di Automatica ed Informatica TORSEC Group Performance of Xen’s Secured Virtual Networks Emanuele Cesena Paolo Carlo.
Porting Irregular Reductions on Heterogeneous CPU-GPU Configurations Xin Huo, Vignesh T. Ravi, Gagan Agrawal Department of Computer Science and Engineering.
BW Know-How Call : Performance Tuning dial-in phone numbers! U.S. Toll-free: (877) International: (612) Passcode: “BW”
Status of the vector transport prototype Andrei Gheata 12/12/12.
StreamX10: A Stream Programming Framework on X10 Haitao Wei School of Computer Science at Huazhong University of Sci&Tech.
BOF: Megajobs Gracie: Grid Resource Virtualization and Customization Infrastructure How to execute hundreds of thousands tasks concurrently on distributed.
E X C E E D I N G E X P E C T A T I O N S OP SYS Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Functions of an operating.
Srihari Makineni & Ravi Iyer Communications Technology Lab
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Vidhya Sivasankaran.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Scaling up analytical queries with column-stores Ioannis Alagiannis Manos Athanassoulis Anastasia Ailamaki École Polytechnique Fédérale de Lausanne.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Computer Network Lab. Korea University Computer Networks Labs Se-Hee Whang.
CSC Multiprocessor Programming, Spring, 2012 Chapter 11 – Performance and Scalability Dr. Dale E. Parson, week 12.
1 Adaptive Parallelism for Web Search Myeongjae Jeon Rice University In collaboration with Yuxiong He (MSR), Sameh Elnikety (MSR), Alan L. Cox (Rice),
A N I N - MEMORY F RAMEWORK FOR E XTENDED M AP R EDUCE 2011 Third IEEE International Conference on Coud Computing Technology and Science.
Martin Kruliš by Martin Kruliš (v1.1)1.
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
An Efficient Threading Model to Boost Server Performance Anupam Chanda.
Purpose of Operating System Part 2 Monil Adhikari.
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
CERN IT Department CH-1211 Genève 23 Switzerland t Load testing & benchmarks on Oracle RAC Romain Basset – IT PSS DP.
Lucas De Marchi sponsors: co-authors: Liria Matsumoto Sato
RT-OPEX: Flexible Scheduling for Cloud-RAN Processing
Optimizing Distributed Actor Systems for Dynamic Interactive Services
Hathi: Durable Transactions for Memory using Flash
Chapter 6: CPU Scheduling (Cont’d)
lecture 5: CPU Scheduling
Reducing OLTP Instruction Misses with Thread Migration
Processes and Threads Processes and their scheduling
Task Scheduling for Multicore CPUs and NUMA Systems
Introduction to NewSQL
Software Architecture in Practice
Frequency Governors for Cloud Database OLTP Workloads
Chapter 6: CPU Scheduling
Overview Introduction VPS Understanding VPS Architecture
Department of Computer Science University of California, Santa Barbara
Predictive Performance
George Prekas, Marios Kogias, Edouard Bugnion
Jeongseob Ahn*, Chang Hyun Park‡, Taekyung Heo‡, Jaehyuk Huh‡
Support for ”interactive batch”
Introduction to SAP HANA
Process scheduling Chapter 5.
Operating Systems Lecture 1.
Department of Computer Science University of California, Santa Barbara
CSC Multiprocessor Programming, Spring, 2011
A tutorial on building large-scale services
Presentation transcript:

Task Scheduling for Highly Concurrent Analytical and Transactional Main-Memory Workloads Iraklis Psaroudakis (EPFL), Tobias Scheuer (SAP AG), Norman May (SAP AG), Anastasia Ailamaki (EPFL) 1

Scheduling for high concurrency 2 Queries >> H/W contexts Limited number of H/W contexts How should the DBMS use available CPU resources?

Scheduling for mixed workloads 3 OLTPOLAP Short-lived Reads & updates Scan-light Long-running Read-only Scan-heavy How to schedule highly concurrent mixed workloads? Single thread Parallelism Contention in highly concurrent situations

Scheduling tactics OS scheduler Time Context switch Cache thrashing Admission control We need to avoid both underutilization and overutilization # Threads Time # H/W contexts Overutilization } underutilization } overutilization Coarse granularity of control

Task scheduling A task can contain any code 5 run() {... } One worker thread per core processing tasks Socket 1Socket 2 Task queues Provides a solution to efficiently utilize CPU resources OLAP queries can parallelize w/o overutilization Distributed queues to minimize sync contention Task stealing to fix imbalance Distributed queues to minimize sync contention Task stealing to fix imbalance

Task scheduling problems for DBMS OLTP tasks can block –Problem: under-utilization of CPU resources –Solution: flexible concurrency level OLAP queries can issue an excessive number of tasks in highly concurrent situations –Problem: unnecessary scheduling overhead –Solution: concurrency hint 6

Outline Introduction Flexible concurrency level Concurrency hint Experimental evaluation with SAP HANA Conclusions 7

Fixed concurrency level 8 A fixed concurrency level is not suitable for DBMS Typical task scheduling: Bypasses the OS scheduler OLTP tasks may block Underutilization Fixed

Flexible concurrency level Issue additional workers when tasks block Cooperate with the OS scheduler 9 Concurrency level = # of worker threads Active Concurrency level = # of active worker threads OS Active concurrency level = # H/W contexts The OS schedules the threads

Task Scheduler Worker states 10 Inactive Workers Watchdog: –Monitoring, statistics, and takes actions –Keeps active concurrency level ≈ # of H/W contexts Blocked in syscall Inactive by user Waiting for a task Parked workers Active workers Watchdog Other threads We dynamically re-adjust the scheduler's concurrency level

Outline Introduction Flexible concurrency level Concurrency hint Experimental evaluation with SAP HANA Conclusions 11

Partitionable operations Can be split in a variable number of tasks 12 Calculates its task granularity Σ Σ 1 ≤ # tasks ≤ # H/W contexts Problem: calculation independent of the system’s concurrency situation  High concurrency: excessive number of tasks Unnecessary scheduling overhead We should restrict task granularity under high concurrency Partition 1 Partition 2 Partition 3 Final result

Restricting task granularity Existing frameworks for data parallelism –Not straightforward for a commercial DBMS –Simpler way? 13 free worker threads = max(0, # of H/W contexts - # active worker threads) The concurrency hint serves as an upper bound for # tasks concurrency hint = exponential moving average of free worker threads

High latency Low scheduling overhead Higher throughput High latency Low scheduling overhead Higher throughput Concurrency hint 14 Low concurrency situations Lightweight way to restrict task granularity under high concurrency High concurrency situations Concurrency hint  # H/W contexts Concurrency hint  1 Σ Σ Σ Σ Σ Σ Σ Σ Σ Σ Low latency

Outline Introduction Flexible concurrency level Concurrency hint Experimental evaluation with SAP HANA Conclusions 15

Experimental evaluation with SAP HANA TPC-H SF=10 TPC-H SF=10 + TPC-C WH=200 Configuration: –8x10 Intel Xeon E GHz, with hyperthreading, 1 TB RAM, 64-bit SMP Linux (SuSE) kernel –Several iterations. No caching. No thinking times. We compare: –Fixed (fixed concurrency level) –Flexible (flexible concurrency level) –Hint (flexible concurrency level + concurrency hint) 16

TPC-H – Response time 17 Task granularity can affect OLAP performance by 11%

TPC-H - Measurements 18 Unnecessary overhead by too many tasks under high concurrency

TPC-H - Timelines 19 Fixed Hint

TPC-H and TPC-C 20 Throughput experiment –Variable TPC-H clients = TPC-C clients = 200.

Conclusions Task scheduling for –Resources management For DBMS –Handle tasks that block Solution: flexible concurrency level –Correlate task granularity of analytical queries with concurrency to avoid unnecessary scheduling overhead Solution: concurrency hint 21 Thank you! Questions?

Outline Introduction Flexible concurrency level Concurrency hint Experimental evaluation with SAP HANA Conclusions 22

TPC-H and TPC-C - Measurements 23

Metadata Manager Authorization Transaction Manager SAP HANA’s architecture 24 Persistence Layer (Logging, Recovery, Page Management) Row-Store Column- Store Graph Engine Text Engine Scheduler Execution Engine Executor Dispatcher Optimizer and Plan Generator Calculation Engine Various access interfaces (SQL, SQL Script, etc.) Metadata Manager Authorization Transaction Manager Connection and Session Management Receivers Network

Our task scheduler 25 Root Node Non-root Nodes Uninitiated graphs Task queues Worker threads Task graph Distributed queues to minimize sync contention Task stealing for load-balancing Distributed queues to minimize sync contention Task stealing for load-balancing