HCL Commerce default tunables

HCL Commerce has two instance profiles, Test and Production. Each profile contains its own tunable values for the HCL Commerce application servers, including Java virtual machines (JVMs), cache, and others. These values are in place to provide a standard base level of performance from which to operate, or tweak for improvements to individual configurations.

The Test profile is used for application servers in Authoring or Functional testing environment. The Production profile is used for application servers in Production or Performance testing environment. The tunable values that are listed in this document provide a reference that you can use as a starting point in fine-tuning your own environment. You can tune each value based on the performance test result in your own environment.

HCL Commerce uses containerization. To ensure that your tuned settings persist in subsequent container instances, follow the procedure that is described in Building a custom Docker image from a deployable package. Alternatively, you can customize the Docker startup process to do the JVM tuning during docker startup. For more information, see Tutorial: Customizing the Docker start-up logic. If no runEngine command exists, you can develop a customized runEngine command or replace the complete configuration file with customized content. For testing or experiment purpose, you can change the tunable value manually.

WebSphere IBM JVM Settings (for HCL Commerce and HCL Commerce Search)

The following table lists start values for WebSphere application servers that are running in Liberty (for Store and Search server) and the WebSphere Application Server (for Transaction servers). To simplify the tuning effort, use similar tuning parameters for different application servers. If the workload likely to be different on different servers (for example, on the Transaction server that is compared with Store servers), you can use different tunable values for different servers. The RunEngine commands to change the JVM settings are: set-heap-size/add-system-property (for Store and Search servers), and set-heap-size/add-generic-jvmarg (for Transaction servers). To modify JVM settings manually in Liberty, edit the jvm.options file directly. For the WebSphere Application Server, make your changes in the Administration Console.

Default values in HCL Commerce and HCL Commerce Search
Property Name Version 9 Test Profile Version 9 Production Profile
32 / 64-bit JDK 64-bit 64-bit
Thread Stack size -Xss1m -Xss1m
Initial heap size (-Xms) 512m 2048 m
Maximum heap size (-Xmx) 1536m 4096m
Disable JIT No No
Garbage collection policy (-Xgcpolicy) gencon gencon
Garbage collection threads (-Xgcthreads) 2* 8*

Set the gcthreads value to the available VCPU number or VCPU number -1. To determine the optimal VCPU number for each application server Docker container, refer to Docker performance tuning.

Fixed nursery (-Xmn) Not specified 1536m
Starting nursery (-Xmns) 256m Not specified
Max nursery (-Xmnx) 768m Not specified
Garbage collection logging

Enabled with log rotation*:

-Xverbosegclog[:<file>[,<X>,<Y>]]

Enabled with log rotation*:

-Xverbosegclog[:<file>[,<X>,<Y>]]

* For more information regarding this default, see, Boring but necessary: Rotate the GC log!.

Additional tuning parameter for JSP optimization -Dcom.ibm.wsspi.jsp.disableResourceInjection=true -Dcom.ibm.wsspi.jsp.disableResourceInjection=true

HCL Commerce Cache Settings (DynaCache)

The Base Cache is the cache instance that stores Servlet cache entries and some command cache entries. It is defined in all application servers: Store, Transaction and Search. However, the Base Cache is not used by default on the Search server.

The tunable values are applicable when a Servlet cache (for a JSP fragment) is used. The cache is stored in the Store server in the Remote store environment, or in the Transaction server in the Local store environment. For the Remote store environment, the production Store server normally follow the Production profile, while the Transaction server follows the Test profile. Modify the Base Cache settings manually: On Liberty servers, edit server.xml file directly. On the WebSphere Application Server, make your changes within the Administration Console.

Default values for HCL Commerce and HCL Commerce Search cache settings (DynaCache)
Property Name Version 9 Test Profile (or when Servlet Cache is not used) Version 9 Production Profile (or when Servlet Cache is used)
base Cache size
2000 5000
enableDiskOffload
Off On
flushToDiskOnStop
Off Off
diskCachePerformanceLevel
N/A High performance and high memory usage
diskCacheSize
N/A 10 GB*

10 GB is a starting value. Your value can be determined by balancing the disk space and total cache entry size.

HCL Commerce Data Cache Settings

Configuring HCL Commerce data cache

Different data cache instances are defined for each of the the three HCL Commerce application servers (Store, Search, and Transaction). The default profile value is the same for the same cache instance on different servers (for example, WCFlexFlowDistributedMapCache exists on both the Store server and Transaction server). But you can adjust the value based on the actual usage on different servers.

