Other Understand disk write cache in FreeBSD

Hi

I run a distributed file system data servers on FreeBSD. That is, data saved on machines running FreeBSD.

It's clients use different file systems on different operating systems and communicate over a LAN.

Some critical applications on some clients, explicitly request FreeBSD to send write acknowledge to them **only** after actually writing data to hard disk to make sure data sent are not lost if a power failure happens on FreeBSD machines and they wait till the Ack comes before send further data.

My understanding is to make sure the FreeBSD machines to give such a guarantee, that I should disable the write cache on disks. My questions is, am I wrong?

1. Following post made me bit confused. Please see Alexander Motin's explanation: https://freebsd-scsi.freebsd.narkive.com/X4y0IEqh/how-to-disable-hard-disk-write-cache

I don't use battery backed up disk controllers. Is write cache enable on disks now safe for data resiliency?


2. When I disable write cache on disks, does it make the read cache on disks disable too? I used smartctl to disable write cache. The performance is quite low. Each disk has 64MB cache (on disk).

3. I don't see a way to see in FreeBSD how much RAM is allocated for disk read cache at OS-level. Can I allocate a certain amount of system RAM as the disk read cache (eg. 1GB) to improve the performance, possibly at disk driver-level? I use SATA disks.

4. Does the FreeBSD ADA(4) support cache policy (write-back, write-through, etc) at driver-level?

Appreciate very much for some explanation on this and also some hints on improving the disk performance.

Best regards
Sagara
 
Back
Top