Application server considerations
Commerce+ Transaction Server is ultimately another Java 2 application that runs on top of Open Liberty Server. As a result, Open Liberty Server acts as the operating system for Commerce+ Transaction Server. Optimizing the application servers improves the performance of Commerce+ Transaction Server.
The Commerce+ Transaction Server Store, Search, and Customization servers use Open Liberty. Nearly all the performance tuning information can be found in the Open Liberty documentation (all topics by feature; monitoring and troubleshooting; tuning performance).
- Executor: Equivalent to the old tWAS web container thread pool. Configured in the server.xml file.
- connectionManager: (equivalent to Datasource connection pool size). Configured in the datasources.xml file.
- JVM generic parameters: should be tuned in the jvm.options file.
- Command line options: Use the Open Liberty guide as a reference to the JVM parameters.
The following sections discuss performance tuning configurations specific to the Commerce+ Transaction Server. In your HCL Commerce+ Transaction Server development environment, these settings are
organized into individual XML files (such as server.xml,
datasources.xml, and concurrent.xml).
ts-openliberty workspace and deploy them following the
steps in the Customizing Server Resources documentation.Web Container thread connection pool
Web servers use many lightweight threads to handle large volumes of simple requests (like serving static images), but application servers process fewer, more complex, and longer-running requests.
Open Liberty Server uses a single, self-tuning default thread pool
(Executor) for standard web requests. You can, however, manually set the
pool's core (minimum) and maximum thread limits in your server configuration.
Increasing thread count does not automatically improve throughput or concurrency support. Excess threads force CPUs to waste time context-switching instead of doing work, while consuming memory and database connections unnecessarily. Conversely, setting the limit too low starves the Open Liberty Server, leaving CPUs underutilized.
If you override the self-tuning defaults, use these starting guidelines:
-
Set the maximum to at least 10 threads.
-
For multi-processor systems, start with 5 threads per CPU (e.g., 20 threads for a 4-core system).
-
Increase max threads only if you have spare CPU capacity for additional concurrent work.
-
Set the core (minimum) size equal to the maximum size to avoid the overhead of repeatedly creating and destroying threads.
<executor> element in your server.xml
file:<executor coreThreads="50" id="default" maxThreads="50" name="Default Executor"/> - Active schedule threads
- Commerce+ Transaction Server key manager
- Commerce+ Transaction Server audit
- IBM MQ listeners
- Other multi-connection threads in your custom code
Database connection pool
In Commerce+ Transaction Server configurations, each active request thread generally requires its own database connection. Furthermore, if you use the Commerce+ Transaction Server Scheduler, you must reserve extra connections specifically for scheduler background threads.
An insufficient database connection pool blocks active threads from processing requests. This starves the application server’s CPUs, preventing full utilization and lowering overall throughput.
Data source connection pool size
maxPoolSize:- Executor threads: The primary web container threads configured in your server.xml file. (e.g., 50 threads).
- Managed Executor threads: Background jobs and scheduler tasks rely
on work manager threads, which are configured via
<managedExecutorService>elements in concurrent.xml file. These consist of five thread groups: four dedicated to the scheduler and one reserved for general Commerce+ Transaction Server tasks. - Commerce+ Transaction Server key manager: Uses one connection.
- Custom Code: Any additional threads initiated by custom extensions that consume database connections.
- Refer to the Customizing Server Resources documentation to locate your datasources.xml file.
- Locate the
<connectionManager>element within theHCLCommerceDS<dataSource>section. - Increase the
maxPoolSizeattribute to match the total number of connections added to your thread pools (executoror custom). For example:<dataSource id="HCLCommerceDS" ...> <connectionManager maxIdleTime="5m" maxPoolSize="55"/> ... </dataSource>
Deploy configuration updates to the server
In Open Liberty Server,
Concurrency Utilities manage background tasks and scheduler thread groups (formerly called Work
Managers), keeping them separate from the primary web container
<executor>.
In Commerce+ environments, scheduler thread groups are
configured via <managedExecutorService> elements within
concurrent.xml file. Each <managedExecutorService>
defines an isolated thread pool (such as default, broadcast,
or inventory).
Key properties to configure:
-
concurrencyPolicy max: Specifies the maximum number of concurrent threads permitted for that particular scheduler pool.
-
Open the concurrent.xml file by following the steps in the Customizing Server Resources documentation.
- Find the target service element (for example,
<managedExecutorService id="default" ...>). - Set the
maxvalue in<concurrencyPolicy max="5"/>to your updated thread target. - Deploy the updated file to the server.
Prepared statement cache
While Open Liberty Server reports a 10%–20% performance improvement from prepared statement caching, the sheer volume of SQL statements in Commerce+ Transaction Server requires hands-on tuning rather than relying solely on automated monitoring.
To find the optimal cache size, conduct performance testing under controlled, reproducible workloads.
Initial Setup & Tuning:
- Start with a baseline setting of
150. - Increase the size in increments of
50until throughput levels off.
Configuring the Prepared Statement Cache Size:
- Refer to Customizing Server Resources and open
datasources.xmlfile. - Find the
HCLCommerceDS<dataSource>definition. - Update or add the
statementCacheSizeattribute on the<dataSource>tag. Example:<dataSourceid="HCLCommerceDS"statementCacheSize="150"...><!-- properties --></dataSource> - Deploy your changes to the server.