知识卡片
持有独占资源拖出车队
持锁线程执行慢I/O时,其他线程不是各自慢,而是排成长队间接等待同一次I/O,这叫车队效应。只有少量工作线程时,阻塞也会严重降低整体处理能力。应缩短独占区间、避免里面等待外部资源,并对可能慢的操作设超时;出现超时应继续调查,不能以持续超时重试替代修复。
这是[[持锁读写形成串行瓶颈]]的具体后果:一个慢操作把其他等待者一起拖住。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 构建稳定系统 · 查看原书依据
Also, doing I/O while holding exclusive resources forces everyone waiting on the resources to indirectly wait on the I/O, slowing down the system. This effect is called the Convoy Effect.
参考来源
- 位置:《Software Architecture and Decision-Making》第12章《Building Stable Systems》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch12.xhtml)
- 结论依据:摘录说明持锁线程执行慢I/O时,其他线程不是各自慢,而是排成长队间接等待同一次I/O,这叫车队效应。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:Also, doing I/O while holding exclusive resources forces everyone waiting on the resources to indirectly wait on the I/O, slowing down the system. This effect is called the Convoy Effect.