rqlite 8.17.0 & 8.18.0: Scheduled VACUUMs and Enhanced JSON Support

rqlite is a lightweight, easy-to-use, open-source, distributed relational database. It’s written in Go and uses SQLite as its storage engine.

rqlite has recently seen two significant upgrades with the release of versions 8.17.0 and 8.18.0. These releases introduce new features that enhance both performance and functionality.

Scheduled VACUUMs in rqlite 8.17.0

The 8.17.0 release adds the ability to perform scheduled VACUUMs of the underlying SQLite database. A VACUUM command in SQLite defragments the database file, shrinking it to its smallest possible size. This process can lead to improved query performance due to reduced file size and better data organization.

VACUUM performance was tested extensively under load. As expected VACUUM times do increase as the data set gets larger. In practice VACUUM should be run at a much less frequent rate than was done in this test run.

Users can set the -auto-vacuum-int command line flag to specify the interval for automatic VACUUM execution. For example, setting -auto-vacuum-int=14d will instruct rqlite to run a VACUUM every two weeks. This automated approach ensures that the database remains optimized without manual intervention. This can improve the overall efficiency and performance of rqlite in long-running deployments without repeated intervention by the user.

However, it is important to note that running VACUUM may temporarily double the disk usage of rqlite and block writes during its operation. Therefore, sufficient free disk space is necessary, and the frequency of VACUUM operations should be considered carefully.

Enhanced JSON Support in rqlite 8.18.0

Release 8.18.0 brings a substantial upgrade to rqlite data handling capabilities by integrating SQLite 3.45.0, which includes support for JSONB. JSONB is a binary encoding of JSON stored as a BLOB, offering performance advantages over traditional text-based JSON.

The primary benefits of JSONB are its reduced size and faster processing. According to the SQLite documentation “JSONB is 5% to 10% smaller than standard JSON and requires less than half the CPU cycles to process“. This improvement is particularly beneficial for applications that handle large volumes of JSON data, as it enables more efficient storage and quicker data manipulation.

The introduction of JSONB in rqlite enhances its suitability for modern web applications and services that frequently utilize JSON for data exchange. By supporting a more efficient JSON format, rqlite continues to evolve as a robust and versatile distributed database solution.

Next steps

With the release of rqlite versions 8.17.0 and 8.18.0, users can now benefit from both scheduled database optimization through VACUUM and enhanced JSON handling via JSONB support. I’m excited to see these enhancements roll out, while still keeping rqlite’s main goals in place: a high-quality, easy-to-use, and feature-rich distributed database solution.

So download the latest release and be sure to join the rqlite Slack channel.

Leave a Reply

Your email address will not be published. Required fields are marked *