Daniel Karling
Daniel Karling

Reputation: 231

How do you guarantee atomicity in transactions and consistency in a filesystem with agressive hard drive caching and reordering?

Todays hard drives are using more and more aggressive caching with reordering and are sometimes even completely ignoring cache flushes to boost performance values.

Is it possible to guarantee atomicity (transactions) and consistency in such cases? Are there any known methods for mitigating the cache issues?

I've read one paper regarding this subject where a solution called "Coerced Cache Eviction" was created to solve the problem for journaling file systems. This basically consisted of filling the cache with new writes causing the cache to be flushed. This is however not a practical solution for all cases since there are cases where a flush would take several seconds. More information was hard to come by.

Upvotes: 1

Views: 172

Answers (1)

Vijay C
Vijay C

Reputation: 1289

This is a very late reply, but I thought I would answer in case someone else is running into the same problem.

I'm one of the graduate students who worked on Coerced Cache Eviction (CCE). I would be happy to answer any questions you have. I agree that for drives with complicated caches, CCE could take a lot of time to flush the cache.

We've designed a new file system called the No-Order file system (NoFS) which avoids the problem by design. In this file-system you can have consistency even when the file system is run on top of disks which don't honor the flush command. You can read about it more here: http://pages.cs.wisc.edu/~vijayc/nofs.htm

Unfortunately, NoFS doesn't provide transactions currently. We're working on this problem right now at UW Madison.

Upvotes: 1

Related Questions