I was hoping to get some help/suggestions regarding my JMeter Master/slave test set up.
Here is my scenario:
I need to do load testing using Jmeter master slave set up. I am planning to launch the master and slave nodes on AWS (window boxes, dependency on one of the tool I launch via jmeter). I want to launch these master-slave set up in AWS on demand where I can tell how many slave nodes I want. I looked around a lot of blogs around using Jmeter with AWS and everywhere they assume these nodes will be launched manually and needs further configuration for master and slave nodes to talk to each other. For the tests where we might have 5 or 10 slave nodes this will be fine but for my tests I want to launch 50 instances(again the tool I use with jmeter has limitation that forces me to use each jmeter slave node as 1 user, instead of using 1 slave node to act as multiple users) like this and manually updating each of the slave nodes will be very cumbersome. So I was wondering if anybody else ran into this issue and have any suggestions. In the mean time I am looking into other solutions that will help me to use same slave node to mimic multiple users, which will help me to reduce the need to launch these many slave nodes.
Regards,
Vikas
Have you seen JMeter ec2 Script? It seems to be something you're looking for.
If for any reason you don't want to use particularly this script be aware that Amazon has the API to you should be able to automate instances creation by using a script AWS Java SDK or Amazon CLI.
You can even automate instances creation using a separate JMeter script with either JSR223 Sampler
or OS Process Sampler (this approach will require a separate JMeter script of course)
Related
I am performing distributed testing using JMeter and getting collective result of all slaves on Master JMeter GUI.
Please let me know if it is possible to capture separate reports for each slave?
For example, I have configured 2 Slaves + 1 Master JMeter. On executing the test, I would like capture separate report of each slave.
Thanks!!
You can get per-slave results as follows:
Add a Listener or your choice to Test Plan
Specify Filename in "Write results to file" section and choose what you need to store via "Configure" button
Once test finishes you'll have to collect result files from slave machines
Be aware that:
By default not everything can be stored, i.e. response data is being removed form successful samples
Listeners have their cost. See Greedy Listeners - Memory Leeches of Performance Testing to get an idea regarding impact and why it is better to have them off during load test.
For your case, don't use distributed testing, just launch 1 separate JMeter per slave machine.
I have cluster of 3 Mesos slaves, where I have two applications: “redis” and “memcached”. Where redis depends on memcached and the requirement is both of the applications/services should start on same node instead of different slave nodes.
So I have created the application group and added the dependency properly in the JSON file. After launching the JSON file via “v2/groups” REST API, I observe that sometime both application group will start on same node but sometimes it will start on different slaves which breaks our requirement.
So intent/requirement is; if any application fails to start on a slave both the application should failover to other slave node. Also can I configure the JSON file to tell Marathon to start the application group on slave-1 (specific slave first) if it is available else start it on other slave in a cluster. Due to some reason if this application group will start on other slave can Marathon relaunch the application group to slave-1 if it is available to serve the request.
Thanks in advance for help.
Edit/Update (2):
Mesos, Marathon, and DC/OS support for PODs is available now:
DC/OS: https://dcos.io/docs/1.9/usage/pods/using-pods/
Mesos: https://github.com/apache/mesos/blob/master/docs/nested-container-and-task-group.md
Marathon: https://github.com/mesosphere/marathon/blob/master/docs/docs/pods.md
I assume you are talking about marathon apps.
Marathon application groups don't have any semantics concerning co-location on the same node and the same is the case for dependencies.
You seem to be looking for a Kubernetes like Pod abstraction in marathon, which is on the roadmap but not yet available (see update above :-)).
Hope this helps!
I think this should be possible (as a workaround) if you specify the correct app contraints within the group's JSON.
Have a look at the example request at
https://mesosphere.github.io/marathon/docs/generated/api.html#v2_groups_post
and the constraints syntax at
https://mesosphere.github.io/marathon/docs/constraints.html
e.g.
"constraints": [["hostname", "CLUSTER", "slave-1"]]
should do. Downside is that there will be no automatic failover to another slave that way. Still, I'd be curious why both apps need to specifically run on the same slave node...
I have configured two slaves and one master machine.
After executing the performance test in Jmeter using the master slave architecture on master machine, I am getting the result log in slaves machines but I need a consolidated log summary. Please suggest me how can I get it?
Also, I need to know that how the load is distributed over the slave machines.
First question:
If you are talking about the logs (as in jmeter-server.log) there's no automatic way to collect them all. You could write a bash script or something similar to collect them from the servers.
Second question:
Every slave machine executes the full test plan completely on their own. That means that if you configure your test plan to include 10 threads, every slave will run with 10 threads giving you a total of 20.
I was using non-GUI option to perform a distributed load testing with Jmeter from master server A (Linux) to slave server B (Linux). Here's what I did:
./jmeter -n -t xxx.jmx -l results.log -R xxx.xxx.xxx.xxx
By default, Jmeter will write the results file to the master server A. I'm wondering if there's a way to directly store the results file on remote server B.
Thanks in advance!
The idea is they are dumb slaves, possibly without even the means to store data locally. The methods are invoked on a remote processor (RMI) and run from there, but all other resources are kept at the client side.
You could set up a CI server like Jenkins to run jmeter clients in a distributed manner. That will allow you more control over how tests are distributed. I have a jenkins set up that runs jmeter client on a master, with distributed tests to remote (jmeter) slaves, which are also jenkins slaves, tied to jobs that control the workspaces. This means they are never used by jenkins, but jenkins can get results files out of the workspace, aggregate them, and produce graphs using jmeter plugins CMDrunner.
The other possibility is to prefix your sample results with the unique part of the IP address of the current slave. This will allow you to display them aggregated or separately in your results viewer, and potentially write scripts to separate the results out and store them back on the slave they came from.
You could also use samba or similar to share the remote slave drive, and store the results directly there from the master.
If you have only one slave, any of these would be easy to implement, but get more complex as you add more slaves.
Look at sample sender alternative implementations.
Read the concerned paragraph here:
http://jmeter.apache.org/usermanual/remote-test.html
Natively it works like this, an option is not to use distributed mode and run many jmeter instances in non gui mode.
Try jmeter user mailing list and if you don't get an answer maybe open a bugzilla enhancement request.
If you want to build distributed load testing system you can try use Jagger
My company has thousands of server instances running application code - some instances run databases, others are serving web apps, still others run APIs or Hadoop jobs. All servers run Linux.
In this cloud, developers typically want to do one of two things to an instance:
Upgrade the version of the application running on that instance. Typically this involves a) tagging the code in the relevant subversion repository, b) building an RPM from that tag, and c) installing that RPM on the relevant application server. Note that this operation would touch four instances: the SVN server, the build host (where the build occurs), the YUM host (where the RPM is stored), and the instance running the application.
Today, a rollout of a new application version might be to 500 instances.
Run an arbitrary script on the instance. The script can be written in any language provided the interpreter exists on that instance. E.g. The UI developer wants to run his "check_memory.php" script which does x, y, z on the 10 UI instances and then restarts the webserver if some conditions are met.
What tools should I look at to help build this system? I've seen Celery and Resque and delayed_job, but they seem like they're built for moving through a lot of tasks. This system is under much less load - maybe on a big day a thousand hundred upgrade jobs might run, and a couple hundred executions of arbitrary scripts. Also, they don't support tasks written in any language.
How should the central "job processor" communicate with the instances? SSH, message queues (which one), something else?
Thank you for your help.
NOTE: this cloud is proprietary, so EC2 tools are not an option.
I can think of two approaches:
Set up password-less SSH on the servers, have a file that contains the list of all machines in the cluster, and run your scripts directly using SSH. For example: ssh user#foo.com "ls -la". This is the same approach used by Hadoop's cluster startup and shutdown scripts. If you want to assign tasks dynamically, you can pick nodes at random.
Use something like Torque or Sun Grid Engine to manage your cluster.
The package installation can be wrapped inside a script, so you just need to solve the second problem, and use that solution to solve the first one :)