On 16.02.21 г. 10:54 ч., Pal, Laszlo wrote:
> Thank you all for the quick response. The server is running, but as I
> said the i/o perf. is not as good as it should be. I'm also thinking
> the fragmentation is the issue but I also would like to optimise my
> config and if possible keep this server running with acceptable
> performance, so let me answer the questions below
> 
> So, as far as I see the action plan is the following
> - enable v2 space_cache. is this safe/stable enough?
> - run defrag on old data, I suppose it will run weeks, but I'm ok with
> it if the server can run smoothly during this process
> - compress=zstd is the recommended mount option? is this performing
> better than the default?
> - I'm also thinking to -after defrag- compress my logs with
> traditional gzip compression and turn off on-the-fly compress (is this
> a huge performance gain?)
> 
> Any other suggestions?
> 
> Thank you
> Laszlo
> ---
> 
> uname -a
> 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64
> x86_64 x86_64 GNU/Linux

Ok, first of all this is a vendor kernel, most likely CentOS or
something like that. I have no idea what is the state of btrfs in this
kernel as such any statements that regarding stability of particular
feature are essentially invalid as I can only base my answers on
upstream kernels or on SUSE-derived kernels.

Given this my suggestion is for you to try and upgrade to a recent
upstream kernel. The latest is best, if you prefer stability you can try
some of the older (4.4/4.14/4.19/5.4) kernels. But you can expect btrfs
to have best performance with the latest stable which is 5.10.x at the
moment.



Bear in mind that btrfs is in active development so between 3.10 and the
current upstream - 5.10 there has been _a lot_ of changes whiich result
in better performance as well as fixed bugs.

> 
>   btrfs --version
>   btrfs-progs v4.9.1
> 

<snip>

> how much memory
> 48 GB RAM
> 
> type and model of hard disk
> virtualized Fujitsu RAID on esxi
> 
> is it raid
> yes, the underlying virtualization provides redundancy, no sw RAID
> 
> Kernel version
> 3.10.0-1160.6.1.el7.x86_64
> 
> your btrfs mount options probably in /etc/fstab
> UUID=7017204b-1582-4b4e-ad04-9e55212c7d46 /
> btrfs   defaults,noatime,autodefrag,subvol=root     0 0
> UUID=7017204b-1582-4b4e-ad04-9e55212c7d46 /var
> btrfs   defaults,subvol=var,noatime,autodefrag      0 0
> 
> size of log files
> 4,5TB on /var
> 
> have you snapshots
> no
> 
> have you tries tools like dedup remover
> not yet
> 
> things you do
> 
> 1. Kernel update LTS kernel has been updated to 5.10 (maybe you have
> to install it manually, because centos will be dropped -> reboot
> maybe you have to remove your mount point in fstab and boot into
> system and mount it later manually.
> Is this absolutely necessary?
> 
> 2. set mount options in fstab
>     defaults,autodefrag,space_cache=v2,compress=zstd (autodefrag only on HDD)
>     defaults,ssd,space_cache=v2,compress=zstd (for ssd)
> 
>   autodefrag is already enabled. v2 space_cache is safe enough?
> 
> 3. sudo btrfs scrub start /dev/sda (use your device)
>     watch sudo btrfs scrub status /dev/sda (watch and wait until finished)
> 
> 4. sudo btrfs device stats /dev/sda (your disk)
> 
> 5.install smartmontools
>    run sudo smartctl -x /dev/sda (use your disk)
>    check
> I think this is not applicable because this is a virtual disk,

<snip>

Reply via email to