Feather Background Waves Background
Skip to main content
Feather Background Waves Background
Feather Background Waves Background
  1. JMeter in English/

What is a load generator?

Beginner - This article is part of a series.
Part 8: This Article

server

What is a load generator?>

What is a load generator? #

The load generator is a device that dedicates all its resources exclusively to performing simulation tasks for virtual users. This device should preferably be a server, and in the particular case of JMeter, it is recommended that it only contain the operating system ( Alpine or Ubuntu ), Java 1.8+, and JMeter.

Why should the device be dedicated?>

Why should the device be dedicated? #

The main reason the device should not share resources with other processes is because extremely precise time measurement tasks are performed, and any process unrelated to the test could negatively affect the metrics and potentially ruin the timing. Basically, it’s to prevent any external agent from spoiling our results.

Should it be a physical or virtual server?>

Should it be a physical or virtual server? #

Nowadays, it’s rare to have physical servers because it’s more economical to have large hardware partitions and then create multiple virtual servers. While both have advantages and disadvantages, this aspect isn’t as significant as if the server is 100% dedicated to generating load.

What should I do if it’s not dedicated?>

What should I do if it’s not dedicated? #

If for some reason you are unable to obtain a dedicated server for testing, you should have the necessary knowledge to disable applications and/or services before running the test and re-enable them once it’s completed. As a good practice, we recommend checking the CPU, Memory, and Bandwidth levels after disabling the processes and before running the test, and continuing to do so until the test concludes.

Another option would be to consider having your load generators in the cloud. With the growing use of cloud IaaS such as AWS, Azure, and Google, this option is ideal for keeping costs down by paying only for storing a pre-built JMeter image for executions and generating the server on demand when you need to run tests.

What should be the characteristics of a load generator?>

What should be the characteristics of a load generator? #

Unfortunately, there is no rule for calculating the resources needed to simulate a certain number of users. This is due to the multiple variables involved. However, at Flood.io we have performed multiple measurements to standardize the m5.xlarge instance to between 500 and 1,000 virtual threads or users. The instance is a general-purpose instance and has 4 CPUs, 16 GB of RAM, and a 10 Gbps network interface.

Examples where it is not possible to simulate this number of virtual users:

  • The test involves Audio or Video Streaming, which generally exhausts bandwidth before reaching 500 virtual users.
  • The test involves eCommerce, which also consumes more bandwidth than usual due to the multiple images.
  • If the cache manager is enabled and you save many elements, you will likely exhaust the load generator’s memory before the bandwidth.
  • The script logic is extremely complex or has too many programming elements, which increases CPU consumption.
  • Listeners are enabled; these consume memory and CPU.
  • Basically, any test scenario with poor practice where any of the load generator’s processing, storage, and communication resources are exhausted.
Can my computer be a load generator?>

Can my computer be a load generator? #

The absolute answer is NO, as painful as this may sound. This is perhaps one of the most frequently asked questions I receive, and I almost always have to make them aware of the many reasons why this may not be a good practice, but I believe I’ve already provided several examples that support this answer.

Your computer equipment isn’t 100% dedicated to the simulation task; it’s running multiple processes and/or tasks that could affect your metrics. They could possibly provide reasonably skewed measurements for a maximum of 20 or 50 virtual users; however, these results shouldn’t be part of your baseline for knee calculations.

Conclusion>

Conclusion #

The load generator is the cornerstone of load and/or stress testing. Therefore, it is necessary to provide due care to obtain reliable results. Remember, we depend on this data for the analysis phase, and it’s vital to ensure that the results are reliable.



Beginner - This article is part of a series.
Part 8: This Article