Revision a307fb6...

Go back to digest for 1st June 2014

Optimization in KDE-PIM

Dan Vratil committed changes in [akonadi] /src:

Disable filesystem Copy-On-Write on database files when running on Btrfs

Btrfs documentation recommends disabling Copy-on-Write for databases (or any
large files with small random writes in general) in order to improve performance.

This patch adds a code to detect what filesystem ~/.local/share/akonadi/ is
stored on, and if Btrfs is detected, it will disable COW on this directory (or
on the akonadi.db file in case of SQLite) using an ioctl call.

When CoW is disabled on non-empty directory, only newly created files will be
affected. In case of non-empty files, it's not defined when it will take effect.
For this reason the code is only executed before initializing a new database,
which means that only new users will be affected.

Obviously this feature only works on Linux and the code is disabled on any other

File Changes

Modified 5 files
  • /src
  •   server/utils.cpp
  •   server/utils.h
  •   server/storage/dbconfigmysql.cpp
  •   server/storage/dbconfigpostgresql.cpp
  •   server/storage/dbconfigsqlite.cpp
5 files changed in total