What is the relationship between JVM XMX and XMS in jmeter and the number of concurrent users

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the relationship between JVM XMX and XMS in jmeter and the number of concurrent users

lijie@uusense.com
hello
    What is the relationship between JVM HEAP,XMX , XMS in jmeter and the number of concurrent users
How to calculate the number of concurrent users through information such as XMX XMS configured by the JVM

                                                                                                                                                                            thanks



李杰  测试工程师
邮箱:[hidden email] 手机+8613689040710
杭州友声科技股份有限公司
TEL:0571-81020008
移动互联网测试专家|证券代码:836592
Reply | Threaded
Open this post in threaded view
|

Re: What is the relationship between JVM XMX and XMS in jmeter and the number of concurrent users

glinius@live.com
JMeter is a normal Java application hence you should treat it as any other
Java application in terms of  performance tuning
<https://dzone.com/articles/principles-java-application>  

There is no "silver bullet" instruction. Neither anyone can tell how many
users you will be able to simulate for this or that test as "it depends".
Mainly it depends on:

1. Nature of your test (what the test is doing, request and response size,
number of  Preprocessors
<http://jmeter.apache.org/usermanual/component_reference.html#preprocessors>
,  Postprocessors
<http://jmeter.apache.org/usermanual/component_reference.html#postprocessors>
,  Assertions
<http://jmeter.apache.org/usermanual/test_plan.html#assertions>  , etc).
Remember that any test element has its cost and try to limit their usage to
absolute viable minimum.

2. It is not possible to provide "recommended" minimum and maximum heap
values as it also depends on how JMeter copes with the load. You can see
what's going on using  JVisualVM
<https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jvisualvm.html>  
tool. First of all, maximum heap should be big enough in order to fit in
JMeter, all thread variables, requests and responses data for all the
threads, if the data will not fit into heap - you will get
java.lang.OutOfMemoryError: Java heap space
<https://www.blazemeter.com/blog/9-easy-solutions-jmeter-load-test-%E2%80%9Cout-memory%E2%80%9D-failure>
. Going forward if JVisualVM shows that Java spends too much time doing GC -
you might want to increase heap size and vice versa, you might want to
decrease heap usage to give resources to other processes.

3. Remember that any heap manipulation should be followed by the amendment
of other parameters like  MaxMetaSpaceSize
<https://community.jaspersoft.com/wiki/setting-maxmetaspacesize-java-8>  

So start with default settings and ensure that:

1. Java uses machine resources efficiently, i.e. you don't have too many
spare RAM and CPU
2. System isn't overloaded,  i.e. there is no lack of CPU or RAM
3. JVM doesn't spend too much time doing GC

If you performed all the optimisations and still unable to conduct the
required load - you will have to go for  Distributed Testing
<https://jmeter.apache.org/usermanual/remote-test.html>  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]