Aitozi commented on PR #7877:
URL: https://github.com/apache/paimon/pull/7877#issuecomment-4469405541

   Benchmark command:
   
   ```bash
   mvn -s ~/.m2/apache-community.xml -pl paimon-format -am -Pfast-build \
     -DfailIfNoTests=false -Dtest=MapShreddingStorageBenchmark test
   ```
   
   Benchmark file: [MapShreddingStorageBenchmark.java]
   
   **Common Setup**
   - Schema: `id INT, headers MAP<STRING, STRING>`
   - Rows: `100,000`
   - Hot keys: `32`
   - Value length: `16`
   - Compression: `snappy`
   - Compared layouts:
     - regular: normal Parquet map encoding
     - mapShredding: promotes 32 hot keys from `headers` into sidecar columns
   - Map shredding options:
     - `map.shredding.columns=headers`
     - `map.shredding.maxKeys=32`
     - `map.shredding.maxInferBufferRow=10000`
     - `map.shredding.maxInferBufferMemory=64 mb`
   
   **Results**
   
   | Scenario | Regular | Map Shredding | Saved | Saving |
   |---|---:|---:|---:|---:|
   | Columnar value storage | 708,012 bytes | 431,637 bytes | 276,375 bytes | 
39.04% |
   | Long hot key storage | 40,845,943 bytes | 16,365,106 bytes | 24,480,837 
bytes | 59.93% |
   
   **Scenario Details**
   - **Columnar value storage**: key names are short, values follow a repeated 
pattern with `valueRunLength=128` and `valueCardinality=4`, dictionary encoding 
enabled. This measures whether promoted hot-key values benefit from columnar 
and dictionary encoding.
   - **Long hot key storage**: hot key names include `128` bytes of padding, 
dictionary encoding disabled. This measures the benefit of avoiding repeated 
long map-key strings in every row.
   
   Conclusion: in this synthetic storage benchmark, map shredding reduces file 
size in both cases. The biggest gain appears when hot map keys are long and 
repeated across many rows, saving about `59.93%`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to