Feature #63703
openIf a prefix is available, allow it be used to narrow the bounds of OMAP iterator
0%
Description
In the current implementation of BlueStore::get_omap_iterator(), it creates an iterator with the bounds that cover the entire OMAP. However, in many cases, particularly when S3 ListObjects requests are handled, a prefix is provided. In those cases, it is more efficient to use an iterator with narrowed bounds marked by the prefix, as it could help avoid reading some SSTs during the iteration. Another benefit is that the caller can skip the prefix matching during the iteration entirely since now the iterator only returns the keys that match the prefix.
This ticket calls for an extension of get_omap_iterator() so that the caller can passes in a prefix and it can make use of it to create a narrow range for iteration.
Updated by Yixin Jin 10 days ago
Xiang Li wrote in #note-1:
Is anyone trying out this new feature? Can I give it a try?
I don't think anyone has tried it except myself. With my own experiment of it, I don't notice much performance improvement, which could be related to how I conducted the experiment. However, I do notice that the read load on BlueFS is greatly reduced. I suspect that with the proper range, fewer SST files need to be read.