Foros de discusión

Performance tuning

Deepanshu Seth, modificado hace 8 años.

Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
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
thumbnail
Manish Yadav, modificado hace 8 años.

RE: Performance tuning

Expert Mensajes: 493 Fecha de incorporación: 26/05/12 Mensajes recientes
Try to increase values of
CATALINA_OPTS variables located into setenv.bat or *.sh
-Xmx2048m -XX:MaxPermSize=512m

HTH
Deepanshu Seth, modificado hace 8 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
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.
Deepanshu Seth, modificado hace 8 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
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
thumbnail
Manish Yadav, modificado hace 8 años.

RE: Performance tuning

Expert Mensajes: 493 Fecha de incorporación: 26/05/12 Mensajes recientes
Yes , its because you doesn't have enough ram , So you have to rollback to 1024 and 256 instead of 2048, 512
Deepanshu Seth, modificado hace 8 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
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.
thumbnail
Andrew Jardine, modificado hace 8 años.

RE: Performance tuning

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
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.
Deepanshu Seth, modificado hace 8 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
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.
thumbnail
Andrew Jardine, modificado hace 8 años.

RE: Performance tuning

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
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
Deepanshu Seth, modificado hace 8 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
Thanks Andrew, will let you know, if I have any further issues.
Deepanshu Seth, modificado hace 7 años.

RE: Performance tuning

Junior Member Mensajes: 55 Fecha de incorporación: 12/10/15 Mensajes recientes
Thanks