跳至內容

High transaction completion time while committing in AWS Neptune

0

In our systems we are observing High latency while committing data to Neptune as we are taking lock over all the nodes mentioned in a transaction.

If there are any metrics to verify the latency within the Neptune or how can the lock time be reduced ? Most of the time is being consumed when we are trying to update a previously created data so is there support to partially update the data of a node

已提問 2 個月前檢視次數 17 次
1 個回答
0

When experiencing high transaction completion times in Neptune, there are several metrics and strategies to consider.

For monitoring transaction latency, you can use CloudWatch metrics to diagnose performance issues. Key metrics to watch include:

  • CPUUtilization
  • VolumeWriteIOPs
  • MainRequestQueuePendingRequests

These metrics together can help identify if your server is processing write requests efficiently or if you're experiencing bottlenecks. For example, high CPUUtilization and VolumeWriteIOPs with variable latency and pending requests indicate you may be sending more work than the server can process.

To reduce lock time and improve write performance:

  1. Write data in batches of 50-100 objects per commit. An object can be a node, edge, or property in a Labeled Property Graph (LPG).

  2. Use multiple parallel connections for large write operations. Neptune creates two database threads for each vCPU, so you can start with twice the number of vCPUs when testing for optimal parallelization.

  3. Design your clients to handle ConcurrentModificationExceptions efficiently, as these can occur even with a single connection writing data.

Regarding lock conflicts, Neptune implements a lock-wait timeout mechanism where blocked transactions wait up to 60 seconds for locks to be released. If Neptune detects a dependency deadlock between transactions, it will immediately cancel and roll back one of them, typically the one with fewer records inserted or deleted.

For updating existing data, Neptune doesn't have a specific "partial update" feature - updates to nodes are handled as complete operations within transactions. However, batching your updates as suggested above can help improve overall performance when modifying existing data.
Sources
Transaction Isolation Levels in Neptune - Amazon Neptune
Performance efficiency pillar - AWS Prescriptive Guidance
Using CloudWatch to monitor DB instance performance in Neptune - Amazon Neptune

已回答 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。