Skip to content

fix: Increase batch scheduler max new items limit - #4546

Open
juliusgeo wants to merge 1 commit into
mainfrom
increase_batch_new_items_limit
Open

fix: Increase batch scheduler max new items limit#4546
juliusgeo wants to merge 1 commit into
mainfrom
increase_batch_new_items_limit

Conversation

@juliusgeo

Copy link
Copy Markdown
Contributor

Description

Increase it so that the batch scheduler doesn't fall over when there are more than 1k tasks per second.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change (pure documentation change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking changes to code which doesn't change any behaviour)
  • CI (any automation pipeline changes)
  • Chore (changes which are not directly related to any business logic)
  • Test changes (add, refactor, improve or change a test)
  • This change requires a documentation update

What's Changed

  • Add a list of tasks or features here...

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: [e.g. generating tests, writing docs]

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Jul 28, 2026 12:01am

Request Review

@github-actions github-actions Bot added the engine Related to the core Hatchet engine label Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

goos: linux
goarch: amd64
pkg: github.com/hatchet-dev/hatchet/pkg/scheduling/v1
cpu: AMD Ryzen 9 7950X3D 16-Core Processor          
                                         │ /tmp/old.txt │            /tmp/new.txt            │
                                         │    sec/op    │    sec/op     vs base              │
BatchSchedulerWorstCaseMemory-8             1.507 ±  6%    1.578 ±  6%       ~ (p=0.180 n=6)
RateLimiter-8                              48.46µ ± 12%   47.07µ ± 13%       ~ (p=0.818 n=6)
Scheduler_Replenish_DenseSharedActions-8   14.19m ±  2%   14.20m ±  3%       ~ (p=0.818 n=6)
geomean                                    10.12m         10.18m        +0.59%

                                │ /tmp/old.txt │         /tmp/new.txt          │
                                │  bytes/item  │ bytes/item  vs base           │
BatchSchedulerWorstCaseMemory-8     70.17 ± 0%   70.17 ± 0%  ~ (p=1.000 n=6) ¹
¹ all samples are equal

                                │ /tmp/old.txt  │           /tmp/new.txt           │
                                │ worst_case_MB │ worst_case_MB  vs base           │
BatchSchedulerWorstCaseMemory-8     1.403k ± 0%     1.403k ± 0%  ~ (p=1.000 n=6) ¹
¹ all samples are equal

                                │   /tmp/old.txt   │           /tmp/new.txt            │
                                │ worst_case_bytes │ worst_case_bytes  vs base         │
BatchSchedulerWorstCaseMemory-8        1.403G ± 0%        1.403G ± 0%  ~ (p=0.197 n=6)

                                         │ /tmp/old.txt │            /tmp/new.txt            │
                                         │     B/op     │     B/op      vs base              │
BatchSchedulerWorstCaseMemory-8            6.400Gi ± 0%   6.400Gi ± 0%       ~ (p=0.485 n=6)
RateLimiter-8                              137.7Ki ± 0%   137.7Ki ± 0%       ~ (p=0.790 n=6)
Scheduler_Replenish_DenseSharedActions-8   11.69Mi ± 0%   11.69Mi ± 0%       ~ (p=0.485 n=6)
geomean                                    21.76Mi        21.76Mi       -0.00%

                                         │ /tmp/old.txt │            /tmp/new.txt             │
                                         │  allocs/op   │  allocs/op   vs base                │
BatchSchedulerWorstCaseMemory-8             3.727k ± 0%   3.720k ± 0%       ~ (p=0.095 n=6)
RateLimiter-8                               1.022k ± 0%   1.022k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_Replenish_DenseSharedActions-8    17.52k ± 0%   17.52k ± 0%       ~ (p=0.351 n=6)
geomean                                     4.056k        4.054k       -0.05%
¹ all samples are equal

Compared against main (559b502)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Related to the core Hatchet engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant