little less extreme file sizes
This commit is contained in:
parent
1f599ac6f9
commit
d42f8eac1e
@ -20,8 +20,8 @@ use std::default::Default;
|
|||||||
use rocksdb::{DB, Writable, WriteBatch, IteratorMode, DBVector, DBIterator,
|
use rocksdb::{DB, Writable, WriteBatch, IteratorMode, DBVector, DBIterator,
|
||||||
IndexType, Options, DBCompactionStyle, BlockBasedOptions, Direction};
|
IndexType, Options, DBCompactionStyle, BlockBasedOptions, Direction};
|
||||||
|
|
||||||
const DB_FILE_SIZE_BASE: u64 = 100 * 1024 * 1024;
|
const DB_FILE_SIZE_BASE: u64 = 10 * 1024 * 1024;
|
||||||
const DB_FILE_SIZE_MULTIPLIER: i32 = 10;
|
const DB_FILE_SIZE_MULTIPLIER: i32 = 5;
|
||||||
|
|
||||||
/// Write transaction. Batches a sequence of put/delete operations for efficiency.
|
/// Write transaction. Batches a sequence of put/delete operations for efficiency.
|
||||||
pub struct DBTransaction {
|
pub struct DBTransaction {
|
||||||
@ -67,7 +67,7 @@ impl DatabaseConfig {
|
|||||||
DatabaseConfig {
|
DatabaseConfig {
|
||||||
cache_size: Some(cache_size),
|
cache_size: Some(cache_size),
|
||||||
prefix_size: None,
|
prefix_size: None,
|
||||||
max_open_files: 256
|
max_open_files: -1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ impl Default for DatabaseConfig {
|
|||||||
DatabaseConfig {
|
DatabaseConfig {
|
||||||
cache_size: None,
|
cache_size: None,
|
||||||
prefix_size: None,
|
prefix_size: None,
|
||||||
max_open_files: 256
|
max_open_files: -1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user