← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 5381.b.1.a

持有独占资源拖出车队

理解等级:高级

持锁线程执行慢I/O时,其他线程不是各自慢,而是排成长队间接等待同一次I/O,这叫车队效应。只有少量工作线程时,阻塞也会严重降低整体处理能力。应缩短独占区间、避免里面等待外部资源,并对可能慢的操作设超时;出现超时应继续调查,不能以持续超时重试替代修复。

这是[[持锁读写形成串行瓶颈]]的具体后果:一个慢操作把其他等待者一起拖住。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 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.