# Non scientific database performance comparison between Freebsd and Linux



## Alain De Vos (Dec 17, 2020)

On the same hardware , SSD-Disks. On one side Freebsd with ZFS filesystem, and on the other side Arch-Linux with XFS filesystem.
Number of transactions per second comparison:
Tokyocabinet-DB was 50% faster on Linux
Redis-DB was as fast on Linux as on Freebsd
Mongo-DB was 20 % faster on Freebsd
Postgresql-DB was 30% faster on Freebsd
Sqlite-DB was 3X times faster on Freebsd

For FreeBSD on ZFS I had:
Tokyokabinet : 520.000 transactions/s
Redis: 22.700 transactions/s
MongoDB: 2000 transactions/s
PostgreSQL: 800 transactions/s
SQLite: 333 transactions/s


----------



## ralphbsz (Dec 17, 2020)

Running on top of file systems? With SSD or spinning disk? Wouldn't surprise me if the big difference is in the underlying storage layer.

A lot depends on how the database implements writing to disk, and how things are configured. For example, one database might update blocks (or pages) very quickly, and with sync writes. Another might first log changes in an on-disk (sequential append) log for minutes at a time, and then update the data pages in bulk and non-synchronous. So differences in implementation of write caching, random versus sequential, and how sync is done, can have outsize influence on database performance.


----------

