Site icon Vinsguru

JMeter – CSV Data Set Config vs Redis Data Set Config – Throughput Comparison

In this post, I would like to show you how to use Redis Data Set Config in JMeter and how it affects the throughput of your test.

Redis:

Redis stands for REmote DIctionary Server. It is an open source in-memory data structure store database. It stores various data structures like String, Map, Lists, Sets etc as Key value pairs. As it is an in-memory database, It keeps all the data in the RAM (but it can also write the data in the disk periodically). So you get significant amount of performance boost while reading/writing the data.

Goal:

My goal here is to see how redis can be used with JMeter to keep my test data instead of a CSV file and to understand the kind of impact I will have in my test when I use Redis instead of CSV!

Why Redis:

Most of us would like to keep the test data for JMeter test in a CSV file. Even though CSV file is a very good choice – by keeping test data away from the test script, It becomes very difficult to manage when you use JMeter in distributed mode. As you probably know, JMeter simply executes the same jmx file in all the slaves. So, the CSV file, which is dependency for your JMeter test, should also be copied to all the slaves by you! Sometimes, the test data used by slave1 should not be used by slave2 [due to your application design]. In this case, you need to split the CSV file into multiple files for each slave and move them to slave machines to run the test successfully.

Redis will be a great choice here in JMeter distributed mode testing as it can serve the data for all the slaves.

CSV Data Set config:

Redis Data Set config:

Now Lets do a similar test using Redis Data Set Config.

Note:

Summary:

I expected this result because CSV file is going to be in your local and Redis DB is running somewhere else in my network. Network latency will play significant role in the Redis throughput. So CSV file read will perform better than Redis. However CSV read performs 40X better than Redis which is surprising. I am trying to share this information with you all so that you can be very careful when you create a JMeter test to test a very high throughput application. As I have been saying always we all need to be careful what kind of elements we add to the test.

You might be interested in reading few similar posts.

  1. Post Processors / Script Language – Comparison
  2. Response Data Extractors – Comparison

Happy Testing 🙂

 

Share This:

Exit mobile version