-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
__wt_session_cursor_cache_sweep is called irregularly - once for every 40 calls to WT_SESSION::reset or __cursor_cache_release. Once it is called, it checks to make sure it hasn't been called in the last second. If those checks pass, then it examines between 5 and 32 buckets out of 512 buckets that the cursor cache is split into. More buckets if it's finding cursors to close. There's an assumption here that there are potentially lots of calls to release cursors and reset, there's never a huge period of time when they are never or hardly ever called.
I think with session::reset, at least, we should always call the sweeper, not wait for the 40 call countdown. It can return immediately if a second hasn't elapsed since the last sweep. And if many seconds have elapsed, it should scale up the number of buckets to be swept accordingly. Imagine a few minutes have elapsed, we probably want to sweep it all.
- duplicates
-
WT-10253 Run session dhandle sweep and session cursor sweep more often
- Closed