When a sync node is scheduled, the instance may take longer than expected to run. This topic describes how to optimize a sync node when the instance runs slowly or the node start time greatly differs from the scheduling time.
Prerequisites
- Level-1 scheduling resources: Go to Operation Center and choose in the left-side navigation pane. On the page that appears, right-click the sync node in the directed acyclic graph (DAG) on the right and select View Node Details. On the Node Information page that appears, you can view the attribute information and level-1 scheduling resources of the node.
- Level-2 running resources: Go to the Data Integration module and click in the left-side navigation pane. On the page that appears, you can view and add level-2 running resources.
Background information
- The node start time greatly differs from the scheduling time.
- The sync node remains in the WAIT state for a long time.
- The sync node runs at a low speed.
Scenario 1 where the start time of a sync node greatly differs from the scheduling time
In this scenario, you must first obtain the operational logs and attribute information of the node and compare the operational logs with the attribute information. The comparison result shows that the node start time in the operational logs differs from the scheduling time in the attribute information. Most of the time is consumed while waiting for scheduling.
Problem example
- Go to Operation Center and choose in the left-side navigation pane. On the page that appears, right-click the sync node in the DAG on the right and select View Node Details. On the Node Information page that appears, check the scheduling time of the node, which is 00:00. However, the node actually starts at 00:29. It is inferred that most of the time is consumed while waiting for scheduling.
- Choose View Runtime Log. The operational logs show that the node starts at 00:29 and ends at 00:30. That is, it takes only 1 minute to complete the task. This indicates that the node is able to run normally. in the left-side navigation pane. On the page that appears, right-click the node instance and select
Troubleshooting
- Check whether multiple nodes are scheduled at the same time in your workspace. The default resource group contains a limited number of level-1 scheduling resources. If multiple nodes are scheduled at the same time, other nodes must queue up and wait for scheduling.
- The peak hours for business scheduling range from 00:00 to 02:00. We recommend that you run your business during off-peak hours.
Scenario 2 where a sync node runs at a steady speed of 0
The operational logs of the node show that the node runs at a steady speed of 0. This is usually because the source database has a high CPU load or network traffic usage, and therefore the SQL statement is executed slowly. Or, truncate operations are performed before the SQL statement is executed, and therefore the SQL statement is processed for a long time.
Problem example
- The operational logs of the node show that the node keeps running from 18:00 to 21:13 at a steady speed of 0.
- The operational logs also record a truncate operation that lasts from 18:00 to 21:13.
Troubleshooting
It can be inferred that the sync node is slow due to the truncate operation. You need to check the cause of the slow truncate operation in the source database.
Scenario 3 where a sync node runs at a low speed
The operational logs of the node show that the node runs at a low speed slightly greater than 0.
Problem example
- The operational logs of the node show that the node runs at a low speed of about 1.93 Kbit/s.
- The value of the WaitReaderTime field is greater than that of the WaitWriterTime field, indicating that more time is consumed for waiting to read data.
Troubleshooting
If the node runs at a low speed, check whether the value of WaitReaderTime or WaitWriterTime is large. If reading or writing consumes more time, check the load of the corresponding source or destination database.