Stress test HANA Database
This document is about how to create a stress test plan to test the HANA Database.
Stress tests: These tests try to break or overwhelm the system by loading more resources and taking its modules outside the limits that were designed.
In general, what you need to do:
• Download Jmeter zip package
• Unzip where you want
• Be sure that java is installed in the system where you are running Jmeter
• And that the “bin” directory is set in the PATH
You may follow the following link: http://jmeter.apache.org/usermanual/get-started.html
Let us start the JMeter from /home/apache-jmeter-2.9/bin/jmeter.sh. Add Users To create a Thread group
• Right-click on Test Plan.
• Select Add > Threads (Users) > Thread Group.
• Thus, thread group gets added under the Test Plan node.
• Rename this Thread Group as Test Plan The Thread Group has three particularly important properties influence the load test:
• Number of Threads (users): The number of users that JMeter will attempt to simulate. Set this to 50
• Ramp-Up Period (in seconds): The duration of time that JMeter will distribute the start of the threads over. Set this to 10.
• Loop Count: The number of times to execute the test. Leave this set to 1.
We will not change the default properties of the Thread Group.
Adding JDBC Requests
Now that we defined our users, it is time to define the tasks that they will be performing. In this section, specify the JDBC requests to perform.
• Right-click on the JDBC Users element.
• Select Add > Config Element > JDBC Connection Configuration.
• Set up the following fields (we are using MySQL database called tutorial) −
o Variable name bound to pool. This needs to identify the configuration uniquely. It is used by the JDBC Sampler to identify the configuration to be used. We have named it as test.
o Database URL − jdbc:mysql://localhost:3306/tutorial.
o JDBC Driver class: com.mysql.jdbc.Driver. o Username: root.
o Password: password for root. The other fields on the screen are left as defaults as shown below −
Now add a JDBC Request which refers to the JDBC Configuration pool defined above. Select JDBC Users element.
•Click your right mouse button to get the Add menu
•Select Add > Sampler > JDBC Request. • Select this new element to view its Control Panel.
•Edit the properties as shown below −
o Variable name bound to pool. This needs to uniquely identify the configuration. It is used by the JDBC Sampler to identify the configuration to be used. Named it as test.
o Name − Learn.
o Enter the Pool Name − test (same as in the configuration element).
o Query Type − Select statement.
o Enter the SQL Query String field. Save and Execute Test Plan
Now save the above test plan as db_test.jmx. Execute this test plan using Run > Start option.
Increasing the Load Let's try the same test with 80 threads over 10 seconds. In the Thread Group item in the left-pane, change the Number of Threads (users) to 80. Now click View Results in Table, then click Start.