Running XWiki over BTRFS

Hi everyone,

I’m using a btrfs filesystem on my computer, and when starting the xwiki-platform-distribution-flavor-jetty-hsqldb packaged instance, I notice a significant amount of writes to the disk. (which can wear out SSDs)

It seems like these writes are made to the database. And from recommendations I saw related to other databases like mariadb, I disabled copy-on-write for the directory before unpacking the zip file.

If the database (in /var/lib/mysql) resides on a Btrfs file system, you should consider disabling Copy-on-Write for the directory before creating any database.

And that indeed significantly reduced the amount of writes to the disk when starting or using the XWiki instance.

I don’t know how many XWiki users are running an instance over btrfs, but I think it would be nice to either have:

  • A warning somewhere in the documentation to make people aware that they should disable copy-on-write for XWiki if using btrfs or use another filesystem if they care about performance/wear
  • The extended attribute C (capital C, c.f. man chattr) set in the packaged archive. Although ZIP doesn’t support extended attributes so that would also mean switching to another archiving format

WDYT?

Thanks.

1 Like

I think it’s ok to provide the information somewhere in the documentation about that, but I wouldn’t perform a change for that in the code. IMO btrfs is still a bit confidential: AFAIR not so long ago, archlinux documentation was still flagging it as not entirely stable. At the very least, for now I don’t think we need something specific for it in the code.