cojen / TuplDB

TuplDB is a high-performance, concurrent, transactional, scalable, low-level embedded database.
GNU Affero General Public License v3.0
110 stars 22 forks source link

Speed up snapshots #106

Closed broneill closed 3 years ago

broneill commented 5 years ago

The underlying database file is opened with random access mode, and so no prefetching is performed when reading it in sequential order. A database snapshot reads the file sequentially, but it doesn't perform as well as it should because of this. Speed up the snapshot by enabling prefetching, or else launch several threads to read the file.

broneill commented 4 years ago

Can probably be implemented more easily with a batch read API in the PageArray interface. At the FileIO layer, this translates to single calls with a larger data buffer.