Skip to content

feat(): Auto-configuration based on system resources (CPU/RAM) <> (fix #5) - #6

Open
iyashjayesh wants to merge 3 commits into
mainfrom
feat/auto-config
Open

iyashjayesh wants to merge 3 commits into
mainfrom
feat/auto-config

Conversation

@iyashjayesh

Copy link
Copy Markdown
Owner

The implementation provides intelligent defaults based on system resources while maintaining the flexibility for manual configuration, exactly as requested in the issue.

Closes #5

- Count CPUs with GOMAXPROCS, which follows container CPU limits, instead
  of runtime.NumCPU.
- Size the queue by memory from GOMEMLIMIT or the cgroup memory limit.
  MemStats.Sys is memory the runtime holds, not memory available, so the
  queue always hit its floor; without a limit, use the workload default.
- Apply auto-config before the other options, so an explicit option such
  as WithMaxWorkers wins wherever it appears.
- Log the resolved values instead of adding QueueCapacity to Metrics.
- Test exact values with injected resources, option order and logging.
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.

Auto-configuration based on system resources (CPU/RAM)

1 participant