The values in the following table are starting values for performance tuning. Your business data volume is likely to be different than the default. Therefore, for example, one company might have a large catalog (land therefore a large number of Catalog Group and Catalog Entries) but a very small number of promotions. Another company may have a small catalog but a large number of promotions. Increase or decrease the data cache size accordingly. Increasing your data cache will increase the memory footprint by the number of cached objects (data caches are only stored in memory). The HCL Commerce performance team has done performance testing to ensure that the recommended cache size setting does not cause JVM out-of-memory conditions. However, the actual data cache size in memory is determined by each cache entry size and total cache entry number in memory. Do your own performance testing to ensure that the configured data cache size can be contained in memory, and balance between performance and memory usage.

Transaction server data cache instances

You can manually modify data cache settings the WebSphere Application Server Administration Console.

Property Name Version 9 Test Profile Version 9 Production Profile
name="InventoryCache"
jndiName="dmap/IVCache"
20,000 100,000
name="PriceCache"
jndiName="dmap/PriceCache"
20,000 100,000
name="MarketingCache"
jndiName="services/cache/DM_Cache"
2,500 25,000
name="MarketingUserCache"
jndiName="services/cache/DM_UserCache"
10,000 50,000
name="FlexFlowCache" 
jndiName="services/cache/WCFlexFlowDistributedMapCache"
1,000 5,000
name="InventoryConfigurationCache"
jndiName="dmap/IC_Cache"
5,000 25,000
name="LayoutCache"
jndiName="services/cache/WCLayoutDistributedMapCache"
1,000 5,000
name="PreviewTokenCache"
jndiName="services/cache/PT_Cache"
1,000 5,000
name="PriceRuleCache"
jndiName="dmap/PR_Cache"
5,000 25,000
name="RESTTagCache" 
jndiName="services/cache/WCRESTTagDistributedMapCache"
1,000 5,000
name="SEORedirectRulesCache"
jndiName="services/cache/WCSEORedirectRulesDistributedMapCache"
1,000 5,000
name="SEOURLCache"
jndiName="services/cache/WCSEOURLDistributedMapCache"
5,000 25,000
name="SEOURLKeyword2URLTokenCache"
jndiName="services/cache/WCSEOURLKeyword2URLTokenDistributedMapCache"
3,000 15,000
name="SEOURLToken2URLKeywordCache"
jndiName="services/cache/WCSEOURLToken2URLKeywordDistributedMapCache"
3,000 15,000
name="SearchAttributeCache"
jndiName="services/cache/WCSearchAttributeDistributedMapCache"
5,000 25,000
name="SearchCatHierarchyCache"
jndiName="services/cache/WCSearchCatHierarchyDistributedMapCache"
2,000 10,000
name="SearchFacetCache"
jndiName="services/cache/WCSearchFacetDistributedMapCache"
2,000 10,000
name="SearchMerchandisingCache"
jndiName="services/cache/WCSearchMerchandisingDistributedMapCache"
1,000 5,000
name="SearchNavigationCache"
jndiName="services/cache/WCSearchNavigationDistributedMapCache"
1,000 5,000
name="SearchSTACache"
jndiName="services/cache/WCSearchSTADistributedMapCache"
100,000 500,000
name="WidgetDefinitionCache"
jndiName="services/cache/WCWidgetDefinitionDistributedMapCache"
1,000 5,000
name="SystemCache"
jndiName="services/cache/WCSystemDistributedMapCache"
2,000 10,000
name="SessionCache"
jndiName="services/cache/WCSessionDistributedMapCache"
1,000 5,000
name="WCContractDistributedMapCache" 
jndiName="services/cache/WCContractDistributedMapCache"
1,000 1,000
name="WCPromotionDistributedMapCache" 
jndiName="services/cache/WCPromotionDistributedMapCache"
3,000 10,000
name="WCMarketingCache"
jndiName="services/cache/WCMarketingDistributedMapCache"
3,000 15,000
name="UserCache"
jndiName="services/cache/WCUserDistributedMapCache"
3,000 15,000
name="CatalogGroupCache" 
jndiName="services/cache/WCCatalogGroupDistributedMapCache"
3,000 15,000
name="CatalogEntryCache" 
jndiName="services/cache/WCCatalogEntryDistributedMapCache"
5,000 50,000
name="WCPriceCache"
jndiName="services/cache/WCPriceDistributedMapCache"
5,000 50,000
name="MiscCache"
jndiName="services/cache/WCMiscDistributedMapCache"
3,000 15,000
name="WCCache"
jndiName="services/cache/WCDistributedMapCache"
10 50
name="WCStoreDistributedMapCache" 
jndiName="services/cache/WCStoreDistributedMapCache"
10 10
name="SEOPageDefinitionCache"
jndiName="services/cache/WCSEOPageDefinitionDistributedMapCache"
5,000 25,000

