The paper describes a way of doing CDP which drastically reduces the space requirements of a CDP system. CDP stands for Continuous Data Protection and can be thought of as a continuously checkpointing technology that allows data to be recovered to any point in time in the past, i.e., RPO (Recovery Point Objective) is arbitrarily small. CDP is usually implemented similar to log-structured file systems using a log of all changes which are "replayed" on a base image at the time of recovery. A basic issue with most CDP systems is space used by this log which is often prohibitive to CDP's adoption. This paper tries to address this problem.
Conventional compression algorithms don't do a good job at compressing CDP logs. This work is based on the premise that most changes to data write new data only to small portions, the rest is simply copied over. So XORing all appends to the log make them more amenable to compression as all trivial changes are converted to zeros by XOR priori to compression.
Main strengths of this work are:
- TRAP offers significant cost savings over traditional CDP (even with compression). In fact, in some cases it even compares favorably over traditional COW snapshots in space savings and hence offers a better RPO for the same amount of space used.
- TRAP offers choice between undo based recovery and redo based recovery. So depending on the recovery point, the faster one can be chosen.
- The foundation of the idea is pretty solid and likely to remain valid for a long time. Specifically, this work exploits a well known fact about data that "for some workloads, a large fraction of disk sectors to be written contain identical content to previously written sectors within or across volumes [14]".
- RTO is a function of RPO which limits the choices available to the user.
- A further fallout of the above problem is that when RPO is very large, RTO is very large too (hours as shown in section 5).
Discussion:
TRAP (TRAP-4 as described in this paper) requires additional storage for the base image apart from the parity log. So its space requirement would be worse than a COW based snapshotting/backup. Also, for a good RTO, the base image's storage should be at least as fast as that of the parity-log. However, TRAP does provide the "undo" option also in which case base-image is not strictly necessary which can offset this loss in space-efficiency with a few additional tricks.
One interesting observation is that as block size -> 0, COW based snapshotting/backup has the best space characteristics, and CDP,TRAP,etc. become equal in space characteristics. IOW, for large block sizes, TRAP has large sequences of zeros as not all parts of a block are written at once. So the compression algorithm should be really good in compressing in large sequences of zeros.
The fact that compressed-CDP uses more space than TRAP-compressed-CDP shows that traditional compression algorithms aren't optimal for compressing the CDP log. Typically, most compression algorithms aren't designed to compress duplication of large chunks of data. E.g., if 'X' is an already compressed piece of data, then compressing 'XX' will typically not result in any compression for most compression algorithms when |X| is large. IOW, compression algorithms cannot easily identify long patterns. XOR facilitates the optimal compression in this case.