Skip to content

Commit bb6a7f9

Browse files
Anil RuiaMsftBrettShirley
authored andcommitted
Lz4 compression
Lz4 compression uses 5x less cpu for compression and 9x less cpu for decompression compared to xpress while giving comparable compression rates Ran using blobs from mine/Andrew's mailboxes [Substrate:f7b9f9cd7fca1576861bf999e7226dd7a26567b2]
1 parent 398f42f commit bb6a7f9

12 files changed

Lines changed: 298 additions & 113 deletions

File tree

dev/ese/published/inc/jethdr.w

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ typedef void (JET_API *JET_SPCATCALLBACK)( _In_ const unsigned long pgno, _In_ c
665665
#define JET_efvRevertSnapshot 9360 // Added revert snapshot flush signature to database header and added lrtypExtentFreed, which logs details about the extent freed to allow for revert snapshot to capture the pages of the freed extent.
666666
#define JET_efvApplyRevertSnapshot 9380 // Added le_lgposCommitBeforeRevert to the database header which captures the last commit lgpos before revert was done and is used to ignore JET_errDbTimeTooOld errors on pasive copies.
667667
#define JET_efvExtentPageCountCache 9400 // Adds support for the ExtentPageCountCache table.
668+
#define JET_efvLz4Compression 9420 // Adds support for compressing/decompressing data using Lz4.
668669

669670
// Special format specifiers here
670671
#define JET_efvUseEngineDefault (0x40000001) // Instructs the engine to use the maximal default supported Engine Format Version. (default)
@@ -3949,6 +3950,7 @@ typedef enum
39493950
// end_PubEsent
39503951
#define JET_paramFlight_EnableReattachRaceBugFix 74 // Enable bug fix for race between dirty-cache-keep-alive database reattach and checkpoint update
39513952
// #define JET_paramSLVDefragFreeThreshold 74 // chunks whose free % is > this will be allocated from
3953+
#define JET_paramFlight_EnableLz4Compression 75 // Enable Lz4 compression
39523954
// #define JET_paramSLVDefragMoveThreshold 75 // chunks whose free % is > this will be relocated
39533955
#define JET_paramEnableSortedRetrieveColumns 76 // internally sort (in a dynamically allocated parallel array) JET_RETRIEVECOLUMN structures passed to JetRetrieveColumns()
39543956
// begin_PubEsent

dev/ese/src/_perfctrs/perfdata.txt

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,12 @@
141141
; 299 - 2020/04/17 - Remove Redundant replace counter.
142142
; 300 - 2010/05/01 - Add Xpress10 corsica compression related counters.
143143
; 301 - 2010/09/23 - Add Snapshot related counters.
144+
; 302 - 2011/03/26 - Remove Xpress9 counters.
144145

145146

146147
[ModuleInfo]
147148
MaxInstNameSize=64
148-
SchemaVersion=301
149+
SchemaVersion=302
149150
; we will subst later $PerformanceObjectName$ with either ESE or ESENT version
150151
PerformanceObjectName_ESE=MSExchange Database
151152
PerformanceObjectName_ESENT=Database
@@ -10273,46 +10274,6 @@ EvaluationFunction=LDecompressionCEFLPv
1027310274
009_Name=
1027410275
009_Help=
1027510276

10276-
[ICpuXpress9DecompressionBytesPerSec]
10277-
Type=Counter
10278-
Object=Instances
10279-
DetailLevel=PERF_DETAIL_DEVONLY | PERF_DETAIL_DEFAULT
10280-
DefaultScale=-5
10281-
CounterType=PERF_COUNTER_COUNTER
10282-
EvaluationFunction=LCpuXpress9DecompressionBytesCEFLPv
10283-
009_Name=Cpu Xpress9 Decompressed Bytes/sec
10284-
009_Help=Cpu Xpress9 Decompressed Bytes/sec is the number of bytes per second that were decompressed during DML operations using Xpress9 on the system cpu. [Dev Only]
10285-
10286-
[ICpuXpress9DecompressionOpsPerSec]
10287-
Type=Counter
10288-
Object=Instances
10289-
DetailLevel=PERF_DETAIL_DEVONLY | PERF_DETAIL_DEFAULT
10290-
DefaultScale=0
10291-
CounterType=PERF_COUNTER_COUNTER
10292-
EvaluationFunction=LCpuXpress9DecompressionCEFLPv
10293-
009_Name=Cpu Xpress9 Decompression Ops/sec
10294-
009_Help=Cpu Xpress9 Decompression Ops/sec is the number of decompression operations per second that were performed during DML operations using Xpress9 on the system cpu. [Dev Only]
10295-
10296-
[ICpuXpress9DecompressionAvgLatency]
10297-
Type=Counter
10298-
Object=Instances
10299-
DetailLevel=PERF_DETAIL_DEVONLY | PERF_DETAIL_DEFAULT
10300-
DefaultScale=0
10301-
CounterType=PERF_AVERAGE_BULK
10302-
EvaluationFunction=LCpuXpress9DecompressionLatencyCEFLPv
10303-
009_Name=Cpu Xpress9 Decompression average latency (us)
10304-
009_Help=Cpu Xpress9 Average latency per decompression operation in microseconds. [Dev Only]
10305-
10306-
[ICpuXpress9DecompressionBase]
10307-
Type=Counter
10308-
Object=Instances
10309-
DetailLevel=PERF_DETAIL_DEVONLY | PERF_DETAIL_DEFAULT
10310-
DefaultScale=0
10311-
CounterType=PERF_AVERAGE_BASE
10312-
EvaluationFunction=LCpuXpress9DecompressionCEFLPv
10313-
009_Name=
10314-
009_Help=
10315-
1031610277
[IXpress10SoftwareDecompressionBytesPerSec]
1031710278
Type=Counter
1031810279
Object=Instances

0 commit comments

Comments
 (0)