`pyperf system {tune,show}` on macOS

未关闭
#243 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
32/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
python
领域
performance

调研方向

从现有的 system tune 和 system show 入口开始,并在 macOS 上运行它们,以记录当前行为。研究此处提到的 macOS 机制,包括 pmset、taskpolicy、电源模式、热压力以及 worker 级调度。完成应意味着定义出一项 macOS harness 改进,提供可执行的输出或控制,并包含覆盖受支持行为的测试。

由索引模型根据 Issue 内容生成。

描述

With the advent of LLM tools (eg: Claude, Codex), small optimizations are a gateway drug to contributing to the ecosystem. Many people, myself included, use a MacBook as a daily driver. However, there are many mechanisms in these machines and macOS itself that might make posted numbers not really trustworthy, even with --rigorous. I'm thinking about thermal pressure / throttling, coalescing, P/E cores, different power sources, low/high power mode, memory pressure, virtualization, noisy daemons in the background, etc. Of course, there's also pyperformance. Perhaps there's real value in extending system {tune,show} to this platform.

My understanding is that there's no macOS API for CPU affinity, but we can still check stuff (eg: pmset), provide actionable advice. There's taskpolicy and pthread_set_qos_class_self_np. The model is per worker, not global.

Perhaps the real issue here is improving our harness on macOS.

主要语言
Python
星标
967
派生
112
平均合并
5 天 8 小时
30 天内合并 PR
9

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

psf/pyperf 的其他 Issue

查看 psf/pyperf 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。