Hey list,

Although this is about the preload daemon, my intended audience for this 
matter is the btrfs community. So I'm posting this here.

I've created a small script here[1] to read the preload daemon state file 
and use this to run the btrfs defragmenter/compressor on these files. The 
idea was to have some proof-of-concept to maybe integrate defragmentation 
capabilities directly into preload.

While I'd like to read some feedback from the community, maybe collect some 
more ideas, I already discovered one drawback which is a show-stopper: btrfs 
won't defragment files currently in use (probably memory-mapped files only 
but these are a lot while a desktop env is running). I didn't look into it 
any closer yet. And I didn't run benchmarks. But my first impressions are 
that preloading is a bit faster and less io-intensive.

Regards,
Kai

[1]: https://gist.github.com/kakra/5520200

Attachment: defrag-preloaded.rb
Description: application/ruby

Reply via email to