You are not logged in.
Hello!
Everywhere I read that there are performance issues with databases and virtual machine files on Btrfs.
I understand that I have to disable copy on wirite for these directories and recreate the files within (cause only new files are affected).
My question is: If the autodefragmentation is a problem for database files how then to turn off the defragmentation for only these directories?
Or is this an unnecessary measure if they have the nodatacow flag set already?
Any thoughts?
thx for reading,
piedro
Last edited by piedro (2013-12-22 16:58:38)
Offline
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Thx! I know this about COW but I am wondering whether I have to disable autodefragmentation in addtion to setting nodatacow...
p.
Offline
Sorry, didn't read your post carefully. I no have idea
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Isn't autodefrag still optional? This btrfs wiki article implies it and this line
printk(KERN_INFO "btrfs: enabling auto defrag\n");
from fs/btrfs/super.c seems to back this up.
In case all of the above is true, simple don't mount with the autodefrag option.
It doesn't seem as if you could turn this off and on for single files/directories though, so only per filesytem (or subvolume?).
i'm sorry for my poor english wirting skills…
Offline
Thx. Yes autodefrag is optional. Though I found autodefrag really to speed up things for me a lot. (Maybe to the level it was at installation.
So I'd rather leave it on.
The second part of your comment is exactly what I am trying to accomplish. I want to disable autodefrag selectively for chosen directories or subvolumes (I can always turn a directory into a subvolume so that's the same for this matter ...).
p.
Offline
Unfortunately there is no support for per-subvolume mount options yet. And unlike COW, autodefrag can only be turned on at the FS level. But for small databases and large VM images turning off COW should make the fragmentation issue ignorable and autodefrag should behave acceptable (it does here on my home server). On a large corporate DB server or VM storage server you wouldn't be using BTRFS anyway.
Last edited by teekay (2013-12-22 11:40:16)
Offline
Hello teekay!
Thank you very much! I will give it a try. That was my hope, that there's someone out there who already tried ... I'll report back if I run into problems ..
To have subvolume based mount options seems to me would be a very appreciated feature that would add so much tuneability for admins ... let's hope for it!
nice holidays,
p.
Offline
btw: how to mark this as "solved"? ;p
Offline
Edit your first post which will also give you access to the title.
Offline