Weave 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

A tiny PHP utility for detecting CPU core counts, with logical and physical finders, built-in fallbacks, and memoized results. It also estimates cores available for parallel processes and lets you customize or reorder finders. Requires Composer.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Auto-tuning queue worker concurrency: Set Laravel queue worker counts from detected CPU capacity instead of hardcoded values, improving throughput and reducing over-provisioning in containerized deployments.
  • Build vs. buy: Avoid building and maintaining OS-specific core-detection logic for Linux, Windows, macOS, and Kubernetes CPU limits; a small MIT-licensed utility covers this narrow need.
  • Cloud cost and capacity roadmap: Make real-time CPU availability a first-class input for worker scaling, batch chunk sizing, and parallel job execution, especially where Kubernetes CPU quotas or millicore limits apply.
  • Environment-aware defaults: Improve deployment reliability by replacing assumptions like “4 workers everywhere” with runtime-aware defaults and explicit fallbacks.
  • Diagnostics as operational tooling: Use built-in diagnose/execute scripts during rollout and incident response to explain why a given environment reports a particular core count.
  • Risk-managed adoption: Treat the package as an infrastructure utility, not a product differentiator; pin the version and wrap it behind a config/service boundary so the application can swap or override detection later.

When to Consider This Package

  • Adopt when Laravel workloads run across heterogeneous hosts or containers and concurrency should adapt to actual CPU availability.
  • Strong fit for Kubernetes/containerized deployments where CPU limits, including millicore-style quotas, affect how many parallel workers are safe.
  • Consider for high-throughput parallel workloads such as queue processing, media handling, data pipelines, or batch jobs where under/over-provisioning has measurable cost or performance impact.
  • Use when you need both logical and physical core detection or want configurable finder order for unusual environments.
  • Look elsewhere or skip when infrastructure is static and worker counts are intentionally fixed, the app is simple enough that hardcoded concurrency is fine, or dependency review requires highly mature/vendor-backed packages.
  • Mitigate adoption risk: Despite healthy stars, the package has zero listed dependents and a very small surface area. Use a fallback value, pin versions, and validate in staging before relying on detection for production scaling.

How to Pitch It (Stakeholders)

  • Executives: “This is a low-cost, MIT-licensed utility that lets our Laravel services size background processing to the CPU capacity actually available. That means better resource utilization, lower cloud waste, and fewer incidents caused by fixed worker counts that are wrong for some environments.”
  • Engineering: “It is a tiny, focused dependency that removes custom OS/container core-detection code. We can wrap it behind configuration, provide fallbacks, and use its diagnostics to troubleshoot environment-specific behavior. It is not a framework replacement; it is a small infrastructure input for queue and parallel-job sizing.”
  • Product/roadmap: “Adopt it where dynamic concurrency materially affects performance or cost, such as Kubernetes-hosted queue workers and batch pipelines. Do not make it a platform-wide dependency without a fallback strategy; treat it as an implementation detail behind our worker-sizing configuration.”
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console