linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* configure bcache for preventing IO to a HDD to save power / noise
@ 2023-06-30 10:08  
  0 siblings, 0 replies; only message in thread
From:   @ 2023-06-30 10:08 UTC (permalink / raw)
  To: linux-bcache

­I have 4 HDD's, and 4 SSD's. Each HDD is cached by it's own SSD. The 4 HDD/SSD stacks are used to create a btrfs raid system as described here:
https://wiki.archlinux.org/title/Bcache#Situation:_3_hard_drives_and_3_read/write_cache_SSD's

I want the hard drives to stay idle, so they don't spin, don't consume power and be silent.

I would like to configure bcache like this:
1) Never write to the hard drive, unless there's (almost) no room on the SSD anymore.
2) Avoid reading from the HDD, so cache everything that has been read from the HDD.
3) When a cache miss occurs, wake up the HDD, and read from there. 
4) After a cache miss, write all the dirty data from the SSD to the HDD until there's no dirty data anymore.
5) When both reading and writing data to the HDD, prioritize reading.

i've tried these settings to avoid write access to the HDD:
echo 0 >  /sys/fs/bcache/<uuid>/congested_read_threshold_us 
echo 0 >  /sys/fs/bcache/<uuid>/congested_write_threshold_us 
echo writeback > /sys/block/bcache3/bcache/cache_mode
echo 0 >  /sys/block/bcache0/bcache/sequential_cutoff 
With the above settings, all the writes first go to the SSD's, but then they are almost immediately flushed into the HDD.

echo 90 > /sys/block/bcache0/bcache/writeback_percent
With this setting I hoped the writes to the HDD would stop until the SSD was almost full. This percentage is clipped to 40%, so most of the SSD can't be used as a write cache. Also there were still writes into the HDD:
# cat /sys/block/bcache0/bcache/writeback_percent
40

With this setting I don't see writes to the HDD anymore: What happens when the amount of dirty data is over 40% while the delay has not yet expired?
echo 100000 > /sys/block/bcache0/bcache/writeback_delay

How can I configure bcache so the HDD's are idle for as long as possible?


________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail & Cloud. https://www.eclipso.eu



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-30 10:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30 10:08 configure bcache for preventing IO to a HDD to save power / noise  

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).