Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cpu Core Counter Laravel Package

fidry/cpu-core-counter

Tiny PHP utility to detect CPU core count (logical or physical) with memoized results. Provides sensible defaults plus configurable “finders” per OS, parallelisation-friendly available cores, and safe fallbacks via exception handling or getCountWithFallback().

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables dynamic adjustment of task concurrency in Laravel queue workers and background jobs based on actual available CPU cores, improving performance and resource efficiency without manual configuration
  • Eliminates need for custom OS-specific core detection logic (Windows/Linux/macOS), reducing technical debt and maintenance overhead for infrastructure teams
  • Critical for cloud-native applications where Kubernetes CPU limits must be respected; supports millicores for precise resource allocation in containerized environments
  • Provides built-in diagnostics tools to debug core detection issues during deployment troubleshooting, reducing time spent on environment-specific failures
  • Supports smarter scaling decisions in auto-scaling groups by leveraging real-time core availability instead of hardcoded values

When to Consider This Package

  • Adopt when your application runs in heterogeneous environments (e.g., mixed OS servers or containerized deployments) and requires accurate, dynamic CPU core detection for parallel processing
  • Use in Kubernetes environments where CPU quotas are set via limits, as the package specifically handles KUBERNETES_CPU_LIMIT values
  • Consider when optimizing resource usage for high-throughput workloads (e.g., image processing, data pipelines) where under/over-provisioning impacts cost/performance
  • Look elsewhere if your infrastructure is static and fully controlled (e.g., single dedicated server with fixed hardware), or if your use case requires a fixed core count regardless of environment
  • Avoid for trivial applications where core count is hardcoded and never changes, or if the project has strict dependency restrictions

How to Pitch It (Stakeholders)

  • Executives: "This lightweight package optimizes server resource utilization by dynamically adjusting task concurrency based on actual CPU availability, reducing infrastructure costs through efficient scaling. With MIT licensing and proven reliability, it ensures
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4