-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some basic rocksdb options to command line
These options are there mainly to drive experiments, and are therefore hidden.
- Loading branch information
1 parent
7f76586
commit 790a0bb
Showing
13 changed files
with
129 additions
and
33 deletions.
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import results | ||
|
||
export results | ||
|
||
const | ||
# https://github.com/facebook/rocksdb/wiki/Setup-Options-and-Basic-Tuning | ||
defaultMaxOpenFiles* = 512 | ||
defaultWriteBufferSize* = 64 * 1024 * 1024 | ||
defaultRowCacheSize* = 512 * 1024 * 1024 | ||
defaultBlockCacheSize* = 256 * 1024 * 1024 | ||
|
||
type | ||
DbOptions* = object | ||
# Options that are transported to the database layer | ||
maxOpenFiles*: int | ||
writeBufferSize*: int | ||
rowCacheSize*: int | ||
blockCacheSize*: int | ||
|
||
func init*( | ||
T: type DbOptions, | ||
maxOpenFiles = defaultMaxOpenFiles, | ||
writeBufferSize = defaultWriteBufferSize, | ||
rowCacheSize = defaultRowCacheSize, | ||
blockCacheSize = defaultBlockCacheSize, | ||
): T = | ||
T( | ||
maxOpenFiles: maxOpenFiles, | ||
writeBufferSize: writeBufferSize, | ||
rowCacheSize: rowCacheSize, | ||
blockCacheSize: blockCacheSize, | ||
) |
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
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
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
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
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
Oops, something went wrong.