-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Suggestion about LRUQueryCache Optimization #13318
Copy link
Copy link
Closed
Labels
Description
Description
Can we use ReentrantReadWriteLock in LRUQueryCache (Currently ReentrantLock) to allow reading cache concurrently, to improve search performance?
I benchmarked this optimization by mocking some random LongPoint and querying them with PointInSetQuery with bool filter.
| doc count | field cardinality | query point | baseline QPS | candidate QPS | diff percentage |
|---|---|---|---|---|---|
| 30000000 | 10 | 1 | 2481 | 5102 | 105.6% |
| 30000000 | 1000000 | 1 | 6396 | 6596.48 | 3.1% |
I think this change can help filter queries that need to query low-cardinality fields. If it helps, I will submit a PR.
Reactions are currently unavailable