Backup Costs with/without Compression

Here is a short calculation of Informix Backup costs with and without compression.
Informix backup can be compressed in different ways:
- ontape to disk (with ONCONFIG Parameters BACKUP_FILTER and RESTORE_FILTER)
- onbar to tape (with ONCONFIG Parameters BACKUP_FILTER and RESTORE_FILTER)
- onbar to tape (with TSM compression)
The compression size depends on the compression tool/algorithm and the data
(CHARs versus VARCHARS, BYTE, TEXT, BLOBs and so on).
Compression time (Backup Time) depends only on the compression tool/algorithm,
the number of CPUs the tool can use and the CPU frequency.
For the example calculation we assume, that the resulting (compressed) backup size
is between 25% and 45% and the monthly storage costs for the backup is about
0.15 USD per GByte per month (or 1.80 USD per GByte per year).
We also assume, that we need one full backup per instance per day (to shorten the
recovery time) and about 10 GByte logfiles to backup.
You can test your backup time and compression size with following commands:
$ time (ontape -s -L 0 -F -t STDIO | wc -c)
1443889152
(; ontape -s -L 0 -F -t STDIO | wc -c; )
14.25s user 1.43s system 79% cpu 19.604 total
$ time (ontape -s -L 0 -F -t STDIO | gzip -1c | wc -c)
266601916
(; ontape -s -L 0 -F -t STDIO | gzip -1c | wc -c; )
48.81s user 1.83s system 109% cpu 46.056 total
$ echo "scale=2; 266601916/(1443889152/100)" | bc
18.46
In this example the resulting backup size is 18.45% with compression, but backup time doubles.
So, lets try another compression tool (with parallel compression):
$ time (ontape -s -L 0 -F -t STDIO | pigz -1c -b 1024 | wc -c)
266990723
(; ontape -s -L 0 -F -t STDIO | pigz -1c -b 1024 | wc -c; )
66.02s user 7.07s system 281% cpu 25.931 total
Backup size is about the same as above, but compression time is reduced.
This is what we want (and need).
| DAYS BACKUP STORED | SIZE UNCOMPRESSED | SIZE 45% COMPRESSED | SIZE 25% COMPRESSED |
| 1 Day | 100 GB | 45 GB | 25 GB |
| 30 Days | 3 TB | 1.35 TB | 0.75 TB |
| 90 Days | 9 TB | 4.05 TB | 2.25 TB |
| DAYS BACKUP STORED | COST UNCOMPRESSED | COST 45% COMPRESSED | COST 25% COMPRESSED |
| 1 Day | 180 USD | 81 ( -99) USD | 45 ( -135) USD |
| 30 Days | 5400 USD | 2430 (-2970) USD | 1350 ( -4050) USD |
| 90 Days | 16200 USD | 7290 (-8910) USD | 4050 (-12150) USD |
100 Instances (90 GByte Data per full Backup + 10 GB Logical Logfiles per Day)
or
10 Instances (990 GB Data per full Backup + 10 GB Logical Logfiles per Day)
| DAYS BACKUP STORED | SIZE UNCOMPRESSED | SIZE 45% COMPRESSED | SIZE 25% COMPRESSED |
| 1 Day | 10 TB | 4.5 TB | 2.5 TB |
| 30 Days | 300 TB | 135 TB | 75 TB |
| 90 Days | 900 TB | 405 TB | 225 TB |
| DAYS BACKUP STORED | COST UNCOMPRESSED | COST 45% COMPRESSED | COST 25% COMPRESSED |
| 1 Day | 18000 USD | 8100 ( -9900) USD | 4500 ( -13500) USD |
| 30 Days | 540000 USD | 243000 (-297000) USD | 135000 ( -405000) USD |
| 90 Days | 1620000 USD | 729000 (-891000) USD | 405000 (-1215000) USD |













