iometer 1.1.0 重要特性说明之O_DIRECT flag重新引入(OutStanding设置失效问题)
2015-02-10 15:56
288 查看
前言:
Iometer 2006.07.27版本在linux系统上一直存在个问题:Iometer的I/O OutStanding 的数值设置没有效果,无法做到异步测试,比如:设置为32的数值,性能测试结果与设置为1相差无几。
Iometer 1.1.0 版本已经修复这个存在8年多的严重BUG(xca1019 2012年合入devel分支),但也不能直接说彻底解决了。这个问题最早是由LIANG
YANG提出,并在2006年底得到当时iometer 的维护人MING ZHANG的确认,因为在修改方案上存在分歧,这个问题就一直挂起,没有fix。这个问题的解决与Linux 系统的Asynchronous I/O 实现相关,与它相关的项目开发也一直处于争论、搁置、废弃等状态,到目前已经十年了,也没有见到一个统一的妥善的方案出来,虽然也有大量的非官方补丁发布,但毕竟仍然存在一些风险。
版本更新
-------------------------
Version 1.1.0 (GA) ---- 完整changelog文件访问地址:http://sourceforge.net/p/iometer/svn/HEAD/tree/trunk/IOmeter/CHANGELOG.txt
==================
- New functionality:
- (Windows) Support for identifying GPT disks with hidden paritions was added.
- Changes/Improvements:
- (All) Expressing Dynamo command line options with Windows style options (/f) is no longer supported. Going forward, only Unix style options (-f or --foo) are available.
- (All) Non-standard Dynamo command line options used for tuning or activating alternative code paths (-force_raw and -use_rdtsc) are now consolidated in the new --flag option.
- Bug fixes:
- (Linux) The O_DIRECT flag was reintroducted for opening targets under Linux.
- (Linux) Patch by Jinpyo Kim enabling the use of libaio on Linux. The code path is controlled by IOMTR_SETTING_LINUX_LIBAIO and is enabled by default.
- (Linux) Removed stropts.h include for Linux, as this file is no longer available with newer Linux distributions.
- (OS X) Specialized the OS X makefile (Makefile-OSX.all) into Makefile-OSX.ppc and Makefile-OSX.i386, because otherwise builds on x86 are breaking due to the CPU architecture specific timer code.
- (All) Patch by Ryan Bever to fix the version check being performed when loading a ICF files. The new version format caused the check to fail when loading ICF files that were written by former versions of Iometer (see Bug Tracker
ID 3141394).
- (All) Patch by Daniel Scheibli to fix the PROCESSOR row format in the CSV file output (see Bug Tracker ID 3141400).
- Documentation:
- Converted Iometer User's Manual from Star Office based file (.sxw) to the Open Document Format (.odt)
- Others:
- (All) Reimplementation of handing of Dynamo command line option handling and the related help output (aka Syntax() function).
- (All) Minor changes to the initial puslar output. In particular the processor family information were cleaned up.
- Appended .txt extension to the capital letter files (CHANGELOG etc.)
- Rework of CHANGELOG file to clarify changes since version 2006.07.27.
------------------------
现象描述
采用Iometer 2006.07.27版本,在linux 系统上跑dynamo,这时对Iometer GUI界面的OutStanding I/O 数值无论设置为多少,性能数据均与设置为1时表现相当。并且Iometer 不管是采用Disk I/O(RAW),还是采用File I/O(Buffered/Cache)的读写场景。
原因解释
Iometer 2006.07.27版本中针对IOMTR_OS_LINUX类型的操作系统的磁盘I/O读写是采用异步IO方式(AIO)。Linux 系统的异步I/O实现方式主要是POSIX AIO和Native Kernel AIO两种。
这个Iometer版本的作者选择的是Glibc实现方式,而用户态的Glibc 实现异步I/O,是通过线程与线程之间可以异步工作的特性,使用新线程来完成多个异步I/O请求,最终模拟出异步I/O的处理。但是,这种实现存在一个问题,即是同一个fd的读写请求是由同一个异步处理线程来完成的,并且该异步处理线程是逐个处理这些请求。对于IO Scheduler 来说,它每一次只能处理一个请求,当该请求处理完毕之后,异步处理线程才会提交下一个(根据优先级排序)。Iometer
的OutStanding I/O (被选中Worker的每一磁盘一次允许的未处理的异步I/O数量,也叫队列深度)设置数值大于1时,由于采用Glibc实现方式,故所有异步I/O请求都是逐个处理,这样实际运行结果也就和OutStanding I/O 数值设置为1一致,甚至某些时候还略有降低(CPU资源紧张时)。
补充说明一下:针对IOMTR_OS_LINUX类型,iometer 2006.07.27和1.1.0 GA版本都设置了O_DIRECT Flag。changelog中说重新引入,不知道是参照从哪个rc版本来说的。该Flag的设置,意味着IO请求绕过文件系统缓存,直接访问磁盘设备。故,iometer 不适合测试Linux 系统下的各种文件系统性能。
1.1.0版本AI
4000
O新方案
iometer 1.1.0 GA版本已经正式采用Native kernel AIO方式,抛弃了争议颇多的Glibc AIO方式。
该方式允许所有IO请求直接提交给I/O Scheduler。当I/O请求数较多时,I/O Scheduler 采用不同的电梯算法来处理这些请求。但是Kernel AIO 目前支持Direct IO模式,而非Direct IO(buffer/cache)因为会增加block points,无法做到非阻塞。
iometer 1.1.0 GA版本采用了Linux Kernel AIO方式,同时仅支持Direct IO。所以说,该版本也并非完美的异步IO解决方案应用。但是,由于iometer 仅关注RAW 设备性能,所以即便目前AIO不支持Buffered IO,也没有什么大的影响。如果非要考虑存储系统cache 对性能的影响大小,可以采用其他的IO测试工具,如vdbench;也可以自行patch iometer 源代码。
iometer 1.1.0 GA 版本的IOCommon.h 文件中对aio的调用情况:
[code=cpp;toolbar:false">
前言:
Iometer 2006.07.27版本在linux系统上一直存在个问题:Iometer的I/O OutStanding 的数值设置没有效果,无法做到异步测试,比如:设置为32的数值,性能测试结果与设置为1相差无几。
Iometer 1.1.0 版本已经修复这个存在8年多的严重BUG(xca1019 2012年合入devel分支),但也不能直接说彻底解决了。这个问题最早是由LIANG
YANG提出,并在2006年底得到当时iometer 的维护人MING ZHANG的确认,因为在修改方案上存在分歧,这个问题就一直挂起,没有fix。这个问题的解决与Linux 系统的Asynchronous I/O 实现相关,与它相关的项目开发也一直处于争论、搁置、废弃等状态,到目前已经十年了,也没有见到一个统一的妥善的方案出来,虽然也有大量的非官方补丁发布,但毕竟仍然存在一些风险。
版本更新
-------------------------
Version 1.1.0 (GA) ---- 完整changelog文件访问地址:http://sourceforge.net/p/iometer/svn/HEAD/tree/trunk/IOmeter/CHANGELOG.txt
==================
- New functionality:
- (Windows) Support for identifying GPT disks with hidden paritions was added.
- Changes/Improvements:
- (All) Expressing Dynamo command line options with Windows style options (/f) is no longer supported. Going forward, only Unix style options (-f or --foo) are available.
- (All) Non-standard Dynamo command line options used for tuning or activating alternative code paths (-force_raw and -use_rdtsc) are now consolidated in the new --flag option.
- Bug fixes:
- (Linux) The O_DIRECT flag was reintroducted for opening targets under Linux.
- (Linux) Patch by Jinpyo Kim enabling the use of libaio on Linux. The code path is controlled by IOMTR_SETTING_LINUX_LIBAIO and is enabled by default.
- (Linux) Removed stropts.h include for Linux, as this file is no longer available with newer Linux distributions.
- (OS X) Specialized the OS X makefile (Makefile-OSX.all) into Makefile-OSX.ppc and Makefile-OSX.i386, because otherwise builds on x86 are breaking due to the CPU architecture specific timer code.
- (All) Patch by Ryan Bever to fix the version check being performed when loading a ICF files. The new version format caused the check to fail when loading ICF files that were written by former versions of Iometer (see Bug Tracker
ID 3141394).
- (All) Patch by Daniel Scheibli to fix the PROCESSOR row format in the CSV file output (see Bug Tracker ID 3141400).
- Documentation:
- Converted Iometer User's Manual from Star Office based file (.sxw) to the Open Document Format (.odt)
- Others:
- (All) Reimplementation of handing of Dynamo command line option handling and the related help output (aka Syntax() function).
- (All) Minor changes to the initial puslar output. In particular the processor family information were cleaned up.
- Appended .txt extension to the capital letter files (CHANGELOG etc.)
- Rework of CHANGELOG file to clarify changes since version 2006.07.27.
------------------------
现象描述
采用Iometer 2006.07.27版本,在linux 系统上跑dynamo,这时对Iometer GUI界面的OutStanding I/O 数值无论设置为多少,性能数据均与设置为1时表现相当。并且Iometer 不管是采用Disk I/O(RAW),还是采用File I/O(Buffered/Cache)的读写场景。
原因解释
Iometer 2006.07.27版本中针对IOMTR_OS_LINUX类型的操作系统的磁盘I/O读写是采用异步IO方式(AIO)。Linux 系统的异步I/O实现方式主要是POSIX AIO和Native Kernel AIO两种。
这个Iometer版本的作者选择的是Glibc实现方式,而用户态的Glibc 实现异步I/O,是通过线程与线程之间可以异步工作的特性,使用新线程来完成多个异步I/O请求,最终模拟出异步I/O的处理。但是,这种实现存在一个问题,即是同一个fd的读写请求是由同一个异步处理线程来完成的,并且该异步处理线程是逐个处理这些请求。对于IO Scheduler 来说,它每一次只能处理一个请求,当该请求处理完毕之后,异步处理线程才会提交下一个(根据优先级排序)。Iometer
的OutStanding I/O (被选中Worker的每一磁盘一次允许的未处理的异步I/O数量,也叫队列深度)设置数值大于1时,由于采用Glibc实现方式,故所有异步I/O请求都是逐个处理,这样实际运行结果也就和OutStanding I/O 数值设置为1一致,甚至某些时候还略有降低(CPU资源紧张时)。
补充说明一下:针对IOMTR_OS_LINUX类型,iometer 2006.07.27和1.1.0 GA版本都设置了O_DIRECT Flag。changelog中说重新引入,不知道是参照从哪个rc版本来说的。该Flag的设置,意味着IO请求绕过文件系统缓存,直接访问磁盘设备。故,iometer 不适合测试Linux 系统下的各种文件系统性能。
1.1.0版本AI
4000
O新方案
iometer 1.1.0 GA版本已经正式采用Native kernel AIO方式,抛弃了争议颇多的Glibc AIO方式。
该方式允许所有IO请求直接提交给I/O Scheduler。当I/O请求数较多时,I/O Scheduler 采用不同的电梯算法来处理这些请求。但是Kernel AIO 目前支持Direct IO模式,而非Direct IO(buffer/cache)因为会增加block points,无法做到非阻塞。
iometer 1.1.0 GA版本采用了Linux Kernel AIO方式,同时仅支持Direct IO。所以说,该版本也并非完美的异步IO解决方案应用。但是,由于iometer 仅关注RAW 设备性能,所以即便目前AIO不支持Buffered IO,也没有什么大的影响。如果非要考虑存储系统cache 对性能的影响大小,可以采用其他的IO测试工具,如vdbench;也可以自行patch iometer 源代码。
iometer 1.1.0 GA 版本的IOCommon.h 文件中对aio的调用情况:
[code=cpp;toolbar:false">
相关文章推荐
- Ubuntu设置静态IP,解决重启后需要重新设置的问题。
- CustomError设置失效的问题
- Android使用ActivityGroup设置android:windowSoftInputMode失效的问题
- SQL Server 2008 阻止保存要求重新创建表的更改问题的设置方法
- 关于select函数中timeval和fd_s重新设置的问题
- css设置中文字体(font-family:"黑体")后样式失效问题
- Ubuntu设置静态IP,解决重启后需要重新设置的问题
- VIM设置Ctrl-s快捷键失效问题
- x264中重要结构体参数解释,参数设置,函数说明
- 《Ext JS高级程序设计》节选:在CRUD操作中restful的设置以及使用Ext.Direct的问题
- Ubuntu设置静态IP,解决重启后需要重新设置的问题
- 《Ext JS高级程序设计》节选:在CRUD操作中restful的设置以及使用Ext.Direct的问题
- hdoj 1728(bfs+hash)(修复原版的bug)(重要)(调试的问题多就重新书写)
- Android使用ActivityGroup设置android:windowSoftInputMode失效的问题
- 关于windows2008重新启动需要重新设置分辨率的问题
- 《Ext JS高级程序设计》节选:在CRUD操作中restful的设置以及使用Ext.Direct的问题
- 关于升级后药库中报表需要重新设置的问题
- thinkphp设置路由失效的问题
- IE下 设置body{overflow:hidden;}失效 问题解决
- TextBox设置OnTextChanged后验证控件失效问题的解决