知识卡片

普通读书笔记卡 · 10294.a.5 · 生成模型:未记录

页缓存解耦物理读写

理解等级:初级

引擎按逻辑页号向缓存请求页面。命中就借用已有缓冲,未命中才把页号翻译成磁盘位置并装入空槽;调用者使用后要归还引用。应用在内存缓冲上修改页并标脏,后续批量刷盘。固定页可延长驻留。采用 O_DIRECT 可绕开内核缓存,但引擎要自行安排预读等策略。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Database Internals》Chapter 5. Transaction Processing and Recovery(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch05.html#idm46104532687544,段 39) - 结论依据:第 18–40 段分别说明缓存职责、命中与装入、脏标记和直接 I/O 的取舍。 - 原始内容:When the storage engine accesses (in other words, requests) the page, we first check if its contents are already cached, in which case the cached page contents are returned.