Unknown opened 4 years ago
|
|
|
|
@woj-tek Thanks. I optimized the configuration and the memory increased slowly,but it still not go down.12800 messages increased 0.06GB memory.I want to know how to decrease the memory occupy. Which GC configuration do you use? GC="-XX:+UseBiasedLocking -XX:NewRatio=2 -XX:-ReduceInitialCardMarks -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly" JAVA_XSS=" -Xss228k -Xms4096m -Xmx4096m -XX:+UseParallelGC" How do you measure memory usage? Using centos command named 'htop' or using top.And calculate the interpolation of memory occupy between before sending messages and after sending messages. Have you try forcing GC (for example in VisualVM) and checking if the memory goes down? No.It is the method in configuration file or system JVM?How can I set it? |
|
Update.I use tigase.conf about GC same as doc URL:https://docs.tigase.net/tigase-server/master-snapshot/Administration_Guide/html/#_vm_machine_8gb_of_ram_4_core_cpu_equivalent And I delete -XX:+UseParNewGC XX:+CMSIncrementalMode because they can not used at JDK11 However,the memory still not go down after sended 12800 messages. |
|
Please be aware that memory allocated by Java (and it's heap) seen by the operating system (top/htop) doesn't reflect actual memory usage (actually used JVM heap). Please use VisualVM to see actual usage of heap (and thus memory usage). With |
|
@woj-tek Hello,I use -Xms4096m -Xmx4096m and observe with VisualVM.Here is the result After Login 12800 users and before sending message.(With top the memory is 49.1%,Heap memory about 1GB) After sending message.(With top the memory is 52.1%.Heap memory about 1.6GB) After 1.5 hour and the clients seem do not anything.(With top the memory is 63.3%.Heap memory about 1.8GB) However,the memory isn't going down. |
|
As you can see, heap doesn't change it size (orange line) and objects on the heap are correctly collected. There is non-heap memory that can be used thus top may see increase usage:
Are you sure they don't anything? not even sending Ping messages? It seems there are disnting events happening causing surges in heap usage in roughly 10 minutes intervals. |
|
@woj-tek Hello,I add all result snapshot in the document because of it is too much content. tigase report 20210514.docx and my tigase.conf is:
|
|
As you can see, the actual heap size doesn't change and the slight change in JVM memory usage is caused by JVM internals (that's from Regarding the connections and fluctuation in actual HEAP usage:
Please also share your current PS. Please don't use docx format. It's better to add those files individually still. |
|
@woj-tek Thanks!And I will add files individually. 1.Yes,in real user will stay connected too.However,the memory won't go down when Jaxmpp clients disconnect.I use code of jaxmpp.disconnect() to disconnect the server. 2.OK I will share it after I abtest next time. config.tdsl:
And the test component is just:
|
|
@woj-tek This is result of tigase-monitor After 12800 user login Live View Live Memory View top and htop After 12800 send messages and all logout Live View Live Memory View top and htop It seems the memory usage fluctuates is likely Tenured usage. |
|
Thank you for the details. Can you run one more test - when you finish the load test, please try forcing GC (for example in VisualVM in the "Monitor" tab click on button "Perform GC" in the top-right corner) - does this decrease Heap/Tenured (old gen) usage? Please keep in mind that GC in JVM is automatic, and the GC of the tenured space may not kick in until certain percentage is reached (this depends on the actual GC used, but quite often is above 60-70%) |
|
@woj-tek After I click on button "Perform GC",the old gen goes down but the real memory still go up.The test process was same as before. Live View: Live Memory View: top and htop PS:Before "Perform GC",The memory is 53.5% in top and 4.81G in htop. |
|
It seems that the memory will not increase on 80%.When the memory increase on 80%,it will go down a few. |
|
This is just how the JVM works. It contains of HEAP (which you configure) + class metadata + stacktraces + direct memory. Actual JVM process memory (i.e. "real memory") will never equal configured HEAP size (in your case: 4G). Please see for example: https://medium.com/platform-engineer/understanding-java-memory-model-1d0863f6d973 What you can do is to change initial HEAP size ( The The most important fact is that the memory used by the tigase-server (within HEAP) is actually correctly collected during Garbage Collection which means there is no memory leak. |
|
@woj-tek Thank you very much. I just hope the process can continuous operation on high physics memory.If the process doesn't crash,it's OK for high memory.I will test it continued |
|
It shouldn't go (significantly) above the baseline established after the load test. Considering total |
|
@woj-tek OK,Thanks |
I have a problem with… I use abtest for tigase with 12800 messages to tigase server meanwhile.Before the abtest,the memory use 3.1G with 12800 user already login,and after they send messages,the memory use 3.7G and it seems not GC.It is my configuration error?
Details (please complete the following information):