Search code examples
sql-serverdatabaseperformanceliferayjvm-arguments

How to improve Liferay 6.2 performance?


I start Liferay 6.2 by running Tomcat 7.0.42 on JVM 1.7 with following options on a CentOS 64 bit server with 8G Ram , but it is still running with low speed!

-XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:+UseConcMarkSweepGC -Xms3072m 
-Xmx3072m -XX:MaxPermSize=512m

What should I do to improve performance?


Solution

  • The problem was solved by some DB modifications. Data fragmentation is one of the causes of reducing response time of DB. Organizing and rebuilding indexes help resolving this issue. When average of fragmentation is between 5 and 30 percent, organizing indexes (ALTER INDEX REORGANIZE) is the solution and when the average is larger than 30 percent you should rebuild the index. For more information you can refer to https://technet.microsoft.com/en-us/library/ms189858(v=sql.110).aspx. Shrinking is another way that can optimize DB.

    Shrinking data files recovers space by moving pages of data from the end of the file to unoccupied space closer to the front of the file. When enough free space is created at the end of the file, data pages at the end of the file can be deallocated and returned to the file system. https://msdn.microsoft.com/en-us/library/ms189035.aspx

    Running following command allows 10% free space in DB:

        DBCC SHRINKDATABASE (UserDB, 10);