Tuesday, December 1, 2015

linux - Is data=journal on a separate device on Ext4 as good as using a RAID controller with battery backed cache for file system consistency?



It seems to me that data=journal prevents file system inconsistency in the case of power failure. Using it with a dedicated journal device mitigates the performance penalty of writing the data twice. A power outage would still lose the data that is currently being written to the journal, but the file system on disk would always be consistent.




If that amount of loss is acceptable, is a RAID controller with battery backed cache really worthwhile?


Answer



A battery backed cache does more than just keep your filesystem consistent in the event of a power-failure. The cache itself actually performs read caching, and to some extent write-caching (mostly just re-ordering the writes for better write performance). Having a cache on your RAID controller can be a significant speedup for performance. Having a persistent cache of some kind (be it battery-backed, or the newer flash-backed caches) just makes sure that uncommitted writes don't get lost when things go kablooie.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...