.setCreateIfMissing(true) .setCreateMissingColumnFamilies(true) .setIncreaseParallelism(rocksThreads) .setMaxBackgroundCompactions(rocksThreads) .setInfoLogLevel(InfoLogLevel.INFO_LEVEL);
options.setLevelCompactionDynamicLevelBytes(true); options.setMaxOpenFiles(settings.getMaxOpenFiles()); options.setIncreaseParallelism(settings.getMaxThreads());
@Override public void setConfig(final String storeName, final Options options, final Map<String, Object> configs) { // Workaround: We must ensure that the parallelism is set to >= 2. There seems to be a known // issue with RocksDB where explicitly setting the parallelism to 1 causes issues (even though // 1 seems to be RocksDB's default for this configuration). int compactionParallelism = Math.max(Runtime.getRuntime().availableProcessors(), 2); // Set number of compaction threads (but not flush threads). options.setIncreaseParallelism(compactionParallelism); } }
@Override public Options setIncreaseParallelism(final int totalThreads) { assert(isOwningHandle()); setIncreaseParallelism(nativeHandle_, totalThreads); return this; }
public synchronized RocksDBDataIndexTable getDataIndexTable( final String tableName, final short adapterId) { if (indexWriteOptions == null) { RocksDB.loadLibrary(); final int cores = Runtime.getRuntime().availableProcessors(); indexWriteOptions = new Options().setCreateIfMissing(true).prepareForBulkLoad().setIncreaseParallelism(cores); indexReadOptions = new Options().setIncreaseParallelism(cores); } final String directory = subDirectory + "/" + tableName; return dataIndexTableCache.get( (DataIndexCacheKey) keyCache.get(directory, d -> new DataIndexCacheKey(d, adapterId))); }
public synchronized RocksDBIndexTable getIndexTable( final String tableName, final short adapterId, final byte[] partition, final boolean requiresTimestamp) { if (indexWriteOptions == null) { RocksDB.loadLibrary(); final int cores = Runtime.getRuntime().availableProcessors(); indexWriteOptions = new Options().setCreateIfMissing(true).prepareForBulkLoad().setIncreaseParallelism(cores); indexReadOptions = new Options().setIncreaseParallelism(cores); } final String directory = subDirectory + "/" + tableName; return indexTableCache.get( (IndexCacheKey) keyCache.get( directory, d -> new IndexCacheKey(d, adapterId, partition, requiresTimestamp))); }
.setCompactionStyle(CompactionStyle.LEVEL) .setNumLevels(4) .setIncreaseParallelism(parallelism) .setCompactionReadaheadSize(compactionReadAheadSize) .setMaxBackgroundCompactions(maxBackgroundCompactions)
options.setIncreaseParallelism(Math.max(Runtime.getRuntime().availableProcessors(), 2));
options.setEnv(env); options.setAccessHintOnCompactionStart(AccessHint.WILLNEED); options.setIncreaseParallelism(32); options.setAdviseRandomOnOpen(true);
options.setMaxBackgroundCompactions(16); options.setMaxBackgroundFlushes(16); options.setIncreaseParallelism(32); options.setMaxTotalWalSize(512 * 1024 * 1024); options.setMaxOpenFiles(-1);