Skip to content

Add benchmark coverage for blocking commands (BLPOP / BRPOP / BLMOVE / BLMPOP / BZPOPMIN / BZMPOP) #402

Description

@fcostaoliveira

While auditing the spec test-suites I noticed there's no benchmark exercising the blocked → unblocked client path. None of the 380 memtier_benchmark-*.yml files use BLPOP, BRPOP, BLMOVE, BLMPOP, BZPOPMIN, BZMPOP, or BLOCK on XREAD/XREADGROUP, so regressions in blocked.c (blockForKeys, processUnblockedClients, unblockClient, serveClientBlockedOnList) go undetected by CE Performance.

This is performance-sensitive because:

  • Blocking clients live on the per-key blocked-on-keys index; unblock latency directly drives p99 for pub-sub-like workflows on lists and streams (work queues, fan-out notifications).
  • processUnblockedClients is iterated in beforeSleep() every event-loop tick — bookkeeping cost there scales with the unblocked queue length.
  • signalKeyAsReady / handleClientsBlockedOnKeys walk the ready-key list and pop one blocked client at a time; their cost shows up under high churn.

Suggested initial coverage:

  • memtier_benchmark-Nclients-blpop-1key-rotated-pipeline-1.yml — 1 producer doing LPUSH ... <ts>, N consumers BLPOP key 0, measure rate and p50/p99 unblock latency.
  • memtier_benchmark-Nclients-bzpopmin-1key-rotated-pipeline-1.yml — same shape for sorted sets.
  • memtier_benchmark-Nclients-xread-block-consumer-group.yml — XADD producer + N XREADGROUP ... BLOCK 0 consumers.

Happy to take this on if it's helpful — let me know if there's a preferred shape (e.g. a single rotating-key playbook vs. per-command files).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions