Skip to content

Discussion on improving concurrency of trie #1053

Open
@s1na

Description

Modifications to the trie (put and del) are protected via a semaphore. The locking period however can be quite long, as after taking the semaphore put calls findPath and possibly _updateNode, both of which are IO-bound. This reduces throughput of updates significantly.

This issue aims to discuss two points:

  • What are the thread-safety requirements of the trie? i.e. What are the race conditions that have to be protected against?
  • Given the requirements, would it be possible to limit the use of semaphores to the absolute minimum or remove them completely to improve throughput?

Edit: Initial benchmarking results suggest this to be a bottleneck.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions