[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-bcache
Subject:    configure bcache for preventing IO to a HDD to save power / noise
From:       " " <Cedric.dewijs () eclipso ! eu>
Date:       2023-06-30 10:08:51
Message-ID: 1be1562c9792cf8c036e4c7485047fd3 () mail ! eclipso ! de
[Download RAW message or body]

 ­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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic