免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 722 | 回复: 0
打印 上一主题 下一主题

HOW TO CHECK IF ASYNCHRONOUS I/O IS WORKING ON LIN [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-13 08:11 |只看该作者 |倒序浏览
PURPOSE
-------
In this document we are going to explain how to check that asynchronous I/O
is working.

SCOPE & APPLICATION
-------------------
Many times there is a requirement to check if Asynchronous I/O is working
on Linux Platform, so we can try to use it for our datafiles access
inside database.
SOLUTION
--------
slabinfo maintains statistics about objects in memory. Some of the structs used
by Asynchronous I/O are threated as objects in the virtual memory, so we can
look for those structs on slabinfo. The ones related to AIO are named kio*.
$ cat /proc/slabinfo | grep kio
for example:
output with async io enabled.
$ cat /proc/slabinfo | grep kio
kioctx               270    270    128    9    9    1 :  252  126
kiocb              66080  66080     96 1652 1652    1 :  252  126
kiobuf               236    236     64    4    4    1 :  252  126
$
output with async io disabled.
$ cat /proc/slabinfo | grep kio
kioctx                 0      0    128    0    0    1 :  252  126
kiocb                  0      0     96    0    0    1 :  252  126
kiobuf                 0      0     64    0    0    1 :  252  126
$
There are 3 caches involved.
The kioctx and kiocb are Async I/O data structures that are defined in aio.h.
If it shows a non zero value that means async io is enabled.
If you have the source code loaded, you can review it at file aio.h.
This file is located under:
/usr/src/linux-/include/linux/aio.h
These data structures are using to track the I/O requests, and are allocated as
part of the  __init aio_setup() call in aio.c.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16666/showart_99121.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP