Skip to content

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Problem: Adaptive throttler used load_average / cpu_cores as its signal, which on macOS includes I/O-blocked processes (Backblaze, Spotlight, etc.). Load average of 155 on 10 cores = 1550% ratio, causing max throttle to 1-2 workers — even when actual CPU was only 65% used with 35% idle.
  • Fix: On macOS, use top -l 1 to get real CPU idle percentage (0-100%). Recalibrate throttle bands: <40% = scale up, 40-70% = base, 70-85% = halve, >85% = minimum.
  • Impact: Workers will now dispatch at full base concurrency when CPU headroom exists, instead of being artificially throttled by misleading load averages. Linux behavior unchanged.

Testing

Verified top -l 1 | awk '/CPU usage/ ...' returns accurate idle% (37% idle = 63% used) while load average simultaneously showed 155/10 cores. ShellCheck clean on changed lines.

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/adaptive-throttle-cpu-idle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 00:07:02 UTC 2026: Code review monitoring started
Tue Feb 10 00:07:02 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 00:07:05 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 00:11:31 UTC 2026: Code review monitoring started
Tue Feb 10 00:11:31 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 00:11:34 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…ling on macOS

Load average on macOS includes processes in uninterruptible sleep (I/O wait,
Backblaze backup, Spotlight indexing, etc.), causing load averages of 150+ on
10 cores even when actual CPU usage is only 65%. The adaptive throttler was
using load_ratio = load_avg/cores*100, which caused it to over-throttle to
1-2 workers when there was 35%+ CPU idle.

Now on macOS: uses `top -l 1` to get real CPU idle percentage. The throttle
bands are recalibrated for 0-100% CPU usage:
- CPU < 40%: scale up (double base concurrency)
- CPU 40-70%: use base concurrency as-is
- CPU 70-85%: halve concurrency
- CPU > 85%: minimum floor (1 worker)

Linux behavior unchanged (load average is more accurate there since it only
counts runnable processes, not I/O-blocked ones).
@marcusquinn marcusquinn force-pushed the bugfix/adaptive-throttle-cpu-idle branch from 65d75d7 to 541b077 Compare February 10, 2026 01:33
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 01:34:34 UTC 2026: Code review monitoring started
Tue Feb 10 01:34:34 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 01:34:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 67f959e into main Feb 10, 2026
10 checks passed
@marcusquinn marcusquinn deleted the bugfix/adaptive-throttle-cpu-idle branch February 10, 2026 01:37
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.

1 participant