Got stress? Sometimes the SQL Server needs some too

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

Performance Testing - Kanwalpreet Singh.
Database System Concepts and Architecture
Planning Server Deployments
Chapter 2: Automating the Windows Vista Installation.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 8 Introduction to Printers in a Windows Server 2008 Network.
Passage Three Introduction to Microsoft SQL Server 2000.
Dynamics AX Technical Overview Application Architecture Dynamics AX Technical Overview.
Sharepoint Portal Server Basics. Introduction Sharepoint server belongs to Microsoft family of servers Integrated suite of server capabilities Hosted.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
1 Chapter Overview Reviewing the Results of Installation Starting, Stopping, Pausing, and Modifying Microsoft SQL Server 2000 Services Working with Osql,
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
Introduction to Cloud Computing
Module 7: Fundamentals of Administering Windows Server 2008.
Introduction to Database Management. 1-2 Outline  Database characteristics  DBMS features  Architectures  Organizational roles.
1 SQL Server 2000 Administration Kashef Mughal MSB.
WINDOWS XP PROFESSIONAL AUTOMATING THE WINDOWS XP INSTALLATION Bilal Munir Mughal Chapter-2 1.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
Module 4 : Installation Jong S. Bok
CSS/417 Introduction to Database Management Systems Workshop 4.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
A Brief Documentation.  Provides basic information about connection, server, and client.
Module 5: Creating and Configuring Group Policies.
Module 4 Planning for Group Policy. Module Overview Planning Group Policy Application Planning Group Policy Processing Planning the Management of Group.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
1 Chapter Overview What is Microsoft SQL Server 2000? What are the SQL Server 2000 Components? What is the Relational Database Architecture? What is the.
Features Of SQL Server 2000: 1. Internet Integration: SQL Server 2000 works with other products to form a stable and secure data store for internet and.
ViaSQL Technical Overview. Viaserv, Inc. 2 ViaSQL Support for S/390 n Originally a VSE product n OS/390 version released in 1999 n Identical features.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Planning Server Deployments Chapter 1. Server Deployment When planning a server deployment for a large enterprise network, the operating system edition.
 Project Team: Suzana Vaserman David Fleish Moran Zafir Tzvika Stein  Academic adviser: Dr. Mayer Goldberg  Technical adviser: Mr. Guy Wiener.
Oracle 10g Administration Oracle Server Introduction Copyright ©2006, Custom Training Institute.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
SQL Database Management
DBMS Programs MS SQL Server & MySQL
Fundamental of Databases
Unit 3 Virtualization.
Data Virtualization Demoette… ODBC Clients
Consulting Services JobScheduler Architecture Decision Template
Benchmarking like a PRO
Got stress? Sometimes the SQL Server needs some too
Database System Concepts and Architecture
Using a Gateway to Leverage On-Premises Data in Power BI
Consulting Services JobScheduler Architecture Decision Template
Peter Shore SQL Saturday Pittsburgh 2017
Installation and database instance essentials
Using a Gateway to Leverage On-Premises Data in Power BI
DEA Will Be Your New Best Friend!
Upgrading to Microsoft SQL Server 2014
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Analysis Services for the Absolute Beginner
Data Professional’s junk drawer
Data Professional’s junk drawer
Purpose, Pitfalls and Performance Implications
System And Application Software
Networks Software.
Oracle Architecture Overview
Purpose, Pitfalls and Performance Implications
Cloud computing mechanisms
Microsoft SQL Server Upgrade and Downgrade scenarios
NAVIGATING THE MINEFIELD
Data Professional’s junk drawer
Performance And Scalability In Oracle9i And SQL Server 2000
Service Template Creation from the Ground Up
Service Template Creation from the Ground Up
UFCEUS-20-2 Web Programming
Continuous Learning for the Modern Age
SQL Starter Intro To Database Administration
Presentation transcript:

Got stress? Sometimes the SQL Server needs some too Peter Shore SQL Saturday Pittsburgh 2017

Agenda Introduction Testing Why we want stress Distributed Replay OStress SQL Query Stress HammerDB

Specialize in remote database administration, operating system, and enterprise application support services 24x7, 100% onshore support across all major database platforms including SQL Server, MySQL, PostgreSQL, Oracle, Oracle Applications, and DB2 Full suite of Microsoft Business Intelligence and Database Activity Monitoring services available Currently support hundreds of customers and thousands of databases daily www.rdx.com

Who am I? SQL Server DBA – Remote Database Experts (RDX) Intentionally Accidental DBA Over 20 years IT experience Server Engineer Desktop Engineer Network Infrastructure Desk side support President CBusPASS Co-Organizer SQL Saturday Columbus Member Multiple Virtual Chapters How to find me Twitter: @pshore73 E-mail: pshore73@outlook.com

Stress The non-specific response of the body to any demand for change Fulfillment of an infinite number of requests via finite set of resources The confusion caused when ones mind overrides the body’s natural desire to choke the living **** out of some ***hole that desperately needs it.

Stress SQL Server – Why & Where Development Testing Application development Stored Procs/Functions/Queries Problem Resolution Duplicate production load Solve problems Benchmark Learning Dev/QA/Test/UAT Pre-Production Lab

