The invention particularly relates to a log pre-writing method and
system based on RocksDB. According to the log pre-writing method and
system based on the RocksDB, a fixed number of threads bound with cores are started to accept, manage, execute and return a writing request of NVMe SSD equipment; partitioning, managing and optimizing the
hybrid storage device by using a self-made
file system; reading data of the high-speed NVMe SSD equipment by using the SPDK to realize pre-write log
recovery; a synchronization mechanism of the pre-write
file system is realized by using a sliding window
algorithm and / or a
bitmap algorithm and a busy waiting technology. According to the log pre-writing method and
system based on the RocksDB, the high storage performance of the NVMe SSD can be fully played, the
throughput speed of a
database is greatly increased, it can be guaranteed that all hardware devices can be fully utilized, the problem of the writing speed of the
database caused by the slow disk writing speed is avoided, the
recovery speed of the
database is increased, and the
recovery efficiency of the database is improved. And the reading and writing performance of the database is greatly improved.