I am running Jmeter in Distributed Mode. What Jmeter does is- distribute the Number of threads(Users) equally between the slaves. What I want is to distribute it partially. For Eg- Total users- 10, Slave1 - 8, Slave2- 2.
JMeter slaves are totally independent, therefore if you have 10 threads in the thread group 1st slave will execute 10 threads and 2nd slave will execute 10 threads so you will have 20 threads in total.
If you want to distribute load between slaves in uneven way you can do it as follows:
Define threads property in the Thread Group using __P() function like:
${__P(threads,)}
On each remote slave set this threads property in user.properties file (located in JMeter's "bin" folder), like:
on slave 1:
threads=8
on slave 2:
threads=2
Alternatively you can pass the property value via -J command-line argument like:
on slave 1:
jmeter -Jthreads=8 -s .....
on slave 2:
jmeter -Jthreads=2 -s .....
See Apache JMeter Properties Customization Guide for more information on setting and overriding JMeter properties.
Related
I am using jmeter distributed environment and distributing load on multiple slave machine.
I am running jmeter -g <csv file> -o <output folder> command to get html report from output csv file.
In report Time Vs Threads graph shows only one slave machines thread count instead of combined thread count on x axis.
e.g. if my slave 1 and slave 2 running 10 thread each but generated graph shows 10 number of active thread on X axis but it should be 20.
Try "KPI vs KPI Graphs" plugin. You can install it using plugins manager.
I want to run Jmeter distributed testing, I want Jmeter to write info logs on log file but in distributed mode it only provides us logs which is related to connection, it doesnot really gives the log of execution.
How can I get the actual logs??
Thanks in advance.
The execution log is being written on slave side, if you run slave via jmeter-server.bat or jmeter-server you should see jmeter-server.log file in the folder where you launched slave instance from.
If you don't see the log file you can specify its name and location via -j command line argument like:
jmeter -s -j jmeter-server.log ......
More information:
Remote Testing
How to Perform Distributed Testing in JMeter
JMeter Distributed Testing Step-by-step
I am running 6450 users test in a distributed environment in AWS ubuntu machines.
I am getting the following error when test reach to peak load,
ERROR - jmeter.JMeter: Uncaught exception: java.lang.OutOfMemoryError: GC overhead limit exceeded
Machine Details:
m4.4xlarge
HEAP="-Xms512m -Xmx20480m" (jmeter.sh file)
I allocated 20GB for the heap size in JMeter.sh.
But when I run the ps -eaf|grep java command its giving following response.
root 11493 11456 56 15:47 pts/9 00:00:03 java -server -
XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -
XX:MaxTenuringThreshold=2 -XX:PermSize=64m -XX:MaxPermSize=128m -
XX:+CMSClassUnloadingEnabled -jar ./ApacheJMeter.jar**
I don't have any idea what changes I have to do now.
Do the change in jmeter file not in jmeter.sh as you can see with ps that it is not being applied.
Also with such a heap you may need to add:
-XX:-UseGCOverheadLimit
And switch to G1 garbage collector algorithm.
And also check you respect these recommendations:
http://jmeter.apache.org/usermanual/best-practices.html
http://www.ubik-ingenierie.com/blog/jmeter_performance_tuning_tips/
First of all, the answer is in your question: you say that ps -eaf|grep java shows this:
XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m
That is memory is still very low. So either you changed jmeter.sh, but using other shell script to actually start JMeter, or you didn't change it in a valid way, so JMeter uses defaults.
But on top of that, I really doubt you can run 6450 users on one machine, unless your script is very light. Unconfigured machine can usually handle 200-400, and well-configured machine probably can deal with up to 2000.
You need to amend the line in jmeter file, not jmeter.sh file. Locate HEAP="-Xms512m -Xmx512m" line and update the Xmx value accordingly.
Also ensure you're starting JMeter using jmeter file.
If you have environment which explicitly relies on jmeter.sh file you should be amending HEAP size a little bit differently, like:
export JVM_ARGS="-Xms512m -Xmx20480m" && ./jmeter.sh
or add the relevant line to jmeter.sh file.
See JMeter Best Practices and 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure articles for comprehensive information on tuning JMeter
I want to run multiple worker daemons on single machine. As per damienfrancois's answer on what is the minimum number of computers for a slurm cluster it can be done. Problem is currently I am able to execute only 1 worker daemon on one machine. for example
When I run
sudo slurmd -N linux1 -cDvv
sudo slurmd -N linux2 -cDvv
linux1 goes down when I run linux2. Is it possible to run multiple worker daemons on one machine?
Here is my slurm.conf file
as your intention seems to be just testing the behavior of Slurm, I would recommend you to use the front-end mode, where you can create dummy computation nodes in the same machine.
In their FAQ, you have more details, but basically you must configure your installation to work with this mode:
./configure --enable-front-end
And configure the nodes in slurm.conf
NodeName=test[1-100] NodeHostName=localhost
In that guide, they also explain how to launch more than one real daemons in the same node by changing the ports, but for my testing purposes it was not necessary.
Good luck!
I got the same issue as you, I resolved it by modifying the paths of log files as mentioned there multiple slurmd support.
In your slurm.conf for example
SlurmdLogFile=/var/log/slurm/slurmd.log
SlurmdPidFile=/var/run/slurmd.pid
SlurmdSpoolDir=/var/spool/slurmd
must be
SlurmdLogFile=/var/log/slurm/slurmd.%n.log
SlurmdPidFile=/var/run/slurmd.%n.pid
SlurmdSpoolDir=/var/spool/slurmd.%n
Now you can launch multiple slurmd.
Note : I tried with your slurm conf, I think some parameters are missing like define two NodeName instead of one and add which Port to use for each of Nodes.
This works for me
# COMPUTE NODES
NodeName=linux[1-10] NodeHostname=linux0 Port=17004 CPUs=1 State=UNKNOWN
NodeName=linux[11-19] NodeHostname=linux0 Port=17005 CPUs=1 State=UNKNOWN
# PARTITIONS
PartitionName=main Nodes=linux1 Default=YES MaxTime=INFINITE State=UP
PartitionName=dev Nodes=linux11 Default=YES MaxTime=INFINITE State=UP
How can I control the number of threads running on each jmeter slave machines.
i.e. if I have 300 threads in total and 2 slave machines, I want the load to be distributed evenly on both slave machine - 150 threads to run on slave machine A & 150 Threads to run on slave machine B.
I have tried running in non gui mode also with the below commands
Jmeter -n -t TESTING.jmx -R 10.27.30.93 –J 6
to make it run on a specific slave server for 6 threads, but its not working.
It invokes the same number of threads saved in the test plan
Set "Number of Threads" for Thread Group(s) using __P() function like
${__P(threads,)}
Amend your JMeter startup script invocation as follows:
jmeter -n -t TESTING.jmx -R 10.27.30.93 –Gthreads=6
As per JMeter command-line help:
-G, --globalproperty <argument>=<value>
Define Global properties (sent to servers)
e.g. -Gport=123
or -Gglobal.properties
Another option is configure desired number of threads for each remote engine in user.properties file (lives under /bin folder of JMeter installation).
See Apache JMeter Properties Customization Guide for more information on setting and/or overriding JMeter Properties.