Stress To Emulate Query Database Instance Noisy Neighbors Poorly written query/queries Death by 1,000 cuts Database Many users/queries interacting with the database Instance Other databases that are highly active Noisy Neighbors Other SQL instances on the server Other applications on the server Other servers on the virtualization host

Stress Testing SQL Server Write our own test Mission specific High degree of control Time consuming Single Query tools Ostress SQL Query Stress Database tools HammerDB Instance Tools Distributed Replay OStress

Distributed Replay Microsoft supplied and supported Debuted SQL Server 2012 Uses Profiler Trace to capture a workload Must capture from SQL 2005 or later Similar to replaying trace Playback against a different server Can be played through multiple clients simultaneously Any number from 1 through 16

Distributed Replay

Distributed Replay Use Cases Installation & Configuration Test SQL Version upgrade Test Windows/SQL service packs/cumulative updates/patches Test hardware upgrades Test virtualization Provide load for performance testing When multiple replay clients are needed Installation & Configuration Installs from SQL Server installation media Use local or domain service accounts Firewall exceptions may be needed

Distributed Replay Requirements Usage All logins/users contained in trace data must be present in the same database on target Must have same permissions Database IDs ideally should match, matching can be performed by database name if present in trace Usage Create new trace using the TSQL – Replay template Capture workload & save trace Preprocess the trace files to prepare for distributed clients Replay against target server using 1 or more clients

Distributed Replay Reference Links Overview Installation Usage Forum https://docs.microsoft.com/en-us/sql/tools/distributed-replay/sql-server-distributed-replay Installation https://technet.microsoft.com/en-us/library/ff878239(v=sql.110) https://blogs.msdn.microsoft.com/mspfe/2012/11/08/using-distributed-replay-to-load-test-your-sql- serverpart-1/ https://www.sqlskills.com/blogs/jonathan/installing-and-configuring-sql-server-2012-distributed- replay/ http://www.slideshare.net/stevedxu/sql-server-distributed-replay Usage https://blogs.msdn.microsoft.com/mspfe/2012/11/14/using-distributed-replay-to-load-test-your-sql- serverpart-2/ https://technet.microsoft.com/en-us/library/ff878406(v=sql.110) https://www.sqlskills.com/blogs/jonathan/performing-a-distributed-replay-with-multiple-clients- using-sql-server-2012-distributed-replay/ Forum https://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqldru

OSTRESS Part of RML Utilities Command prompt based Multi-threaded Can be used as part of a script Multi-threaded ODBC based Simulates multiple connections Is able to replay trace files or run scripts

OSTRESS In-line query Query from file All the script files in a folder ostress -E -d"StackOverflow" -Q"select U.Reputation, C.Text from dbo.Users as U inner join dbo.Comments as C on U.Id = C.Id" -n"10" - o"C:\temp“ Query from file Ostress.exe –ic:\AmitStresTest\stress_01.sql –n200 –r2000 –oc:\ AmitStresTest \output (sample from SQLServergeeks.com) All the script files in a folder Ostress.exe –ic:\temp\*.sql – n100 – r1000 –oc:\temp\output (sample from SQLConsulting.com)

OSTRESS OStress Replay Control Agent (ORCA) Conceptually similar to Distributed Replay Requires same hardware architecture and version of RML Utilities Use the OStress control.ini to point to ORCA server

OSTRESS Background and link to installer ORCA and OStress https://support.microsoft.com/en-us/help/944837/description-of-the-replay- markup-language-rml-utilities-for-sql-server ORCA and OStress https://blogs.msdn.microsoft.com/psssql/2009/01/23/inf-multi-machine- replay-using-orca-and-ostress/ Miscellaneous https://www.brentozar.com/archive/2017/02/simulating-workload-ostress- agent-jobs/ https://www.sqlshack.com/sql-server-stress-testing-using-ostress/

SQL Query Stress Originally written by Adam Machanic Maintained by Erik Ejlskov Jensen Single exe GUI based tool to run one query multiple times Able to run multiple times on the same machine

SQL Query Stress Reference links GitHub https://github.com/ErikEJ/SqlQueryStress Too many references to link on Adam Machanic’s site http://sqlblog.com/blogs/adam_machanic

Benchmark TPC Non-profit organization founded to define transaction & database benchmarks http://www.tpc.org/default.asp TPC-C OLTP Benchmark Simulates complete computing environment Users execute transactions against a database http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-c_v5.11.0.pdf TPC-H Decision Support Benchmark Business oriented ad hoc queries and concurrent data modifications http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.17.3.pdf

HammerDB Open source Load test/benchmarking tool Not official TPC scoring GUI based graphical database Limits command line functionality Customizable workloads, if you know TCL Not just for SQL Server Oracle DB2 PostgreSQL MySQL Redis Trafoion

HammerDB Usage Change BENCHMARK to MS SQL Server Schema Build Set name of server Can change name of database, but the target must be empty Adjust number of warehouses & users to build warehouses Double click build Driver Script Set database connection Set number of transactions per user or the length of the test in time Double click load Click green arrow to run test

HammerDB Reference http://www.hammerdb.com/index.html All documentation can be found on the site

Questions?