Other FreeBSD file system cache'ing in RAM

Question: Does having more RAM reduce disk trashing when reading and writing at the same time?

Home file server with 30+TB of storage, Areca RAID6, UFS, Samba. 12.2.

Currently have 32GB RAM, upgrading to 64GB would be affordable.

Will probably use spinning disks for up to 5 more years, because bigger SSD-s are prohibitively expensive.
 
SSD disks have a limited write/read life, writing 5 times the total disk capacity daily for a year to destroy them, or something like that. The fuller the disk is, the new data will tend to be written to the same area every time, what will be a handicap for small disk sizes. I don't know about the life cycle of mechanical disks or RAM. Using tmpfs() will increase performance.
 
SSDs live longer than rotating hard disks. 2nd, workload on a typical SOHO file server is not write-intensive, so both device types should be usable for more than a decade. The significant difference between SSD & HDD is that the HDD will spit out SMART errors in an ever increasing manner before it dies, these can easily be monitored (e.g. sysutils/smartmontools). Thus you have a few weeks, maybe month, to replace the dieing device. In contrast, SSDs die suddenly & completely. Uh yes. You have to check their lifetime periodically, e.g. via periodic(8), and replace them before; how much security margin you want depends on various factors. smartctl --log=selftest /dev/ada0
Code:
[...]
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      9514         -
# 2  Short offline       Completed without error       00%      7568         -
# 3  Short offline       Completed without error       00%      7489         -
# 4  Extended offline    Completed without error       00%      6813         -
# 5  Short offline       Completed without error       00%      5794         -
# 6  Short offline       Completed without error       00%      5733         -
To tune the "smoothness" of your UFS, insert the I/O scheduler gsched(8) with my service script that you find in the thread "Useful scripts".
 
I think we can skip the debate about SSDs. They're not in question here, the OP already mentioned he's not going to replace his disks with SSDs. This is a home server situation, not an enterprise storage solution. It's just not worth having to spend 40K on SSDs to store your home movies.

Does having more RAM reduce disk trashing when reading and writing at the same time?
I don't think adding another 32GB is going to change things very much with this. I think you need to figure out what's causing the thrashing. It could be a disk that's on its last legs.

Home file server with 30+TB of storage
How full is it? If it's nearing it's capacity files being written are going to get more and more fragmented, which would result in the drive head having to move a lot more. Fragmentation could be the issue here. Certain brands/models are definitely more 'noisy' compared to others, that could also be a reason.

Besides running Samba, what else is the machine doing? How are the Samba shares being used (maybe you have a client that's constantly accessing things)?
 
Back
Top