Documentation

Caching and Data Integrity Recommendations

Previous Topic

Next Topic

The Cache Stack

A typical server provides several "layers" of caching, which can be thought of as a "cache stack." Each layer of your cache stack has a different impact on performance and data integrity. The diagram below depicts the layers of caching that may be present on your system:
 


FairCom c-treeACE
 

 

Application Level Caching - c-treeACE provides its own caching integrated into the product so that flushing of the cache can be coordinated with recovery logs.


File System
 

 

File System Caching - The operating system typically provides caching. This cache can benefit performance but it places non-transaction controlled data at risk. It is vulnerable in the case of a hardware failure or power loss.


Disk Controller
 

 

Hardware Caching (level 1) - Some disk controllers include their own hardware caching. In case of failure, there is no guarantee that recovery will be possible.

HDD Caching

 

Hardware Caching (level 2) - Most modern hard disk drives have caching built in.

HDD Platter

 

Physical Medium - This is where the data is written to permanent storage.

 
A virtual machine will add at least one layer of caching.

The layers of caching provided by the file system and the disk controller do little to improve performance beyond FairCom's built-in caching. In some cases (e.g., with very large data sets), the file system cache is simply added overhead that may slow down the performance gains provided by c-treeACE caching. It is recommended that file system cache be shut off for critical data files (use the UNBUFFERED_IO keyword on Windows).

Caching provided by the disk controller is completely transparent to applications and the operating system. As such, the program is not able to know if the cache has been flushed of if data is waiting to be written to disk. This makes it impossible for the program to recover the data if a failure occurs while it is waiting in the disk controller's cache. For data integrity, disk controller cache should be disabled.

TOCIndex