Hacker News 中文摘要

RSS订阅

单行日志导致systemd-journald磁盘写入49KB+(ext4)/ 110KB+(btrfs) -- Single log line is 49KB+ (ext4) / 110KB+ (btrfs) of systemd-journald disk writes

文章摘要

页面加载时出现错误,请刷新页面重试。

文章总结

哎呀!

加载时出现错误。请重新加载此页面。

评论总结

根据评论内容,总结如下:

主要观点与论据:

  1. journald 磁盘写入性能问题严重(多位用户认可)

    • 评论9(pengaru)指出:journald 的磁盘格式存在“写放大”问题,小数据写入时因跨块边界导致整个块被重写,mmap 方式加剧了页缓存污染。
    • 评论5(barrkel)认为:journald 是 systemd 生态中最差的部分,索引系统慢且无法按标识符截断日志,建议仅用作路由器。
    • 评论7(mono442)表示:journald 比 grep 压缩文本日志还慢。
  2. 对 systemd 整体不满(部分用户)

    • 评论10(skullone)称 systemd 像“性病”一样传播腐烂。
    • 评论2(smartmic)因 journald 磁盘占用问题考虑转向 Devuan(无 systemd 的 Debian 分支)。
  3. 改进建议与替代方案

    • 评论13(quotemstr)建议 systemd 改用 DuckDB 列式存储,利用其自动压缩和高效字段存储。
    • 评论15(d3Xt3r)询问如何在不移除 systemd 的情况下禁用 journald 并切换其他日志系统。
  4. 设计初衷与现实差距

    • 评论16(otterley)引用官方文档称 journald 格式本应节省磁盘空间,但实际表现未达预期。

平衡性说明: - 多数评论对 journald 持批评态度,但评论12(otterley)呼吁提出修复方案而非单纯抱怨。 - 评论9(pengaru)作为前维护者承认自己主要改进读取性能,未优化写入格式。

关键引用(保留中英文): - “journald is IMO the worst part of the systemd ecosystem... You're better off using it only as a router” (barrkel) - “The format had no consideration for these block-oriented storage details... mmap aspect... exacerbating the problem” (pengaru) - “Systemd should just use DuckDB... columnar design and automatic compression” (quotemstr)