use of org.neo4j.configuration.pagecache.ConfigurableIOBufferFactory in project neo4j by neo4j.
the class BatchingNeoStores method createPageCache.
private static PageCache createPageCache(FileSystemAbstraction fileSystem, Config config, PageCacheTracer tracer, JobScheduler jobScheduler, MemoryTracker memoryTracker) {
SingleFilePageSwapperFactory swapperFactory = new SingleFilePageSwapperFactory(fileSystem);
MemoryAllocator memoryAllocator = createAllocator(ByteUnit.parse(config.get(pagecache_memory)), memoryTracker);
MuninnPageCache.Configuration configuration = MuninnPageCache.config(memoryAllocator).pageCacheTracer(tracer).memoryTracker(memoryTracker).bufferFactory(new ConfigurableIOBufferFactory(config, memoryTracker)).faultLockStriping(1 << 11).disableEvictionThread();
return new MuninnPageCache(swapperFactory, jobScheduler, configuration);
}
use of org.neo4j.configuration.pagecache.ConfigurableIOBufferFactory in project neo4j by neo4j.
the class ConfiguringPageCacheFactory method createPageCache.
protected PageCache createPageCache() {
long pageCacheMaxMemory = getPageCacheMaxMemory(config);
var memoryPool = memoryPools.pool(PAGE_CACHE, pageCacheMaxMemory, false, null);
var memoryTracker = memoryPool.getPoolMemoryTracker();
MemoryAllocator memoryAllocator = buildMemoryAllocator(pageCacheMaxMemory, memoryTracker);
var bufferFactory = new ConfigurableIOBufferFactory(config, memoryTracker);
MuninnPageCache.Configuration configuration = MuninnPageCache.config(memoryAllocator).memoryTracker(memoryTracker).bufferFactory(bufferFactory).preallocateStoreFiles(config.get(preallocate_store_files)).clock(clock).pageCacheTracer(pageCacheTracer);
return new MuninnPageCache(swapperFactory, scheduler, configuration);
}
use of org.neo4j.configuration.pagecache.ConfigurableIOBufferFactory in project neo4j by neo4j.
the class MuninnPageCacheTest method createFixture.
@Override
protected Fixture<MuninnPageCache> createFixture() {
ConfigurableIOBufferFactory bufferFactory = new ConfigurableIOBufferFactory(Config.defaults(pagecache_buffered_flush_enabled, true), new ScopedMemoryTracker(INSTANCE));
fixture = new MuninnPageCacheFixture();
fixture.withBufferFactory(bufferFactory);
return fixture;
}
Aggregations