cancel
Showing results for 
Search instead for 
Did you mean: 

JVM optmization for Alfresco 3.4.e?

ericmachine
Champ in-the-making
Champ in-the-making
Hi there,

Previously I was installing Alfresco 3.4.d following a tutorial online and the guy had this optimized:-

JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=512m -Xms128m -Xmx768m -Dalfresco.home=/opt/alfresco -Dcom.sun.management.jmxremote"

I am having 5GB RAM and 1 vCPU. It worked fine. Just sometimes uploading new documents (big ones) don't refresh on the spot. I need to go out from the file to the root folder, wait 15 seconds and click the file again. Then only it works and get the most updated uploaded file version.

I plan to install Alfresc 3.4.e on a new server soon (believed I could use the same installation methods for 3.4.d to 3.4.e). This time I have a new virtual machine - 1TB hard disk space, 10GB RAM and 2 vCPUs. Should I change the above JVM optimization? Any recommendations please? I am not sure whether I should maintain the 512m thing or how?

Thanks.
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

MaxPermSize is way too high for what Alfresco really needs. I usually get by with 256m and rarely have to use something higher (most of the time, when customers insist on not separating the Alfresco components into separate Tomcat instances). Your Xms and Xmx are rather low - the Xms alone would not be too bad, but the Xmx limits how much working memory Alfresco can use. Depending on what functionality / interfaces of Alfresco you are using and any extension modules you've installed, you might want to think about raising Xmx. 1536m is a value I would consider the minimum for a regular installation - only for mini-installations as part of a transferrable demo system would I consider using less, and then only with configuration / optimisations on Alfresco to make it use the least amount of memory as possible.

Regarding your 15s refresh: What exactly do you need to wait 15 seconds for? The refresh of the details page or refresh of the document preview / renditions? You should keep in mind that the latter are re-generated asynchronously and may take some time depending on the size of the document. Since these conversions are not handled by Alfresco directly, changing the configuration of Alfresco won't improve the speed of the conversion. This usually requires some CPU / IO scaling, i.e. more CPU power, less memory swapping, faster disk access.

Do you have your database installed on the same server or any other applications that need to be considered? If not, you could scale up Xmx to 40 - 50 % of the total available RAM and leave the rest for IO caching as well as conversion processes. Otherwise it might be worth spending some of the RAM on your database caches as well and use less for Alfresco.

Regards
Axel

ericmachine
Champ in-the-making
Champ in-the-making
Thanks so much for coming back.

so looking at my current specs for this virtual machine - 1TB hard disk space, 10GB RAM and 2 vCPUs

MaxPermSize will go to 256m,

then I will increase 1536m for Xms (could I increase more?)

How about the Xmx?

Yes I am referring to the document preview (flash thing). It takes some time to get the latest copy.

Yes I am installing both alfresco and the database on the same virtual machine. Could I optimize further? I have 10GB of RAM for this.