Skip to content

Snapshot/decouple queue - #59

Merged
Yiming1997 merged 4 commits into
mainfrom
snapshot/decouple-queue
Jun 17, 2026
Merged

Yiming1997 merged 4 commits into
mainfrom
snapshot/decouple-queue

Conversation

@Yiming1997

Copy link
Copy Markdown
Owner

No description provided.

Cap the chunked buffer at 100k tasks (maxChunkLen). When reached,
submitters block on the handoff channel instead of growing the
buffer further, letting workers drain before accepting more work.

Benchmark (10M tasks, 20k workers, concurrent submit):
  peak memory: 1.04 GB → 451 MB (−57%)
  goroutine stacks (malg): 395 MB → 61 MB
  mutex contention: 73 MB → 7.5 MB
  throughput unchanged at ~8.9s
…to snapshot/decouple-queue

# Conflicts:
#	config.go
#	pool.go
#	worker.go
@Yiming1997
Yiming1997 merged commit 6658ffd into main Jun 17, 2026
1 check passed
@Yiming1997
Yiming1997 deleted the snapshot/decouple-queue branch June 17, 2026 15:24
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