Store server data cache instances

You can manually modify data cache settings by directly editing server.xml.

Property Name Version 9 Test Profile Version 9 Production Profile
id="services/cache/WCFlexFlowDistributedMapCache"
1,000 5,000
id="services/cache/WCSEOURLDistributedMapCache"
5,000 25,000
id="services/cache/WCSEOURLKeyword2URLTokenDistributedMapCache"
3,000 15,000
id="services/cache/WCSEOURLToken2URLKeywordDistributedMapCache"
3,000 15,000
id="services/cache/WCLayoutDistributedMapCache"
1,000 5,000
id="services/cache/WCSEORedirectRulesDistributedMapCache"
1,000 5,000
id="services/cache/WCRESTTagDistributedMapCache"
1,000 5,000
id="services/cache/WCStoreDistributedMapCache"
1,000 1,000

Search server data cache instances

You can manually modify data cache settings by directly editing server.xml.

Property Name Version 9 Test Profile Version 9 Production Profile
id="SearchDistributedMapCache" 
jndiName="services/cache/SearchDistributedMapCache"
5,000 25,000
id="SearchCommandDistributedMapCache" 
jndiName="services/cache/SearchCommandDistributedMapCache"
1,000 5,000
id="SearchSystemDistributedMapCache" 
jndiName="services/cache/SearchSystemDistributedMapCache"
2,000 10,000
id="SearchUserDistributedMapCache" 
jndiName="services/cache/SearchUserDistributedMapCache"
3,000 15,000
id="SearchNavigationDistributedMapCache" 
jndiName="services/cache/SearchNavigationDistributedMapCache"
5,000 25,000
id="SearchCatHierarchyDistributedMapCache" 
jndiName="services/cache/SearchCatHierarchyDistributedMapCache"
2,000 10,000
id="SearchFacetDistributedMapCache" 
jndiName="services/cache/SearchFacetDistributedMapCache"
2,000 20,000
id="SearchContractDistributedMapCache" 
jndiName="services/cache/SearchContractDistributedMapCache"
5,000 25,000
id="SearchMerchandisingDistributedMapCache" 
jndiName="services/cache/SearchMerchandisingDistributedMapCache"
1,000 5,000
id="SearchAttributeDistributedMapCache" 
jndiName="services/cache/SearchAttributeDistributedMapCache"
5,000 25,000
id="SearchMiscDistributedMapCache" 
jndiName="services/cache/SearchMiscDistributedMapCache"
3,000 15,000
id="SearchCacheConfigureDistributedMapCache" 
jndiName="services/cache/SearchCacheConfigureDistributedMapCache"
100 100

Other tunables

The following tunables are applicable to the Production profile only. You do not need to tune them for the Testing profile.

Liberty Executor setting

Liberty has a different thread pool model than the WebSphere Application Server. There is a unified Executor pool for different connections. The default value for this is automatic tuning. However, HCL Commerce performance testing reveals that this value may cause unpredicted behaviors under heavy workloads.

Therefore, the tuning for both Store and Search server is as follows. You can modify this setting manually by editing the server.xml configuration file. Set the following value:
<executor maxThreads="50" coreThreads="4" />

HTTP KeepAlive setting

In HCL Commerce version 9, HTTPS is used by default for all connections to WebSphere Application Server servers. The initial SSL handshake that starts the HTTPS connection has a high cost. To mitigate this, enable the KeepAlive setting for HTTP connections. On Liberty servers (for Store and Search servers), edit the server.xml configuration server, and set the following value:
<httpOptions keepAliveEnabled="true" maxKeepAliveRequests="-1" /> 
On the Transaction server, make your changes from the WebSphere Application Server console: Application servers > server1 > Web container transport chains > HttpQueueInboundDefaultSecure > HTTP inbound channel (HTTP_4). Enable Use persistent keep alive connections. Select Unlimited persistent requests per connection.      
Note: setting maxKeepAliveRequests to -1 means no limit to the maximum HTTP/HTTPS requests for one connection. This is not recommended for connections from web browsers. In production environments, the connection to application servers is from the web server or proxy server, so in these cases it is acceptable to set it to -1. Alternatively, you can set it to a large number such as 10000.

Transaction timeout for Search server

The Search server frequently conducts long-duration transactions. An example is the build-index process. To prevent timeouts, increase the default transaction value for Liberty on Search server. Edit the server.xml configuration file, adding:
<transaction totalTranLifetimeTimeout="600s"/>