Performance Configuration Parameters
Certain parameters within both the JVM and Data Hub can be adjusted to help maximize performance.
Adjustments to the Runtime Environment
For Unix or Linux systems, add the following to the startup shell script datahubserver.sh:
# Explanation of settings: # * Set the minimum memory to 8192mb # * Set the maximum memory to 8192mb # * Use the ParNew garbage collector for the young generation heap # * Use the ConcurrentMarkSweep garbage collector for the old generation heap # * Tell the JVM to touch all memory pages during JVM initialization # * Disable explicit garbage collection (for example, via the System.gc() method) export CATALINA_OPTS="-Xms8192m -Xmx8192m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+AlwaysPreTouch -XX:+DisableExplicitGC"
or
For Windows systems, add the following to the startup batch script datahubserver.bat:
rem Explanation of settings in CATALINA_OPTS: rem * Set the minimum memory to 8192mb rem * Set the maximum memory to 8192mb rem * Use the ParNew garbage collector for the young generation heap rem * Use the ConcurrentMarkSweep garbage collector for the old generation rem heap rem * Tell the JVM to touch all memory pages during JVM initialization rem * Disable explicit garbage collection (for example, via the System.gc() method) set CATALINA_OPTS=-Xms8192m -Xmx8192m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+AlwaysPreTouch -XX:+DisableExplicitGC
The VM options shown previously are just an example. Do not use them as is in the production environment. Determine your own best configuration.
In-Memory Mode Processing
In-memory processing dramatically speeds up processing by significantly reducing database accesses. Optimized in-memory processing continues to provide Data Hub’s durability guarantees, which ensure that these items are processed and preserved in the case of crash or restart. The in-memory process uses the max composition action size property to create processing batches. The batches stay in memory and automatically publish.
- Don't use the auto publish SAP configuration. If configured, it results in unnecessary publications.
- Initiate the first composition action. If you are using SAP integrations, auto-compose is also an option.
- After being initiated, compositions continues as more raw items become available, which is the same behavior as standard mode with max composition action size set.
- Complex dependencies across data loading actions combined with a target system that cannot handle partial data
- In-Memory mode can be complicated for failover scenarios. The primary node can be IN-MEMORY mode, but the backup node must be in STANDARD mode. Actions would have to be re-triggered on the failover node when it is expected to start doing work. To switch back to IN-MEMORY mode, a server restart is required while no processing is taking place on any live Data Hub nodes.
Adjustments to Data Hub Configuration
Depending on the runtime environment, you may need to adjust Data Hub configuration properties by overwriting them in your local.properties file to get the best performance. A list of performance-related properties is provided in the following table:
| Configuration Property | Default Value | Description |
|---|---|---|
| datahub.import.batch.size | 1000 | Specifies the maximum number of raw items that are persisted at once within a transaction. Data sets larger than the batch size value persist in transactions matching the size of the property. |
| datahub.config.mode | STANDARD | If the datahub.config.mode is set to IN_MEMORY, Data Hub's publication process is done in memory. Working in memory performs much better than STANDARD mode where you are working from disk. Also, even though you have to initiate the first composition action, after that composition and publication are automatic. They continue until there is no more data. |
| datahub.composition.batch.size | 1000 | Specifies the maximum number of raw items for a composition processing page. A processing page is a unit of work holding raw items that are actively being composed into canonical items. For example, assume that you have 10,000 raw items for a composition action. Assume that the batch size is set to 1,000. With these inputs, it takes 10 processing pages to compose all raw items for that composition action. Each processing page requires Data Hub to merge with the canonical items already composed from the previous cycles, which creates some overhead. Load all raw items into memory, compose them there, and then persist the canonical items. In practice, memory is limited and, when items being composed exceed the available memory, a serious performance degradation begins. The goal of adjusting this parameter is to find a balance between available heap size and as large a batch size as possible. If you are using in-memory mode, tune the batch size setting. You don't want to overrun the memory made available to the JVM in which the Data Hub is running. |
| datahub.max.composition.action.size | 100000 | Specifies the maximum number of items that are composed in a single composition action. Assume the value of this property (max composition action size) is smaller than the composition page size (datahub.composition.batch.size). The page size resets to the max composition action size. Another scenario, the max composition action size is larger than the page size. The max composition action size is not a multiple of the page size. The max composition action size increases to the closest multiple of the page size. If max composition action size is set to -1, it is unbounded.
The batch size MUST be larger than the largest number of segments in a single IDoc. For in-memory mode, the batch size should usually be the same as the max action size. |
| datahub.publication.page.size | 1000 | Specifies the maximum number of target items for a publication processing page. A processing page is a unit of work holding target items that are actively being published using the core adapter service. This property describes the size of the page returned to the callback. The larger the page size, the fewer the pages per publication action. The goal when adjusting this parameter is to find a balance between page size and the number of callback requests. Ideally, you reduce the number of callback requests without impeding performance. Callback refers to the step in publication when the target system adapter calls back to the Data Hub for ImpEx data. |
| datahub.publication.batch.size | Specifies the maximum number of target items that are created from canonical items in a single transaction (batch) during publication. The batch size is the unit of work during publication. When In-Memory mode is enabled, the specified publication batch size is the number of target items kept in the memory buffer. Once processed, the memory buffer is cleared and the next batch is loaded. When STANDARD mode is enabled, the specified publication batch size is the number of target items committed to the database. Once processed, the next batch is committed. | |
| datahub.publication.timeout | 1000000 | Specifies the amount of time required to publish a single transaction (batch) of target items. This property relies on the parameters for datahub.publication.batch.size because the size of the batch determines the amout of time needed to create the target items from canonical items. The greater the number of items, the more time is needed to process them. |
| datahub.max.publication.action.size | 100000 | Specifies the maximum number of items that are published in a single publication action. Set the value of this property smaller than the number of canonical items per processing page (datahub.composition.batch.size). The page size resets to the max publication action size. The property is larger than the page size and is not a multiple of the page size. Then it increases to the closest multiple of the page size. If this property is set to -1, it is unbounded. |
| datahub.jdbc.statement.batch.size | 1000 | Specifies the maximum number of items in a single JDBC insert statement. The jdbc statement is smaller than the load, composition, or publication size. Then it may result in more than one insert occurring within a single transaction scope. |
| datahub.sql.maxUpdateBatchSize |
1000 |
Specifies the maximum size of the IN clause used in an UPDATE statement. Some Data Hub updates are done in batch. This configuration property is here because some databases place a limit on the number of expressions that can appear in the IN clause. |
