@@ -299,7 +299,8 @@ func New(file string, cache int, handles int, namespace string, readonly bool) (
299299 // buffers are taken from this too. Assign all available
300300 // memory allowance for cache.
301301 Cache : pebble .NewCache (int64 (cache * 1024 * 1024 )),
302- MaxOpenFiles : handles ,
302+ MaxOpenFiles : handles ,
303+ BytesPerSync : 1 * 1024 * 1024 , // G: was 512 KB implicit default — fewer, larger syncs during compaction
303304
304305 // The size of memory table(as well as the write buffer).
305306 // Note, there may have more than two memory tables in the system.
@@ -319,13 +320,13 @@ func New(file string, cache int, handles int, namespace string, readonly bool) (
319320 // Per-level options. Options for at least one level must be specified. The
320321 // options for the last level are used for all subsequent levels.
321322 Levels : []pebble.LevelOptions {
322- {TargetFileSize : 2 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
323- {TargetFileSize : 4 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
324- {TargetFileSize : 8 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
325- {TargetFileSize : 16 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
326- {TargetFileSize : 32 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
327- {TargetFileSize : 64 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
328- {TargetFileSize : 128 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )},
323+ {TargetFileSize : 2 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 ), Compression : pebble . NoCompression }, // E: no compression on hot data
324+ {TargetFileSize : 4 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 ), Compression : pebble . NoCompression }, // E: no compression on hot data
325+ {TargetFileSize : 8 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )}, // Snappy (default)
326+ {TargetFileSize : 16 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 )}, // Snappy (default)
327+ {TargetFileSize : 32 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 ), BlockSize : 32 * 1024 }, // F: larger blocks for deep levels
328+ {TargetFileSize : 64 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 ), BlockSize : 32 * 1024 , Compression : pebble . ZstdCompression }, // E+F: Zstd on cold data, larger blocks
329+ {TargetFileSize : 128 * 1024 * 1024 , FilterPolicy : bloom .FilterPolicy (10 ), BlockSize : 32 * 1024 , Compression : pebble . ZstdCompression }, // E+F: Zstd on cold data, larger blocks
329330 },
330331 ReadOnly : readonly ,
331332 EventListener : & pebble.EventListener {
0 commit comments