Skip to content

fix: rewrite memory benchmark bulk loading and mode handling#158

Merged
kacy merged 1 commit intomainfrom
fix/bench-memory-rewrite
Feb 16, 2026
Merged

fix: rewrite memory benchmark bulk loading and mode handling#158
kacy merged 1 commit intomainfrom
fix/bench-memory-rewrite

Conversation

@kacy
Copy link
Owner

@kacy kacy commented Feb 16, 2026

summary

fixes three issues discovered during GCP c2-standard-8 testing:

  1. redis-cli --pipe doesn't work with ember — commands are silently dropped and no data is loaded. switched to a python bulk loader using redis-py pipelining (batches of 1000), which works reliably with both ember and redis.

  2. hash/sorted set not supported in concurrent mode — ember returns ERR command not supported in concurrent mode for HSET/ZADD. the script now only tests sharded mode for these types, showing "—" for concurrent.

  3. sorted set per-key metric was meaningless — all ZADD members go into one key (myzset), so DBSIZE=1 and used_memory / 1 gives the entire sorted set size as "bytes per key". now divides by member count to report per-member overhead.

what was tested

  • verified on GCP VM that:
    • python bulk loader correctly inserts 100 hash keys and 100 sorted set members
    • used_memory changes are tracked and non-zero after loading
    • string benchmark (redis-benchmark) still works unchanged
    • sorted set per-member calculation gives reasonable values

three issues discovered during GCP testing:

1. redis-cli --pipe doesn't work with ember — silently drops commands.
   switched to a python bulk loader using redis-py pipelining.

2. hash and sorted set commands only work in sharded mode, not concurrent.
   skip concurrent mode for those types instead of reporting 0.

3. sorted set adds all members to one key (DBSIZE=1), making per-key
   division meaningless. divide by member count instead.
@kacy kacy merged commit 0e4828e into main Feb 16, 2026
7 checks passed
@kacy kacy deleted the fix/bench-memory-rewrite branch February 16, 2026 03:30
kacy added a commit that referenced this pull request Feb 19, 2026
three issues discovered during GCP testing:

1. redis-cli --pipe doesn't work with ember — silently drops commands.
   switched to a python bulk loader using redis-py pipelining.

2. hash and sorted set commands only work in sharded mode, not concurrent.
   skip concurrent mode for those types instead of reporting 0.

3. sorted set adds all members to one key (DBSIZE=1), making per-key
   division meaningless. divide by member count instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant