posted 2/14/2012 9:18:30 AM by Amit Bansal - Views: [11460]
SQL Server - Stress Testing your database engine using RML utilities
Hi Friends,
As a DBA, stress testing and performance benchmarking is one of the most important activities that you would perform. There are many techniques and choice of tools at your disposal. In many cases, I have used RML utilities.
If you look into the description of RML utilities provided by Microsoft at http://support.microsoft.com/kb/944837, you will observe that they talk about the following benefits:
•You can determine the application, the database, the SQL Server login, or the query that is using the most resources.
•You can determine whether the execution plan for a batch is changed when you capture the trace for the batch. Additionally, you can use the RML Utilities for SQL Server to determine how SQL Server performs each of these execution plans.
•You can determine the queries that are running slower than before.
The above benefits are fine and understandable if you read more and use RML utilities. However, one benefit gets ignored here: Stress Testing your SQL instance.
The question is: “How can I stress my SQL Server to projected levels with a current workload?” And here comes the OStress utility from the RML pack.
RML stands for Replay MarkUp Language and consists of four utilities:
•ReadTrace
•Reporter
•OStress
•OStress Replay Control Agent (ORCA)
I want to highlight the OStress utility. OStress is a simple and scalable command line application which can stress or replay database commands. You can specify a query via a command line parameter, .SQL script or .RML file. You have switches to simulated number of connections and iterations for a given workload.
For example:
The following command runs stress_01.sql simulating 200 connections and iterates 2000 times.
Ostress.exe –ic:\AmitStresTest\stress_01.sql –n200 –r2000 –oc:\ AmitStresTest \output
And your stress_01.sql can contain simple or complex code that causes CPU or memory pressure. With this, you can test the scalability of SQL Server for a given workload. You can record performance benchmark etc,
Just an example of what stress_01.sql can contain: cross join with the largest table in your database.
The set of tools offer a great deal of help here. Before you get surprises in your production environment with huge workloads and simultaneous access, stress test now and have your answers ready.
RML utilities have a 32 bit and 64 bit versions which can be downloaded from http://support.microsoft.com/kb/944837
If you liked this post, do like us on FaceBook at http://www.FaceBook.com/SQLServerGeeks
Regards, Amit Bansal
http://www.twitter.com/A_Bansal http://www.twitter.com/SQLServerGeeks http://www.amitbansal.net/ Visit my FaceBook page at http://www.facebook.com/AmitRSBansal Contribute on SQLServerGeeks.com: visit http://www.sqlservergeeks.com/default-category/write-for-us
Amit Bansal (Member since: 3/12/2011 4:59:54 PM) Follow Amit at Twitter @A_Bansal : Amit Bansal is the CTO of eDominer Systems & Peopleware India. He is a consultant, trainer, writer, speaker & evangelist on SQL Server & Business Intelligence. A seasoned speaker; he speaks at major summits and conferences of Microsoft worldwide including TechED, MCT Summits, MSDN & TechNet conferences. Over the last 8 years, he has consulted, trained & mentored more than 6000 IT professionals on SQL Server & Business Intelligence and worked with top notch blue chip companies worldwide including Microsoft, Infosys, Wipro, RBS, HCL, HP, Siemens, IBM, Accenture, etc. He has delivered more than 400 workshops on SQL Server & Business Intelligence. Apart from holding many Microsoft credentials, he is also a Microsoft Most Valuable Professional (MVP) awardee on SQL Server. He is also one of the first Microsoft Certified Trainer in India. Amit has worked with Microsoft in India and US as a Subject Matter Expert in various capacities participating in OD sessions, technical reviewing, etc. He is also a very active community lead in Asia Pacific. Visit www.amitbansal.net to know more. Subscribe to Amit’s blog and be a member of his technical forum at www.SQLServerGeeks.com - an exclusive SQL Server portal. Visit www.peoplewareindia.com for Corporate Training solutions. FaceBook – http://www.facebook.com/people/Amit-Bansal/525339346 LinkedIn – http://www.linkedin.com/pub/amit-bansal/7/121/755
View Amit Bansal 's profile
So how is this tool different from SQLIOSM ?
Leave a comment