Open Shished opened 2 years ago
Could you show your file /etc/bees//d252ef93-c68c-48a8-bc79-5a59b28ed648.conf
?
UUID=d252ef93-c68c-48a8-bc79-5a59b28ed648
WORK_DIR=/run/bees/
MNT_DIR="$WORK_DIR/mnt/$UUID"
BEESHOME="/disk/yuri/.beeshome-root"
BEESSTATUS="$WORK_DIR/$UUID.status"
OPTIONS="--strip-paths --no-timestamps --thread-count 12"
DB_SIZE=$((1024*1024*1024)) # 1G in bytes`
Okay, so you've put .beeshome
onto a different disk? In that case, you should edit your service instance to add another writable path:
systemctl edit beesd@d252ef93-c68c-48a8-bc79-5a59b28ed648.service
Insert this text:
[Service]
ReadWritePaths=/disk/yuri/.beeshome-root
@Zygo We should probably document this. I cannot currently think of a way to do this differently other than moving a configuration file to beeshome which configures which FS to work on (which could default to the FS that .beeshome is on), and then instantiating the systemd service from the beeshome path...
Maybe we should say that .beeshome
on a different FS is an unsupported configuration.
Thanks, this edit fixed the problem. I put beeshome on other disk because docs says "The hash table trickle-writes to disk at 4GB/hour to beeshash.dat" . That partition is located on SSD and I'm worried about its health. Also, docs says that
There are no special requirements for bees hash table storage--.beeshome could be stored on a different btrfs filesystem, ext4, or even CIFS.
Yep, it's a totally valid option but cannot be supported automatically with the locked down service - at least not without mangling some of the configuration logic.
SSD is a valid concern. Personally, I'm using bcache-backed btrfs (which stores hot data on SSD while the rest remains on set of HDDs), including a kernel patch which forces bcache-bypass for idle IO priority. Since bees runs with idle IO prio, it will thus bypass the SSD for writes.
4 GB per hour is 35TB per year, which takes decades to wear out a modern SSD [1] unless it's a very old or low-budget model. It should stop writing once the entire table has been flushed (though it doesn't take very much new data to force the whole table to be updated). I don't worry about the writes from the hash table on my SSDs--I worry a lot more about the btrfs metadata writes from dedupe, which can be much larger, especially with snapshots.
[1] 600 TB TBW at 200% utilization = 34 years
Well, mine says (running as a bcache cache dev):
Device Model: Samsung SSD 860 EVO 1TB
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 8937
177 Wear_Leveling_Count 0x0013 075 075 000 Pre-fail Always - 377
which would make it 8937 * 75 / (100 - 75) = 26811 hours = 3 years left before smartctl would consider the drive worn out. Usually, the drives last much longer than announced. But still that's the prediction from smartctl and thus the manufacturer. I'd expect the drive to at least slow down after this threshold is reached. Or is this calculation completely bogus?
The power on hours itself calculate down to around 50 years of operation left, tho. Not sure which value is more trustworthy.
8937 matches the ages of the drive in hours, it's about one year old.
The calculation tells you when the drive reaches the end of its TBW warranty (100% of endurance used, which is a complicated function of the lifetime of several different flash types on drives with SLC caches, and the size and number of writes).
When the drive hits 100% TBW, it could fail next month, next decade, or last summer. It is much like time-based warranties where the manufacturer guarantees only a few years, but a drive in good environmental conditions will often last many times longer.
A typical caching workload can generate far more than 4GB of writes per hour. I have machines running NVME caches that write 4GB every 3 minutes. They would run an 860 EVO to the end of its warranty in 8 months if the EVO didn't have crippling latency problems.
Another way to look at 4GB/hour is 0.1% of the drive's warranty per week.
They would run an 860 EVO to the end of its warranty in 8 months if the EVO didn't have crippling latency problems
OT: yep, I'm thinking about going back to Crucial again... I feel it had better latency although throughput was lower. But I probably prefer better latency. What drive would you recommend?
Samsung PRO models do the job, but they are the most expensive consumer drives for what they do (you can pay more, but those drives are specialized for video production or industrial applications).
Seagate Ironwolf SSD has consistent latency, huge TBW, and no firmware issues that I know of, and it's explicitly designed to be hammered by a cache driver all day. Nytro has more speed, but the engineering changes to get the slightly lower write latency cost almost 4x the drive write endurance. Either one has the TBW of at least 3 860 EVO's but slower writes than PRO (they won't saturate a SATA3 port).
WD Red SSD doesn't have the EVO's huge latency spikes, but about the same average performance and TBW. It's cheaper than the Seagates so it might be a better fit for lighter cache workloads.
Sabrent Rocket NVME devices are cheaper and perform within ~10% of the comparable Samsung models, but I've had multiple bus reset issues with one Sabrent and I've only been using them for a few weeks. I'll try to find some non-critical job for the devices I have so far to do, and not buy any more of the current models.
I still have Crucial MX and BX devices in service. They're slower (BX maybe too slow), but they work.
Everything cheaper in my fleet is dead now. The good ones chose a day to become a brick, the bad ones corrupted data for a few months first.
Systemd service fails to start because beesd thinks that beeshome is read only. When beesd is started dirctly from the terminal it works fine. Target partition is used for / and /home, beeshome subvolume is located on other HDD with btrfs.
Used bees version 0.7.r2.g84adbae installed from bees-git AUR on Arch Linux.