首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >非对齐AIO/DIO

非对齐AIO/DIO
EN

Ask Ubuntu用户
提问于 2012-04-02 10:16:13
回答 1查看 12.6K关注 0票数 7

在我的Ubuntu安装中,我得到了这个错误:

代码语言:javascript
复制
kernel: [6622929.119915] EXT4-fs (sda1): Unaligned AIO/DIO on inode 43648079 by java; performance will be poor.

这是一个内核错误吗?我该怎么解决呢?

EN

回答 1

Ask Ubuntu用户

发布于 2012-04-02 23:53:06

这不是一个内核错误,而是来自内核的警告,即所讨论的应用程序正在以一种低效的方式使用API (异步I/O或直接I/O)。

来自源代码

代码语言:javascript
复制
/*
 * This tests whether the IO in question is block-aligned or not.
 * Ext4 utilizes unwritten extents when hole-filling during direct IO, and they
 * are converted to written only after the IO is complete.  Until they are
 * mapped, these blocks appear as holes, so dio_zero_block() will assume that
 * it needs to zero out portions of the start and/or end block.  If 2 AIO
 * threads are at work on the same unwritten block, they must be synchronized
 * or one thread will zero the other's data, causing corruption.
 */

因此,这意味着所讨论的程序试图使用异步I/O或直接I/O API,其内存缓冲区与文件系统块边界不对齐,这迫使文件系统对文件执行异步操作,以避免损坏。

如果触发警告的程序是您编写的警告,那么您可以调整它如何使用AIO或DIO来避免问题。如果它不是您的程序,或者您没有直接使用API,那么除了针对问题程序提交错误报告之外,您可能无能为力。

不管它的价值是什么,这个警告的比率是限制在每天一次,所以它不应该填满你的日志。

票数 9
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/118140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档