public interface MutableDBOptionsInterface<T extends MutableDBOptionsInterface>
Modifier and Type | Method and Description |
---|---|
boolean |
avoidFlushDuringShutdown()
By default RocksDB will flush all memtables on DB close if there are
unpersisted data (i.e.
|
int |
baseBackgroundCompactions()
Suggested number of concurrent background compaction jobs, submitted to
the default LOW priority thread pool.
|
long |
bytesPerSync()
Allows OS to incrementally sync files to disk while they are being
written, asynchronously, in the background.
|
long |
compactionReadaheadSize()
If non-zero, we perform bigger reads when doing compaction.
|
long |
delayedWriteRate()
The limited write rate to DB if
ColumnFamilyOptions.softPendingCompactionBytesLimit() or
ColumnFamilyOptions.level0SlowdownWritesTrigger() is triggered,
or we are writing to the last mem table allowed and we allow more than 3
mem tables. |
long |
deleteObsoleteFilesPeriodMicros()
The periodicity when obsolete files get deleted.
|
int |
maxBackgroundCompactions()
Deprecated.
|
int |
maxBackgroundJobs()
Returns the maximum number of concurrent background jobs (both flushes
and compactions combined).
|
int |
maxOpenFiles()
Number of open files that can be used by the DB.
|
long |
maxTotalWalSize()
Returns the max total wal size.
|
T |
setAvoidFlushDuringShutdown(boolean avoidFlushDuringShutdown)
By default RocksDB will flush all memtables on DB close if there are
unpersisted data (i.e.
|
void |
setBaseBackgroundCompactions(int baseBackgroundCompactions)
Deprecated.
|
T |
setBytesPerSync(long bytesPerSync)
Allows OS to incrementally sync files to disk while they are being
written, asynchronously, in the background.
|
T |
setCompactionReadaheadSize(long compactionReadaheadSize)
If non-zero, we perform bigger reads when doing compaction.
|
T |
setDelayedWriteRate(long delayedWriteRate)
The limited write rate to DB if
ColumnFamilyOptions.softPendingCompactionBytesLimit() or
ColumnFamilyOptions.level0SlowdownWritesTrigger() is triggered,
or we are writing to the last mem table allowed and we allow more than 3
mem tables. |
T |
setDeleteObsoleteFilesPeriodMicros(long micros)
The periodicity when obsolete files get deleted.
|
T |
setMaxBackgroundCompactions(int maxBackgroundCompactions)
Specifies the maximum number of concurrent background compaction jobs,
submitted to the default LOW priority thread pool.
|
T |
setMaxBackgroundJobs(int maxBackgroundJobs)
Specifies the maximum number of concurrent background jobs (both flushes
and compactions combined).
|
T |
setMaxOpenFiles(int maxOpenFiles)
Number of open files that can be used by the DB.
|
T |
setMaxTotalWalSize(long maxTotalWalSize)
Once write-ahead logs exceed this size, we will start forcing the
flush of column families whose memtables are backed by the oldest live
WAL file (i.e.
|
T |
setStatsDumpPeriodSec(int statsDumpPeriodSec)
if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
Default: 600 (10 minutes)
|
T |
setWalBytesPerSync(long walBytesPerSync)
Same as
setBytesPerSync(long) , but applies to WAL files
Default: 0, turned off |
T |
setWritableFileMaxBufferSize(long writableFileMaxBufferSize)
This is the maximum buffer size that is used by WritableFileWriter.
|
int |
statsDumpPeriodSec()
If not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
Default: 600 (10 minutes)
|
long |
walBytesPerSync()
Same as
bytesPerSync() , but applies to WAL files
Default: 0, turned off |
long |
writableFileMaxBufferSize()
This is the maximum buffer size that is used by WritableFileWriter.
|
T setMaxBackgroundJobs(int maxBackgroundJobs)
maxBackgroundJobs
- number of max concurrent background jobsint maxBackgroundJobs()
@Deprecated void setBaseBackgroundCompactions(int baseBackgroundCompactions)
setMaxBackgroundJobs(int)
baseBackgroundCompactions
- Suggested number of background compaction
jobsint baseBackgroundCompactions()
T setMaxBackgroundCompactions(int maxBackgroundCompactions)
maxBackgroundCompactions
- the maximum number of background
compaction jobs.Env.setBackgroundThreads(int)
,
Env.setBackgroundThreads(int, Priority)
,
DBOptionsInterface.maxBackgroundFlushes()
@Deprecated int maxBackgroundCompactions()
setMaxBackgroundJobs(int)
Env.setBackgroundThreads(int)
,
Env.setBackgroundThreads(int, Priority)
T setAvoidFlushDuringShutdown(boolean avoidFlushDuringShutdown)
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
API.avoidFlushDuringShutdown
- true if we should avoid flush during
shutdownboolean avoidFlushDuringShutdown()
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
API.T setWritableFileMaxBufferSize(long writableFileMaxBufferSize)
writableFileMaxBufferSize
- the maximum buffer sizelong writableFileMaxBufferSize()
T setDelayedWriteRate(long delayedWriteRate)
ColumnFamilyOptions.softPendingCompactionBytesLimit()
or
ColumnFamilyOptions.level0SlowdownWritesTrigger()
is triggered,
or we are writing to the last mem table allowed and we allow more than 3
mem tables. It is calculated using size of user write requests before
compression. RocksDB may decide to slow down more if the compaction still
gets behind further.
Unit: bytes per second.
Default: 16MB/sdelayedWriteRate
- the rate in bytes per secondlong delayedWriteRate()
ColumnFamilyOptions.softPendingCompactionBytesLimit()
or
ColumnFamilyOptions.level0SlowdownWritesTrigger()
is triggered,
or we are writing to the last mem table allowed and we allow more than 3
mem tables. It is calculated using size of user write requests before
compression. RocksDB may decide to slow down more if the compaction still
gets behind further.
Unit: bytes per second.
Default: 16MB/sT setMaxTotalWalSize(long maxTotalWalSize)
Once write-ahead logs exceed this size, we will start forcing the flush of column families whose memtables are backed by the oldest live WAL file (i.e. the ones that are causing all the space amplification).
If set to 0 (default), we will dynamically choose the WAL size limit to be [sum of all write_buffer_size * max_write_buffer_number] * 2
This option takes effect only when there are more than one column family as otherwise the wal size is dictated by the write_buffer_size.
Default: 0
maxTotalWalSize
- max total wal size.long maxTotalWalSize()
Returns the max total wal size. Once write-ahead logs exceed this size, we will start forcing the flush of column families whose memtables are backed by the oldest live WAL file (i.e. the ones that are causing all the space amplification).
If set to 0 (default), we will dynamically choose the WAL size limit to be [sum of all write_buffer_size * max_write_buffer_number] * 2
T setDeleteObsoleteFilesPeriodMicros(long micros)
micros
- the time interval in microslong deleteObsoleteFilesPeriodMicros()
T setStatsDumpPeriodSec(int statsDumpPeriodSec)
statsDumpPeriodSec
- time interval in seconds.int statsDumpPeriodSec()
T setMaxOpenFiles(int maxOpenFiles)
target_file_size_base
and target_file_size_multiplier
for level-based compaction. For universal-style compaction, you can usually
set it to -1.
Default: 5000maxOpenFiles
- the maximum number of open files.int maxOpenFiles()
target_file_size_base
and target_file_size_multiplier
for level-based compaction. For universal-style compaction, you can usually
set it to -1.T setBytesPerSync(long bytesPerSync)
bytesPerSync
- size in byteslong bytesPerSync()
T setWalBytesPerSync(long walBytesPerSync)
setBytesPerSync(long)
, but applies to WAL files
Default: 0, turned offwalBytesPerSync
- size in byteslong walBytesPerSync()
bytesPerSync()
, but applies to WAL files
Default: 0, turned offT setCompactionReadaheadSize(long compactionReadaheadSize)
DBOptionsInterface.newTableReaderForCompactionInputs()
to true.
Default: 0compactionReadaheadSize
- The compaction read-ahead sizelong compactionReadaheadSize()
DBOptionsInterface.newTableReaderForCompactionInputs()
to true.
Default: 0