Opentaps Performance Tuning Recommendations

From Opentaps Wiki
Jump to navigationJump to search

(This section about opentaps server performance tuning is intended for Technical System Administrators.)

This User Guide contains the following sections that pertain specifically to server performance issues when running opentaps, and the tuning recommendations that have been developed.

When and How to Tune opentaps server

Experience running opentaps and OFBiz has shown that for the most impact, your performance testing and tuning should be done after you have setup and configured your company, your catalog, categories and products, and after you have installed any customizations you plan to use. The best tuning is dependent upon the actual user traffic flowing to the server, so it will be best to tune when you have a load simulation that is your real operating range for the number of users and the type of activity they generate in the opentaps system. Refer to the section about Tsung.

Setting Cache Expire Times for Production

The opentaps release download has a cache properties file that is optimized for evaluation or development. To get the best production performance from opentaps it is critical to adjust certain cache "expire times" which can lead to excessive cache reloading in a production environment.

The file that requires editing is located in the opentaps installation folder, in this subdirectory:

* /framework/base/config/
* Open this file with a text editor
* Comment out the lines near the bottom of the file that begin with these terms,
  (Comment out the lines by adding a # symbol as the first character on each line.)
**    "minilang.", 
**    "script.", 
**    "webapp.", 
**    "widget.", and 
**    "template.".
* Save the modified file

Now, all of these data entities will remain in the cache for repeated use, unless they are explicitly removed by the system cache services.

General Database and Cache Performance Information

You can get a lot of good information on the database and cache performance by looking at the statistics in the cache management page located at:

   [Web Tools] > [Cache Maintenance].  

The statistics about hits and misses, and about why cache misses happened are listed on this page.

There are three causes for cache misses:

1. Not Found in the cache, the data has not been cached yet 2. Soft Reference clearing, the cached data was removed by memory management 3. Expire Time reached for an entry in the cache

Cache Related Memory Settings

If you are running into problems with Soft References (as seen on the cache management page in WebTools), it is often found that your Java heap memory settings are less than ideal. Every time Java does a memory allocation and finds it needs to grow the heap size it first does a garbage collection and clears out soft references. The OFBiz Entity Engine caches all use Soft References to avoid overrunning memory with cached database data. So, the Java memory size parameters have an important impact on performance of caching.

Please refer to this page for the recommended settings for opentaps Release 1.4.0 Java memory parameters, Recommended Memory Settings.

Database Intensive Operations

The comments above on memory settings, and caching, are especially applicable to functions like catalog-category browsing where just about everything should be cached. As regards database intensive operations, like database searching for business documents, it's necessary to focus on how the database is doing with the query execution.

opentaps logs server hits in as much detail as you specify, but this can cause the log data to grow rapidly. Make sure to set the level of logging you really need, and to turn it on and off for special performance tuning projects. Refer to this article, [Server Hit Logging]

  • Other Recommended User Guide Articles About Performance Tuning

[Managing Cache]

Database Tips

Using the Query Tool

Running Tsung against opentaps server -- a load simulation tool

Miscellaneous Tips