|
| 1 | +version: 0.4 |
| 2 | +name: memtier_benchmark-1Kkeys-hash-listpack-500-fields-update-20-fields-with-1B-to-64B-values |
| 3 | +description: | |
| 4 | + Runs memtier_benchmark to measure update performance on large Redis hashes stored as |
| 5 | + listpacks. The dataset is preloaded with 1,000 keys (`test_hash:<id>`), each containing |
| 6 | + 500 field–value pairs, where values are small strings ranging from 1 to 64 bytes. |
| 7 | +
|
| 8 | + The benchmark focuses on multi-field `HSET` updates, where each operation updates 20 |
| 9 | + fields in the same hash. This workload stresses Redis's listpack encoding for hashes, |
| 10 | + particularly when performing batched updates inside already large hashes. |
| 11 | +
|
| 12 | + Since each key already contains 500 fields, the test highlights the cost of inserting |
| 13 | + into dense listpacks, memory reallocation behavior, and the effectiveness of Redis's |
| 14 | + multi-element insertion optimizations |
| 15 | +
|
| 16 | +dbconfig: |
| 17 | + configuration-parameters: |
| 18 | + save: '""' |
| 19 | + resources: |
| 20 | + requests: |
| 21 | + memory: 1g |
| 22 | + init_lua: | |
| 23 | + local total_keys = 1000 |
| 24 | + local total_fields = 500 |
| 25 | + local batch_size = 100 -- number of arguments per HSET call (field + value count) |
| 26 | + for k = 1, total_keys do |
| 27 | + local key = "test_hash:" .. k |
| 28 | + redis.call("DEL", key) |
| 29 | + local field_num = 1 |
| 30 | + while field_num <= total_fields do |
| 31 | + local args = {key} |
| 32 | + for j = 1, batch_size, 2 do |
| 33 | + if field_num > total_fields then break end |
| 34 | + table.insert(args, "f" .. field_num) |
| 35 | + table.insert(args, "v" .. field_num) |
| 36 | + field_num = field_num + 1 |
| 37 | + end |
| 38 | + redis.call("HSET", unpack(args)) |
| 39 | + end |
| 40 | + end |
| 41 | + return "OK" |
| 42 | +
|
| 43 | +
|
| 44 | +tested-groups: |
| 45 | +- hash |
| 46 | + |
| 47 | +tested-commands: |
| 48 | +- hset |
| 49 | + |
| 50 | +redis-topologies: |
| 51 | +- oss-standalone |
| 52 | + |
| 53 | +build-variants: |
| 54 | +- gcc:15.2.0-amd64-debian-bookworm-default |
| 55 | +- gcc:15.2.0-arm64-debian-bookworm-default |
| 56 | +- dockerhub |
| 57 | + |
| 58 | +clientconfig: |
| 59 | + run_image: redislabs/memtier_benchmark:edge |
| 60 | + tool: memtier_benchmark |
| 61 | + arguments: > |
| 62 | + --key-prefix "test_hash:" |
| 63 | + --key-minimum 1 |
| 64 | + --key-maximum 1000 |
| 65 | + --data-size-range=1-64 |
| 66 | + --pipeline=1 |
| 67 | + --test-time=120 |
| 68 | + --command='HSET __key__ HSET test_hash f1 __data__ f2 __data__ f3 __data__ f4 __data__ f5 __data__ f6 __data__ f7 __data__ f8 __data__ f9 __data__ f10 __data__ f11 __data__ f12 __data__ f13 __data__ f14 __data__ f15 __data__ f16 __data__ f17 __data__ f18 __data__ f19 __data__ f20 __data__' |
| 69 | + --hide-histogram |
| 70 | + resources: |
| 71 | + requests: |
| 72 | + cpus: '4' |
| 73 | + memory: 2g |
| 74 | + |
| 75 | +priority: 150 |
0 commit comments