General

Profile

moznion (Taiki Kawakami)

  • Login: moznion
  • Registered on: 12/19/2025
  • Last sign in: 12/29/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

12/29/2025

05:03 AM Ruby Feature #21797: Make Etc.nprocessors cgroup-aware on Linux
> What would be the value of nprocessor in this case?, e.g. if cpu_quotais 0.5, what does nprocessors return? cpu_quota.ceil?
I think it depends on the decision, but either floor or ceil should be fine (for reference, Go’s `GOMAXPROCS...
moznion (Taiki Kawakami)

12/20/2025

03:16 PM Ruby Feature #21797: Make Etc.nprocessors cgroup-aware on Linux
Thank you for your comments. Let me summarize the discussion.
### 1. Introducing a new API under `Etc`
Introducing a method such as `Etc.cpu_quota`, which returns `Float | nil`, seems reasonable.
### 2. Changing the behavior of ...
moznion (Taiki Kawakami)
02:47 AM Ruby Feature #21797: Make Etc.nprocessors cgroup-aware on Linux
osyoyu (Daisuke Aritomo) wrote in #note-4:
> It'd be nice if `RUBY_MAX_CPU` would be autoconfigured based on this, just like Go 1.25 `GOMAXPROCS`.
> ...
This sounds very good, but it should probably be a separate ticket though.
nobu...
moznion (Taiki Kawakami)

12/19/2025

08:12 AM Ruby Feature #21797 (Open): Make Etc.nprocessors cgroup-aware on Linux
Currently, `Etc.nprocessors` ignores cgroup CPU quotas. This causes issues in containers where CPU limits differ from the host CPU count.
I have written a gem for this purpose (https://github.com/moznion/maxprocs-ruby), but it would be ...
moznion (Taiki Kawakami)

Also available in: Atom