Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

Mount Options with btrfs filesystems


Recommended Posts

Hi to All; i've 1 Funtoo partitions on a ssd and another in an HDD and using btrfs on both.

These options may be correct or there are some possible improvment or contain errors ?

 

Thank You :)

ci7ht ~ # grep btrfs /etc/fstab 
/dev/sda6               /               btrfs           noatime,compress=lzo,discard,ssd,space_cache,autodefrag 0 1
/dev/sdb2               /home           btrfs           noatime,compress=lzo,space_cache,autodefrag             1 2
Link to comment
Share on other sites

At first glance you have the right setup (it is not recommended to turn the inode cache on), I would definitely consider the I/O scheduler which is CFQ by default if you want to tweak for some extra performance gain. See /sys/block/sdX/queue/scheduler. Current one is in between brackets, you can change for one of the others listed by just echoing it in the same pseudo-file.

Link to comment
Share on other sites

I'm already using the CFQ scheduler which is the recommended by Helps in kernel-config. 

Other parameters are for my cpu (core2/newer xXeon) and Preemptible desktop. 

 

sandro@ci7ht ~ $ cat /sys/block/sd[ab]/queue/scheduler 
noop deadline [cfq] 
noop deadline [cfq] 

 

My doubt is related of "defragmentation".

 


My retailer of computers, me, tells that the disks ssd must not be defragmented. 

But this is true for Windows .... because he is not an expert on Linux (where I live boh .... I do not know how many people know and use Linux ....: () 

So I'd like to know if the autodefrag (for the SSD) is positive or negative option.


Do you think That is a good solution? 

 

I'm using gentoo-sources-3.15.2 at this time.

 

Do you think that there are better version for a desktop system (such as ck-sources)...... :rolleyes:

 

Thank you very mutch for the responses  :)

Link to comment
Share on other sites

Unix filesystems are quite robust against fragmentation but you can always mount your btrfs subvolumes with auto_defrag or periodically run btrfs filesystem defrag (by hand or via cron job). I don't defrag my subvolumes very often, the performance remains acceptable even with those good "slow" mechanical hard drives. If you use SSD I would be surprised if you could notice a huge difference.  

 

I/O performance is the consequence of several factors. A (heavily) fragmented filesystem: a sub-optimal I/O scheduler, a slow hard drive and so on and even the process scheduler. Unfortunately there is no magic formula but empiric tries-and-errors. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...