在我的Ubuntu安装中,我得到了这个错误:
kernel: [6622929.119915] EXT4-fs (sda1): Unaligned AIO/DIO on inode 43648079 by java; performance will be poor.这是一个内核错误吗?我该怎么解决呢?
发布于 2012-04-02 23:53:06
这不是一个内核错误,而是来自内核的警告,即所讨论的应用程序正在以一种低效的方式使用API (异步I/O或直接I/O)。
来自源代码:
/*
* 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,那么除了针对问题程序提交错误报告之外,您可能无能为力。
不管它的价值是什么,这个警告的比率是限制在每天一次,所以它不应该填满你的日志。
https://askubuntu.com/questions/118140
复制相似问题