免费注册 查看新帖 |

Chinaunix

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

AIX使用异步I/O(aio)提高系统性能 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-02-13 19:57 |只看该作者 |倒序浏览
如果是同步I/O,当一个I/O操作执行时,应用程序必须等待,直到此I/O执行完.  \r\n     相反,异步I/O操作在后台运行,I/O操作和应用程序可以同时运行,提高了系统性能.  \r\n     使用异步I/O会提高I/O流量,如果应用是对裸设备进行操作,这种优势更加明显.  \r\n     因此象数据库,文件服务器等应用往往会利用异步I/O,使得多个I/O操作同时执行.  \r\n      \r\n     1. 如何知道是否需要异步I/O?  \r\n     * 执行命令:\"vmstat # #\" 如果\"wa\"值超过25%.  \r\n     * 执行命令:\"iostat # #\" 如果\"%tm_act\"值超过35%.  \r\n     2. 查询有几个AIO服务器: pstat -a | grep aios | wc -l  \r\n     3. 应该设几个AIO服务器?  \r\n     一般为硬盘数的10倍,但不要超过80.  \r\n     4. AIO驱动程序: bos.rte.aio  \r\n     5. 配置AIO为可用: # smit chgaio ->  \r\n     STATE to be configured at system restart [available]  \r\n

论坛徽章:
0
2 [报告]
发表于 2002-02-20 14:44 |只看该作者
好像aio只有对文件系统才有效,裸设备是自动异步的。\r\n  \r\n    \r\nBookmark Fixed font  Go to End \r\n\r\nDoc ID:  Note:70161.1 \r\nSubject:  WHEN TO USE AIO MIN AND MAX SERVERS ON AIX \r\nType:  BULLETIN \r\nStatus:  PUBLISHED \r\n Content Type:  TEXT/PLAIN \r\nCreation Date:  24-MAY-1999 \r\nLast Revision Date:  05-JAN-2001 \r\n \r\n\r\nWhen to use Asynchronous IO (\'AIO\') min and max servers on AIX  \r\n===============================================================\r\n\r\nWhen should you set Asynchronous io (\'AIO\') min and max servers?\r\nThe answer is different depending on whether you use a file system,\r\nraw devices alone, or raw devices with VSDs or HSDs.  The answer \r\nalso changes depending on what version of AIX you are running and\r\nwhether or not 4.3 APAR IX79690 is applied.\r\n\r\n\r\nAsynchronous IO (\'AIO\') on AIX can be handled two different ways:\r\n\r\n1. by aio servers, or\r\n2. directly by the kernel (aka fastpath aio)\r\n\r\nIf AIO is handled by the kernel, you do not need to worry about \r\ntuning AIX minservers and maxservers.\r\n\r\nAIX Version     File type       AIO method\r\n-----------     -----------     -------------\r\n4.2.1           filesystem      aio server\r\n4.2.1           raw device      kernel\r\n4.2.1           VSD/HSD         aio server\r\n4.3             filesystem      aio server\r\n4.3             raw device      kernel\r\n4.3             VSD/HSD         kernel  (with APAR IX79690)\r\n4.3.2           filesystem      aio server\r\n4.3.2           raw device      kernel\r\n4.3.2           VSD/HSD         kernel  (APAR IX79690 is in 4.3.2)\r\n4.3.3           filesystem      aio server\r\n4.3.3           raw device      kernel\r\n4.3.3           VSD/HSD         kernel\r\n\r\nExplanation: \r\n============ \r\n\r\nWhen you use a file system on AIX, kernel processes known as \r\nkprocs are used.  The kprocs require aio servers.  When you use\r\nraw devices kprocs are not used because AIO is handled directly \r\nby the kernel.  This is known as Fastpath AIO.  VSDs and HSDs \r\nare built on raw devices but they could not make use of Fastpath \r\nAIO prior to AIX 4.3 with APAR IX79690.\r\n\r\nWith APAR IX79690 Fastpath is on by default for raw devices with \r\nor without VSD/HSD.  The APAR will allow you to disable Fastpath.  \r\nHowever, there is no reason to do this unless you are on an old \r\nmodel machine which cannot handle Fastpath.  Prior to the APAR \r\nyou could not disable Fastpath for raw devices without VSD/HSD \r\nand you could not enable Fastpath for raw devices with VSD/HSD.\r\nThe APAR is included in 4.3.2.\r\n\r\nIf any request tried on Fastpath is not successful then the kproc \r\npath is tried (using AIO servers).  So if you adjust the aio servers \r\nand see a difference when you think you should be using Fastpath \r\nthen this indicates some of your fastpath requests are failing and \r\nare tried with the kproc path.\r\n.

论坛徽章:
0
3 [报告]
发表于 2002-02-20 17:42 |只看该作者
如此说来,应该是:\r\n在使用文件系统的情况下,AIO server的最大和最小数量对性能有影响,必要时需要调整。\r\n在使用裸设备的情况下,不使用AIO server,于是其数量与裸设备IO性能无关。\r\n\r\n但是,AIO不打开(AIX默认不打开),裸设备一样用不成AIO,而不是自动就有AIO的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP