Direkt zum Inhalt

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

gefragt vor 2 Monaten17 Aufrufe
1 Antwort
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

beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.