Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced a custom LevelDB impl with regions and better key format
This new impl (which is not loadable by vanilla) is targeted at very large worlds, which experience significant I/O performance issues due to a variety of issues described in #6580. Two main changes are made in RegionizedLevelDB: - First, multiple LevelDBs are used, which cover a fixed NxN segment of terrain, similar to Anvil in Java. However, there's no constraint on these region sizes. Several experimental sizes are supported by default in WorldProviderManager. - Second, bigEndianLong(morton2d(chunkX, chunkZ)) is used for chunk keys instead of littleEndianInt(chunkX).littleEndianInt(chunkZ). This new scheme has much better cache locality than Mojang's version, which reduces overlap and costly DB compactions. The following new provider options are available as a result of this change: - custom-leveldb-regions-32 - custom-leveldb-regions-64 - custom-leveldb-regions-128 - custom-leveldb-regions-256 Smaller sizes will likely be less space-efficient, but will also probably have better performance. Once a sweet spot is found, a default will be introduced. Note that the different variations of custom-leveldb-regions-* are not cross-compatible. Conversion between the different formats is necessary if you want to change formats.
- Loading branch information