- 新しい順
- 投票が多い順
- コメントが多い順
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:
-
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).
-
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.
-
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
関連するコンテンツ
- 質問済み 5ヶ月前

In addition to what the re:Post Agent provided, I would also suggest enabling and using Slow Query Logging. This will give you a better idea of where time is being spent (including lock wait time): https://docs.aws.amazon.com/neptune/latest/userguide/slow-query-logs.html