.NET:
configuration.ReserveStorageSpace(byteCount)
The allocation of a fixed number of bytes at one time makes it more likely that the database will be stored in one chunk on the mass storage. Less read/write head movement can result in improved performance.
ReserveStorageSpace setting reserves an additional space (byteCount) in a database file.
The functionality of this setting depends on the context:
Note: Allocated space will be lost on abnormal termination of the database engine (hardware crash, VM crash). A Defragment run will recover the lost space. For the best possible performance, this method should be called before the Defragment run to configure the allocation of storage space to be slightly greater than the anticipated database file size.
An alternative strategy can be to use MemoryIoAdapter:
.NET:
MemoryIoAdapter
adapter = new MemoryIoAdapter();
configuration.Io(adapter);
You can control the growth of the memory file by:
.NET:
adapter.GrowBy(100);
And you can control the size of the file on disk using RandomAccessFile API. For more information see MemoryIoAdapter.