掲示板
Performance tuning
Hi,
I need to change the JVM heap size. Can anyone please tell me what is the procedure to change heap size? Is there any specific way to decide Heap Size?
Details: -
Processor: Intel(R) Core(TM) i5-4570 CPU @3.20GHz 3.20 GHz
Memory : 4GB
OS : Windows-7 64bit
I need to change the JVM heap size. Can anyone please tell me what is the procedure to change heap size? Is there any specific way to decide Heap Size?
Details: -
Processor: Intel(R) Core(TM) i5-4570 CPU @3.20GHz 3.20 GHz
Memory : 4GB
OS : Windows-7 64bit
Try to increase values of
CATALINA_OPTS variables located into setenv.bat or *.sh
-Xmx2048m -XX:MaxPermSize=512m
HTH
CATALINA_OPTS variables located into setenv.bat or *.sh
-Xmx2048m -XX:MaxPermSize=512m
HTH
Thanks, for the reply Manish.
Do we need to do any other changes, apart from this and where the changes will reflect.
I also got one formula as : (-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem, with what context we use this, actually I am unable to understand this.
Do we need to do any other changes, apart from this and where the changes will reflect.
I also got one formula as : (-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem, with what context we use this, actually I am unable to understand this.
It is giving following errors after passing parameters suggested by you:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Yes , its because you doesn't have enough ram , So you have to rollback to 1024 and 256 instead of 2048, 512
Done. Now I am back on 1024 and 256.
I also got one formula as : (-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem, with what context we use this, actually I am unable to understand this.
I also got one formula as : (-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem, with what context we use this, actually I am unable to understand this.
8年前 に Andrew Jardine によって更新されました。
RE: Performance tuning
Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
It might help if you tell us where you got that formula from. Perhaps a link to a site? .. but it looks to like it's a formula that you can use to calculate the actual (or real) amount of memory -- or perhaps the potential amount of memory -- being used by the JVM.
I this from : - http://javaguru.fi/why-is-my-java-process-taking-more-memory-than-i-gave-it.html
Actually, I am new to Liferay and Performance tuning is completely new to me.
Actually, I am new to Liferay and Performance tuning is completely new to me.
8年前 に Andrew Jardine によって更新されました。
RE: Performance tuning
Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Deepanshu,
The title alone pretty much says it all. Don't worry about the "magic formula" for now. Configuring the JVM settings is just one step in the process. Most of the time the issues with performance are in the custom plugins that other developers have built that are garbage. Here is what I would suggest for performance tuning.
1. Make sure you are given the proper time to do it. 1 or 2 days, which is usually what people think is enough, is not.
2. Start with a baseline Liferay with none of your custom plugins deployed and see how it performs.
3. Add your plugins one at a time and run the same tests -- this will help identify which, if any, of the plugins could be problematic.
4. Make adjustments to your configuration, and repeat.
Remember that there are several places that tuning can be done.
a. Disabling features that are not used (for example, filters or scheduled jobs that are not needed)
b. Caching configuration
c. Server configuration (connection pool, protocol, etc)
d. The use of a CDN for assets
e. The JVM of course, but not just memory sizes -- also ratios for allocation, garbage collection tuning, etc.
f. The database server
and a lot more. Liferay is not a stand alone desktop application that is complete isolated -- it is a web application that exists at the core of your APPLICATION level solution. There are lots of posts and blogs out there that will give you tips. I;ve used much of the details in this one (it's for an older version of LR, but a lot of it is still relevant)
https://dev.liferay.com/discover/portal/-/knowledge_base/6-1/performance-tuning
There is also a white paper published by LR (just find the work "performance" in the page)
https://www.liferay.com/documentation/additional-resources/whitepapers
The title alone pretty much says it all. Don't worry about the "magic formula" for now. Configuring the JVM settings is just one step in the process. Most of the time the issues with performance are in the custom plugins that other developers have built that are garbage. Here is what I would suggest for performance tuning.
1. Make sure you are given the proper time to do it. 1 or 2 days, which is usually what people think is enough, is not.
2. Start with a baseline Liferay with none of your custom plugins deployed and see how it performs.
3. Add your plugins one at a time and run the same tests -- this will help identify which, if any, of the plugins could be problematic.
4. Make adjustments to your configuration, and repeat.
Remember that there are several places that tuning can be done.
a. Disabling features that are not used (for example, filters or scheduled jobs that are not needed)
b. Caching configuration
c. Server configuration (connection pool, protocol, etc)
d. The use of a CDN for assets
e. The JVM of course, but not just memory sizes -- also ratios for allocation, garbage collection tuning, etc.
f. The database server
and a lot more. Liferay is not a stand alone desktop application that is complete isolated -- it is a web application that exists at the core of your APPLICATION level solution. There are lots of posts and blogs out there that will give you tips. I;ve used much of the details in this one (it's for an older version of LR, but a lot of it is still relevant)
https://dev.liferay.com/discover/portal/-/knowledge_base/6-1/performance-tuning
There is also a white paper published by LR (just find the work "performance" in the page)
https://www.liferay.com/documentation/additional-resources/whitepapers