Sample Header Ad - 728x90

Bcache is not being utilized, slow raid/transfer rates

0 votes
1 answer
536 views
I have a 512 GB SSD serving as a cache for a 42 TB RAID using Bcache on Ubuntu Server. To test its performance, I transferred a game containing both large and small files. When transferring files to the server, I noticed that the speed is capped at 70 MB/s, and it appears to be writing directly to the hard drive array. When I transferring files from the server to my PC, the speed occasionally reaches 200 MB/s but frequently drops. I am utilizing the NFS-Kernel-Server service for the file transfers.
/sys/fs/bcache/UUID/cache0/priority_stats shows the cache as not being used at all:
Unused:         99%
Clean:          0%
Dirty:          0%
Metadata:       0%
Average:        0
Sectors per Q:  258144
Quantiles:      [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2 2]

LSblk shows that all the hard drives and ssds are set up as the bcache:

sda                         8:0    0  14.6T  0 disk
└─md0                       9:0    0  43.7T  0 raid0
  └─bcache0               252:0    0  43.7T  0 disk  /export/raid
                                                     /mnt/raid
sdb                         8:16   0  14.6T  0 disk
└─md0                       9:0    0  43.7T  0 raid0
  └─bcache0               252:0    0  43.7T  0 disk  /export/raid
                                                     /mnt/raid
sdc                         8:32   0  14.6T  0 disk
└─md0                       9:0    0  43.7T  0 raid0
  └─bcache0               252:0    0  43.7T  0 disk  /export/raid
                                                     /mnt/raid
nvme1n1                   259:0    0 465.8G  0 disk
└─bcache0                 252:0    0  43.7T  0 disk  /export/raid
                                                     /mnt/raid
Webmin indicates that the CPU usage is approximately 30% during transfers, indicating that the speed is being limited by the hard drive. I discovered that running the command tail /sys/block/bcache0/bcache/stats_total/* displays the statistics for this particular drive.
sudo tail /sys/block/bcache0/bcache/stats_total/*

==> /sys/block/bcache0/bcache/stats_total/bypassed  /sys/block/bcache0/bcache/stats_total/cache_bypass_hits  /sys/block/bcache0/bcache/stats_total/cache_bypass_misses  /sys/block/bcache0/bcache/stats_total/cache_hit_ratio  /sys/block/bcache0/bcache/stats_total/cache_hits  /sys/block/bcache0/bcache/stats_total/cache_miss_collisions  /sys/block/bcache0/bcache/stats_total/cache_misses <==
1068
I have followed this guide: https://www.kernel.org/doc/html/latest/admin-guide/bcache.html . I have configured the RAID with the backing drive and the SSD as the cache. I have successfully registered the SSD as the cache for the RAID and enabled writeback mode. I'm noticing that the cache drive is not being utilized. Are there any additional settings that I need to enable or are there other ways I can test the functionality of this cache drive? I am setting up this system for my wife's research, and I want her to be able to work off the server as a network drive. I want the cache to function properly so she can experience decent speeds while working on it.
Asked by PleasantTiming (11 rep)
Jun 28, 2023, 06:44 PM
Last activity: Jul 7, 2023, 12:16 PM