-
-
Notifications
You must be signed in to change notification settings - Fork 618
Reduce locks contention #389
Copy link
Copy link
Open
Labels
area:performanceRelates to performance, benchmarks…Relates to performance, benchmarks…bugSomething isn't workingSomething isn't working
Description
Metadata
Metadata
Assignees
Labels
area:performanceRelates to performance, benchmarks…Relates to performance, benchmarks…bugSomething isn't workingSomething isn't working
Projects
StatusShow more project fields
In Progress 🏗️
As mentioned by @baptistejamin in #372, Sonic has plenty of useless locking which slows down ingestion.
Edit: When I said “useless locking”, I mostly meant “locking for too long”. I have a feeling some locks are completely unnecessary, but most are just locked for too long and force concurrent tasks to wait for no good reason.
For example,
StoreKVPool::flushlocks the pool in write mode, while it only ever needs read access. By doing so, it prevents concurrent reads, which seem unnecessary. Every time the janitor runs, all KV reads are blocked, increasing response time for in-flight queries.I may have missed something and this is just one example, but it’s the kind of broad locking behavior we will get rid of.