Dang Luong

Using JMeter to Benchmark HCP HS3

Blog Post created by Dang Luong Employee on Jan 16, 2015

I recently worked on a proof of concept project that involved testing HCP performance with a tool called JMeter. As I found during the project, JMeter is quite a powerful and flexible tool. Its main focus is on web applications, specifically those that use HTTP, TCP, or FTP connections. However, it can also operate against drives and mount points on a local server, such as a mounted CIFS share. It has the ability to run multi-client tests and aggregate the results on the master server. It can be ran through the GUI or from the CLI. And, probably the most important feature about JMeter is that the software is open source and has a large online community.


However, JMeter is intimidating at first glance because it has so many screens and fields. This blog will walk you through the basics of setting it up for use the first time. In a future blog, I will demonstrate how to perform multi-client tests with JMeter.

Set up HCP Namespace

We will need a HCP namespace. I have a 4-node HCP system. It is running version 7. I have already created a tenant for this. The next step is to create the namespace.


  1. Log in to the Tenant Management Console.
  2. Go to Namespaces > click Create Namespace.
  3. I am naming this namespace “ingest”. It will have 750GB of capacity.
  4. Drill into the new namespace > Settings > check Enable ACLs.
  5. Go to Protocols > enable HTTPS and HS3 API (with Anonymous and authenticated access).
  6. Expand Minimum Data Access Permissions > check all options under Anonymous and Authenticated Access.

Download & Install

You will need a couple of items to run JMeter:


  • The actual JMeter software
  • Java 6 or later
  • Sample data files


The latest version of JMeter can be downloaded from Apache’s website: http://jmeter.apache.org/download_jmeter.cgi. Binary and source files are available. I am using the binary version for Windows.


There is no actual installation file. Just extract the content to the desired final destination. I extracted it to C:\apache-jmeter-x.xx\.


For Java, download the latest version from www.java.com. Make sure to get the 64-bit version if your OS is 64 bits or 32-bit version if the OS is 32 bits. Install Java as normal. No special configuration is needed.


Try starting JMeter: C:\apache-jmeter-x.xx\bin\jmeter.bat. A GUI similar to the screenshot below will open.


Unlike vdbench or other benchmark tools, JMeter does not create test data from scratch. It requires some seed files from the user. The files can be anything, some PDFs, text files, JPEGs, etc… JMeter does not care about the file size, either. The file size is only relevant to the objective of the test case. For example, if the goal is to test the read and write performance of many small files, you would use a small seed file.


The seed files can be stored anywhere as long as JMeter can access that location. I simply created a folder called “datafiles” under C:\apache-jmeter-x.xx\. I copied a random 50KB file to here and renamed it to “small_50k.file”.


Create A JMeter Test Plan

A Test Plan contains one or more operations that JMeter will execute. You can create a Test Plan on one server and reuse it on other clients.


  1. Open the JMeter GUI (by running C:\apache-jmeter-x.xx\bin\jmeter.bat). The program will start with a new, empty test plan.
  2. On the left explorer panel, select Test Plan > enter a custom name for the Test Plan.
  3. Go to File > Save Test Plan as > save it to the desired location. Remember to save often as you go through these instructions.
  4. Under User Defined Variables > click Add three times. Enter the following variable names and values.
    1. Variable 1 name: numThreads. Value = 10
    2. Variable 2 name: loopCount. Value = 10
    3. Variable 3 name: small50Kfile. Value = C:\apache-jmeter-x.xx\datafiles\ small_50k.file
    4. Variable 4 name: client1CounterStart. Value = 1
  5. Your screen should look similar to the screenshot below.
  6. On the left explorer panel, right click on MyTestPlan > Add > Threads (Users) > Thread Group.
  7. Select the new thread group > change the name to “HCP_SmallFile_Write”.
  8. Change the parameter Number of Threads to “${numThreads}”. Change the parameter Loop Count to “${loopCount}”.
  9. On the left explorer panel, right click on HCP_SmallFile_Write > Add > Config Element > Counter. Select the new Counter object.
  10. Change these variables to match below:
    1. Start = ${client1CounterStart}
    2. Increment = 1
    3. Number format = 000000
    4. Reference Name = cnt
  11. On the left explorer panel, right click on HCP_SmallFile_Write > Add > Config Element > HTTP Header Manager.
  12. Select the new object > click Add at the bottom. Create this new variable:
    1. Name: Authorization. Value = “AWS all_users”
  13. On the left explorer panel, right click on HCP_SmallFile_Write > Add > Sampler > HTTP Request.
  14. Select the new object > change its name to “HTTPS Request Put”. Make these additional changes:
    1. Server Name or IP = ingest.mycompany.hcp.abc.com (replace with the FQDN of your HCP namespace)
    2. Implementation = HttpClient4
    3. Protocol = https
    4. Method = PUT
    5. Path = /fileSmall${cnt}
  15. Under Send Files With the Request > click Add. Enter “${small50Kfile}”.
  16. On the left explorer panel, right click on MyTestPlan > Add > Listener > Summary Report. Add the following string to the Filename field “C:\apache-jmeter-x.xx\results\summaryReport-${__machineName()}-${__time(yyyy-MM-dd-HHmmss)}.csv”. Please note that you will have to manually create a “results” folder ahead of time.
  17. Select MyTestPlan > click Run from the menu bar > Start. With the small file size and few threads, JMeter took a couple of seconds to complete the task. Check the HCP namespace after the job has completed.

Now we need to create a thread group for deleting objects.


  1. Right click on the HCP_SmallFile_Write group > Copy.
  2. Right click on MyTestPlan > Paste. You might have to move the Summary Report object below the new object.
  3. Select the new object > change its name to HCP_SmallFile_Delete.
  4. Expand the object > select the entry HTTPS Request Put. Make these changes:
    1. Name = HTTPS Request Delete
    2. Method = DELETE
  5. This is what you should have.
  6. For the first run, we will disable the Write thread group because we already ran it earlier. So right click on the Write group > select Disable. Select MyTestPlan > Run > Start. Check your namespace after. All the objects should be gone.


Aside from PUT and DELETE, JMeter can perform READ, GET, POST, COPY, MOVE, and other operations. It is just a matter of copy an existing thread group and changing the Method parameter. Keep in mind that some operations, such as READ, require an existing dataset. This means that you would have to run the PUT thread group before a READ operation. Also keep in mind that you can disable the DELETE thread group to avoid recreating the dataset on the next run.