-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmark that measures cost of repeatedly opening the database.
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77948e7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(noob question) In fact, what is the cost of opening the database? If we have ~10,000 key/value pairs, can we expect to open the DB and extract a single value in less than 100ms? 1s?
77948e7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current release (1.18) will compact the database upon open, so the time will depend on how much data is in the log, and (of course) the speed of your hardware. There's a new manifest reuse feature (in the reuse-manifest branch), but there appears to be a bug that slightly increases corruption, so it's still experimental and not in master - until fixed.
I think that 100ms is unlikely (unless log is empty), but 1s is likely (but not guaranteed) on modern hardware.