Load Testing with SQL Server Tools
Neil Hambly
SQL Server Practice Lead
Northdoor PLC
SQLSaturday #467 Sponsors
SQLSaturday #467 Admin
Raffle prizes from Sponsors
Will be drawn at 17:00, you need to be here in order to win if your name is drawn.
Lunch will be served in the Exhibitor Area at 12:00 with sponsorsessions taking place in session rooms.
If you need to leave early can you let registration know
We need to know who is still here in the event of a fire evacuation etc.
Enjoy the sessions and have a great time 
 Neil Hambly
Permanent Roles
Northdoor (London) Oct 2014 – Current
SQL Server Practice Lead
ASOS  (London) Jan 2014 – July 2014
Principal Database Engineer
Confio (UK/EMEA) Oct 2012 – Dec 2013
Senior System Engineer & DBA
MDSL   (London)July 2010 – Sept 2012
DB Architect
Editions:  SQL 2005 – 2008 R2 Log-shipping,
Service Broker, SSRS, SSAS
iProfile  (London)Oct 2004 – June 2010
DB Architect | DBA | DB Developer (Database Lead )
Editions:  SQL 2000 – 2005; Clustering,
Service Broker, Replication, SSRS
Accenture (Dublin)June 1999– Oct 2004
DBA | DB Developer  (Global BI  - Team Leader)
Editions: SQL6.5 – 2000, Replication, DTS, OLAP
Contractor  Roles
BBC14 Months (DB Support )
ABN AMRO  16 Months (DB Developer)
Contact info
     @Neil_Hambly
PASS Chapter: www.sqllondon.sqlpass.org
UK UG:             www.sqlserverfaq.com
Blog:   http://dataidol.com/NeilHambly
SQL Professional (18+ years)
PASS London Chapter Leader
PASS ProfDev VC Leader
Organiser at UK SQL ServerConferences & User-Groups
Regular UK & International presenter(>100 since 2011)
PASS Summit presenter
(2011, 2012, 2013, 2014, 2015)
PASS BA Conference (2012)
PASS Rally’s in US & Europe
PASS SQLSaturdays 35+
http://sqlcruise.com/wp-content/uploads/2012/09/Tech-Leader-2013_250x250.jpg
Training Kit
 70-462
Contributor
Southampton Agenda
Baselines
Comparison’s
Load Testing (Replay)
Activity
Distributed Replay Controller (DRC)
Profiler Replay
HammerDB | Other Tools
Profiler Demo
DRC Demo
Load Testing – ABC’s
Activity
Preparing Workload, Tool choices
Objectives, Capturing metrics
Scenarios: Capacity Planning, Performance
Baselines
Scenarios: Capacity Planning, Performance, Migrations
Compare to “Normal” activity levels
Comparisons
What’s changed (metrics)
Does it work, scale
Quick Tool Comparisons
Replaying Traces
Profiler Demos
Distributed Replay Controller {preparation}
Firewall Rules
On the controller and client computers, you must allow inbound traffic through the firewall
for the corresponding service. Specify the firewall rules for the service
For the controller service, create a rule for DReplayController.exe
located in the installation folder. For example, the following command enables this rule, where%InstallPath% is the installation folder of the service:
netsh advfirewall firewall add rule name="allow dreplay controller" dir=inprogram="%InstallPath%\DReplayController\DReplayController.exe" action=allow
For the client service, on each client computer, create a rule for DReplayClient.exe, located in theinstallation folder. For example, the following command enables this rule, where %InstallPath% is theinstallation folder of the service:
netsh advfirewall firewall add rule name="allow dreplay client" dir=inprogram="%InstallPath%\DReplayClient\DReplayClient.exe" action=allow
Grant each client permissions on the target server:
After you have completed installing the client service on the client computers, you must manually add theclient service accounts to the sysadmin role on the target instance of SQL Server.
Replay file output example
Replay against SQL Server 2012 using clients
Preprocess phase has been completed. Controller will take 2 files“ReplayEvents.irf”, “TraceStats.xml” and copy them to the clients(ServerN1,ServerN3) and replay them on the clients against target server whichis SQL Server 2012 called ServerN2\SQL2012.
Here is the command to do so:
dreplay replay -s ServerN2\sql2012rca0 -w ServerN1,ServerN3 -f 10 -o -d "C:\DRPreProcess"
The -o parameter will save the trace output within
At the same time open a profiler trace and connect to target server which isServerN2\SQL2012 collect profiler trace.
Then you can compare the trace file from source server and trace file fromtarget server and check some query performance.
That’s it! Hopefully we have covered the basics of Distributed Replay and
how you can use it to reproduce a workload on a test system
“C:\Program Files (x86)\Microsoft SQL Server\110\Tools\DReplayClient\ResultDir”
DRC Demos
HammerDB
Microsoft SQL Server OLTP (Transactional) Load Testing
Good Tool for loading the System and testing & identifying resourcing limits
Profiler vs XEvents
Thank YouContact me @Neil.Hambly@Northdoor.co.uk
SQLSaturday #467 Sponsors