博客
  • 博客
  • 每天30分钟,3天上手Vim(不是标题党!)
  • Debug记录(更新:Valgrind: Conditional jump or move depends on uninitialized value(s))
  • CS61C 计算机体系结构(更新:Logisim Debug提示)
  • VSCode远程连接配置&常见问题
  • 为什么RISC-V中的SB-format不叫B-format,UJ-format不叫J-format?
  • 懒人英语
  • 如何屏蔽GeeksforGeeks的强制注册窗口?
  • 《软技能:代码之外的生存指南》效率提升部分
  • 懒人厨房(更新:松木筷)
  • 如何无痛地戒游戏?(更新:补充说明,以及其他内容)
  • 被说烂的话题:人总是会给自己找借口
  • Git教程哪家强?
  • PDF阅读踩坑
  • CS61B 数据结构
  • 比较轻松的递归入门练习
  • 情绪控制训练
  • 学习一门技能如何让你在观察事物时多一个视角
  • 犹豫不定的时候怎么作出选择?
  • 尽量保持友善
  • 被说烂的话题:如何长期坚持一件事,或“自律”?(更新:带着好奇心)
  • 塔勒布四部曲《随机漫步的傻瓜》《黑天鹅》《反脆弱》《非对称风险》
  • 《How to: 如何不切实际地解决实际问题》
  • 《异类》
  • 《成长的边界》
  • 有意思的《经济学原理》
  • 冷知识
  • 《霍乱时期的爱情》摘录
  • Metro: Exodus (地铁:离乡) 游玩指南
  • 逃课指南
  • Vue环境配置踩坑
  • JetBrains相关
  • 防止Goland自动删除没写完的代码
  • 自然演化 与 “人生的意义”
  • 学会手搓CPU后的收获总结
  • 阅读踩坑
  • VMWare Ubuntu22.04装机配置环境
  • 学习k8s & Docker
  • 万物发明指南
  • Page 1
  • 家庭健身房&健身踩坑
  • 一定要在中短期内完成任务
  • 吃苦
  • 捷径
  • userNum? numUser? 为什么不鼓励使用全局变量?请阅读Code Complete 2
  • 备忘录
  • 草稿-《重来》
  • 草稿-部分已整理-《醉汉的脚步》
  • Redis病毒 backup1 backup2 backup3 backup4
  • 吃饭时看什么
  • 这本书看英文版还是看中文版?都看
  • 一些待解决的疑问
  • 现实世界的特性-草稿
  • 草稿-生育不应该是基本权利,就像杀人不是基本权利
  • PC端最佳阅读工具Calibre使用踩坑
  • 不要使用Linux命令符号的2个踩坑案例
  • 草稿-时间是物体运动的一种体现方式?
  • 性能优化
  • 最好的C指针教程
  • 草稿-做了定性分析,别忘了做定量分析
  • 还有人不知道Gin框架自带参数校验吗?
  • 《福格行为模型》 不要和本能对抗
  • go-zero 微服务
  • Go依赖注入工具Wire
  • 屎山不可怕,可怕的是没单元测试
  • Go: 返回false还是返回一个定制error ErrValueNotFound?
  • 从源码中查找错误原因,3个例子
  • 《潜规则》《血酬定律》
  • 草稿-陈词滥调:打破规则、跟从内心...
  • testutils
  • 草稿-3天培养早睡早起习惯
  • 草稿-3天轻松入门正念冥想
  • “培养吃屎习惯”=“培养阅读习惯”
  • 草稿-“自我提升”需要有良好的环境
  • 草稿-立刻行动的感觉真好 或者改成“3天改掉拖延”?
  • 求解答:DDIA医生值班室例子,为什么推荐用串行化而不是可重复读+锁?
  • Go私有package
  • Go: error "type assertion" vs "errors.Is()" vs "=="
  • gRPC的Go实现,其返回的error为什么不用fmt.Errorf()?
  • 幸福是一种选择
  • 草稿-描述世界专栏
  • RESTful实现记录
  • 低痛开启冷水澡
  • 草稿-陈词滥调专栏-平衡
  • 草稿-完整标注-《醉汉的脚步》
  • 文学作品
  • 游泳
  • 体态矫正(肱骨前移、膝盖疼痛)
  • 《人类简史》
  • 豆瓣差评
  • 《成吉思汗与今日世界之形成》
  • 《定价制胜》
  • 废话专栏:做决定前留足时间
  • 租房踩坑
  • 70%小型测试+20%中型测试?
  • 草稿-索罗斯:“世界经济史就是一场骗局” vs 塔勒布:“谎言是脆弱的”
  • 坚持不懈 vs 及时更换方法
  • 立场 vs 事实
  • 轻松解决Docker镜像问题:VPN+国内镜像源
由 GitBook 提供支持
在本页

一些待解决的疑问

上一页这本书看英文版还是看中文版?都看下一页现实世界的特性-草稿

最后更新于1年前

In Kafka’s paper, it is mentioned that it does not have a built-in cache, but uses the file system’s page cache. Is this design applicable to other software? For example, can InnoDB not have a built-in cache and also use the page cache?

. Instead of maintaining as much data as possible and flushing it to the file system when memory space runs out, all data is immediately written to a persistent log on the file system without flushing to disk. .

As for InnoDB, it’s a bit different. . This is because InnoDB’s design and usage patterns are different from Kafka’s. While Kafka is a messaging system that deals with a large number of small messages, InnoDB is a database engine that needs to efficiently handle transactions and maintain ACID properties.

So, while it’s theoretically possible for other software to use the file system’s page cache like Kafka does, whether or not it’s a good idea depends on the specific requirements and characteristics of the software. It’s always important to consider the trade-offs involved when designing or choosing a caching strategy.

Kafka indeed relies heavily on the file system for storing and caching messages
1
This means the data is essentially transferred into the kernel’s page cache
1
InnoDB has its own buffer pool for caching data, and it’s recommended to use innodb_flush_method=O_DIRECT in most cases, which won’t use the Operating System File Cache
2