Set the maximum open file limit for pebble to avoid open files exceeds the system open files limit
What is changed and how it works?
set the estimated max open files limit to (sum of topN table files size) / tableConcurrency * 2
check the estimated open files limit with a default min value of 1024.
Set pebble maxOpenFiles to the estimatedOpenFiles, L0CompactionThreshold and L0StopWritesThreshold to estimatedOpenFiles/2.
Check List
Tests
Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code
Side effects
Possible performance regression
Since if there are more files in pebble than estimatedOpenFiles/2, pebble will start compacting L0 SST files and stop write, thus there may be performance regression in some extreme condition
What problem does this PR solve?
Set the maximum open file limit for pebble to avoid open files exceeds the system open files limit
What is changed and how it works?
Check List
Tests
Side effects
Related changes