知识卡片
瓶颈之外的空闲不等于浪费
吞吐由最受限资源决定,CPU没满不一定表示代码尚有同等比例的提升空间:任务可能等I/O、锁、连接池或其他软资源。先用CPU、内存、网络、线程和锁等遥测找到限制因素,再优化;改善非瓶颈区域收益小。连续消除热点后,下一瓶颈会迁移,必须再测。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 理解性能的心智模型 · 查看原书依据
To optimize, we need to decide where the bottlenecks are. Bottlenecks usually come in one of three forms: One of the resources (e.g., CPU, I/O, or memory) is the bottleneck. Thread models are causing critical resources to be idle. Resources are wasted on nonessential tasks (e.g., context switches, GC).
参考来源
- 位置:《Software Architecture and Decision-Making》第3章《理解性能的心智模型》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch03.xhtml)
- 结论依据:原文的定义、比较或例子支持“吞吐由最受限资源决定,CPU没满不一定表示代码尚有同等比例的提升空间:任务可能等I/O、锁、连接池或其他软资源”;正文据此说明用途和边界。
- 原始内容:To optimize, we need to decide where the bottlenecks are. Bottlenecks usually come in one of three forms: One of the resources (e.g., CPU, I/O, or memory) is the bottleneck. Thread models are causing critical resources to be idle. Resources are wasted on nonessential tasks (e.g., context switches, GC).