SQL Server
Microsoft SQL Server is a relational database management system developed by Microsoft. As a database, it is a software product whose primary function is to store and retrieve data as requested by other software applications. Different editions of Microsoft SQL Server are available. Performance of database system depend on several parameters such as operation mode (READ/WRITE/UPDATE), Number of records in DB and size of a single entry.
Performance metrics
Transaction Response Time
Transaction Response Time represents the time taken for the database to complete a defined transaction or business process. The importance of Transaction Response Time is that it gives an idea of how the application is performing in the measurement of time.The objective of a performance test is to ensure that the application is working perfectly under load.
Transaction Throughput
The speed of a database system is measured by the transaction throughput, expressed as a number of transactions per second. Generally, the speed of a database system is measured by the transaction throughput, expressed as a number of transactions per second. The two gating factors for database performance in a transactional system are usually the underlying database files and the log file. Both are factors because they require disk I/O, which is slow relative to other system resources such as CPU.
JMeter
The Apache JMeter desktop application is open source, Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. It can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types.
JMeter Setup
1. To connect to SQL server database, you need to place the required JDBC driver (sqljdbc4.jar) under "JMeter/lib" directory. you can download it from following link.
http://msdn.microsoft.com/en-us/sqlserver/aa937724
2. Run jmeter.bat in bin folder and you will get a window as below.
3. Test Plan--> Add--> Threads (users)
Here, we are specifying the number of users. If we want to simulate 20 users, we can set the value for Number of Threads (users) as 20.
4. Thread Group--> Add--> Sampler--> JDBC Request
Here, we define the sql query for the load test. Specify a value for Variable name field.
5. Thread Group--> Add--> Config Element--> JDBC Connection Configuration.
1. Variable Name: variable name specified at Variable name field in JDBC Request elements
2. Maximum Number of Connecitons: 0
3. Pool Timeout: 10000
4. Idle cleanup interval: 60000
5. Auto Commit: True
6. Transaction Isolation: Default
7. Keep-Alive: True
8. Maximum Connection Age: 5000
9. Validation query: Select 1
10. DatabaseURL: jdbc:sqlserver://:;databaseName=
11. JDBC Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
12. User Name: (SQL server access user name)
13. Password: (user's password)
6. Thread Group--> Add--> Listener -->Graph Results
To view the performance test results, we can add various listeners.
Then we can run the Test.
Example graphs.
0 Comments





