|
@@ -1,31 +0,0 @@
|
|
|
-pr: 93371
|
|
|
-summary: "Encode using 40, 48 and 56 bits per value"
|
|
|
-area: TSDB
|
|
|
-type: feature
|
|
|
-issues: []
|
|
|
-highlight:
|
|
|
- title: "Encode using 40, 48 and 56 bits per value"
|
|
|
- body: |-
|
|
|
- We use the encoding as follows:
|
|
|
- * for values taking [33, 40] bits per value, encode using 40 bits per value
|
|
|
- * for values taking [41, 48] bits per value, encode using 48 bits per value
|
|
|
- * for values taking [49, 56] bits per value, encode using 56 bits per value
|
|
|
-
|
|
|
- This is an improvement over the encoding used by ForUtils which does not
|
|
|
- apply any compression for values taking more than 32 bits per value.
|
|
|
-
|
|
|
- Note that 40, 48 and 56 bits per value represent exact multiples of
|
|
|
- bytes (5, 6 and 7 bytes per value). As a result, we always write values
|
|
|
- using 3, 2 or 1 byte less than the 8 bytes required for a long value.
|
|
|
-
|
|
|
- Looking at the savings in stored bytes, for a block of 128 (long) values we
|
|
|
- would normally store 128 x 8 bytes = 1024 bytes, while now we have the following:
|
|
|
- * 40 bits per value: write 645 bytes instead of 1024, saving 379 bytes (37%)
|
|
|
- * 48 bits per value: write 772 bytes instead of 1024, saving 252 bytes (24%)
|
|
|
- * 56 bits per value: write 897 bytes instead of 1024, saving 127 bytes (12%)
|
|
|
-
|
|
|
- We also apply compression to gauge metrics under the assumption that
|
|
|
- compressing values taking more than 32 bits per value works well for
|
|
|
- floating point values, because of the way floating point values are
|
|
|
- represented (IEEE 754 format).
|
|
|
- notable: true
|