Closed lukoktonos closed 10 months ago
Hi @lukoktonos I'd like to take this up. Here's a simple approach I think would work, please correct me if I've missed anything: Following for roughly estimating current memory usage:
id_to_status
: Adding a gauge in the insert_with_status
method, denoting the len of DashMap.statuses
: Adding a gauge in the persistent_handle.insert_with_status
method, denoting the len of LruCache.@neeBis thanks for looking to contribute! Yep, those gauges both sound right to me!
Hi @lukoktonos Can you please take a look at the above PR?
Resolved in 5b33d1f33
Description
The QueryStatusCache currently has 2 maps: id_to_status: a lighter weight map that is used for query routing decisions but can grow unbounded (which may be mitigated if we switch to using a bloom/cuckoo filter at this layer: REA-3568). statuses: an LruCache that stores the full query strings and has a maximum capacity, currently, of 100,000.
Having a gauge for the size of these would allow us to roughly estimate their current memory usage in the system, and allow us to observe the rate of unique queries that readyset is observing
Change in user-visible behavior yes
Requires documentation change
yes