背景: Linux是NFS的Server端,AIX是NFS的Client端(此外,有一个Linux也作为Client端对比测试)。

  • 1.NFS对应的底层设备是闪存卡,本地测试I/O写性能可达2GB/s;
  • 2.服务器是千兆网卡,FTP测试传输可达到100MB/s;
  • 3.AIX成功挂载NFS,dd测试写入速度只有10MB/s;
  • 4.Linux成功挂载NFS,同样dd测试写入速度可达到100MB/s;

说明:以上速度主要是体现数量级的差异,实际测试会有少许偏差。

具体环境:

NFS Server:RHEL 6.8

NFS Client:AIX 6.1、RHEL 6.8

挂载参数均依据MOS文档配置:

  • Mount Options for Oracle files for RAC databases and Clusterware when used with NFS on NAS devices (文档 ID 359515.1)

根据本次实际需求,提炼一下需要配置的参数:

--MOS建议(AIX):

cio,rw,bg,hard,nointr,rsize=32768,

wsize=32768,proto=tcp,noac,

vers=3,timeo=600

--MOS建议(Linux):

rw,bg,hard,nointr,rsize=32768,

wsize=32768,tcp,actimeo=0,

vers=3,timeo=600

AIX NFS的挂载参数:

mount -o cio,rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3,timeo=600 10.xx.xx.212:/xtts /xtts

直接挂载提示如下错误:

# mount -o cio,rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3,timeo=600 10.xx.xx.212:/xtts /xtts
mount: 1831-008 giving up on:
10.xx.xx.212:/xtts
vmount: Operation not permitted.

查资料确认AIX需要额外设置网络参数:

# nfso -p -o nfs_use_reserved_ports=1

再次尝试挂载成功:

mount -o cio,rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3,timeo=600 10.xx.xx.212:/xtts /xtts

可dd测试的速度非常不理想,只有10MB/s:

--test performance; AIX NFS
# time dd if=/dev/zero of=/xtts/test-write bs=8192 count=102400
102400+0 records in.
102400+0 records out. real 0m43.20s
user 0m0.79s
sys 0m5.28s
# time dd if=/xtts/test-write of=/dev/null bs=8192 count=102400
102400+0 records in.
102400+0 records out. real 0m30.86s
user 0m0.84s
sys 0m5.88s

所有参数都是根据实际需求,按照MOS的建议设置的。有什么问题吗?

  • 尝试去掉cio参数测试,发现结果几乎没变化;
  • 尝试去掉hard参数测试,发现结果几乎没变化;
  • 尝试协议从tcp改为udp测试,发现结果几乎没变化;

几乎能试的参数都试了,结果都不理想,马上都准备协调资源找主机工程师定位了。

此时,灵感乍现,突然想到一个可能性。有没有可能AIX上的NFS限制了单个进程的I/O吞吐能力?带着这个猜测,进行并行测试:

开5个窗口同时开始dd:

time dd if=/dev/zero of=/xtts/test-write1 bs=8192 count=102400
time dd if=/dev/zero of=/xtts/test-write2 bs=8192 count=102400
time dd if=/dev/zero of=/xtts/test-write3 bs=8192 count=102400
time dd if=/dev/zero of=/xtts/test-write4 bs=8192 count=102400
time dd if=/dev/zero of=/xtts/test-write5 bs=8192 count=102400

惊喜的发现5个窗口都在55s同时完成,这相当于800M*5=4000M,都在55s完成,每秒达到72MB/s,通过这种并行的方式已满足提升效率的需求。

而且看起来只要继续尝试多开窗口测试,基本也能达到网络上限100MB/s(千兆网卡限制)。

附:测试同样的NFS挂载到另一台Linux服务器上,无需并行,dd写入速度就可达100MB/s,这也是之前影响自己思考的因素。

Linux NFS的挂载参数:

# mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 10.xx.xx.212:/xtts /xtts

Linux NFS的测试结果:

--test performance; Linux NFS
# dd if=/dev/zero of=/xtts/test-write bs=8192 count=102400
102400+0 records in
102400+0 records out
838860800 bytes (839 MB) copied, 6.02451 s, 139 MB/s
# dd if=/xtts/test-write of=/dev/null bs=8192 count=102400
102400+0 records in
102400+0 records out
838860800 bytes (839 MB) copied, 8.55925 s, 98.0 MB/s

对AIX不熟悉,没有进一步深究底层原理。开始解决问题过程中的主要困惑在于,为何Linux作为client时,无需并行就可以dd测试达到100MB/s的速度,使自己陷入了固有思维中。从这件事情得到的思考是:有些时候,要跳出常规思维去思考方可有所突破。

最后把NFS Server端本地测试的结果也贴出来,感叹下闪存卡的I/O能力:

# dd if=/dev/zero of=/dev/test-write2 bs=8192 count=1024000
1024000+0 records in
1024000+0 records out
8388608000 bytes (8.4 GB) copied, 4.19912 s, 2.0 GB/s

AIX挂载NFS写入效率低效解决的更多相关文章

  1. aix挂载centos 的nfs

    centos作为服务器,提供nfs文件系统,aix作为客户端,挂载centos的指定目录 (1)NFS的安装配置:centos 5 : yum -y install nfs-utils portmap ...

  2. 解决windows 挂载 nfs 驱动器中 中文乱码问题

    乱码问题,是由于 mount.nfs 命令不支持 utf-8字符集.所以是系统软件支持的问题.在网络上找了很多方案都没能解决. 网上主要有三种方案(1)换解决方案,使用smb 共享,这等于不是解决方法 ...

  3. Appro DM8127 IPNC 挂载NFS遇到的问题及解决

    对于Appro DM8127 IPNC,默认的启动方式是NAND is used for booting kernel and NAND is used as root filesystem 为了调试 ...

  4. Ubuntu14.04和Tiny6410挂载NFS服务!

    我是以root身份登录Ubuntu的: 在Ubuntu上执行   #apt-get install nfs-kernel-server    //安装NFS服务 在Ubuntu上执行   #mkdir ...

  5. 开发板挂载nfs服务器错误解析

    输入mount -t nfs 192.168.1.110:/home/work /mnt,这时可能会出现 mount.nfs:access denied by server while mountin ...

  6. Windows挂载NFS共享盘

    Centos7添加NFS方法请见如下链接: https://www.cnblogs.com/jackyzm/p/10285845.html 一:添加NFS服务 1.1:此电脑-右键-管理-window ...

  7. rhce 第十一题 挂载NFS共享

    挂载NFS共享 在system2上挂载一个来自 system1.group8.example.com 的NFS共享,并符合下列要求: /public 挂载在/mnt/nfsmount目录上 /prot ...

  8. Ubuntu16.04 中如何挂载第二块磁盘,挂载成功,但是用reboot和shutdown重启或关机后挂载就没有了的解决办法

    本测试机有4块硬盘,初始意图想做一个磁盘阵列,但是在安装系统的时候不知道引导文件如何选择安装,所以暂时不使用磁盘阵列(后期研究) 检测硬盘能否被识别 root@ranxf:/# fdisk -l Di ...

  9. windows挂载nfs

    注意:Win10 Creators Update前只有Win10企业版可以挂载NFS, Creators Update后专业版也可挂载NFS了. 安装 按Win+R输入OptionalFeatures ...

随机推荐

  1. HDU 5954 - Do not pour out - [积分+二分][2016ACM/ICPC亚洲区沈阳站 Problem G]

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5954 Problem DescriptionYou have got a cylindrical cu ...

  2. [No0000B1]ReSharper操作指南2/16-ReSharper食谱与特定于域的教程

    自动导入名称空间 有关更多信息,请参阅导入缺少命名空间. 每当您使用未添加using语句的命名空间中的类型时,ReSharper会为您提供在您所在文件的顶部添加相应的语句.这由在所使用的类型上方显示的 ...

  3. 看数据库的文件大小 MySQL Binlog日志的生成和清理规则

    小结: 1.避免并行大大事务对磁盘.内存的消耗: MySQL数据文件导致实例空间满的解决办法_空间/内存_常见问题_云数据库 RDS 版-阿里云 https://help.aliyun.com/kno ...

  4. Diagnosing out of memory errors and memory leaks 内存泄露实例 C Java JavaScript 内存泄露

    小结: 1. 数据库连接池. JDBC语句和结果对象必须显式地关闭. 2. 电梯到目标楼层后地址是否被释放 When a button is pressed: Get some memory, whi ...

  5. shell 文件描述符

    /tmp/test.sh > /tmp/test.log 2>&1 这个命令的意思是 前半部分是将shell的输出重定向到/tmp/test/log.默认是标准输出(stdout文 ...

  6. iOS-方法之+ initialize 与 +load

    Objective-C 有两个神奇的方法:+load 和 +initialize,这两个方法在类被使用时会自动调用.但是两个方法的不同点会导致应用层面上性能的显著差异. 一.+ initialize ...

  7. [development][suricata] linux下一代权限控制 capabilities

    读suricata源码过程中,  读到了 libcap-ng 应该就是anthroid手机,每次安装app时候, 询问的那个capablities.....吧.... 中文文档: http://rk7 ...

  8. DBGridEh使用指南改变边框颜色

    DBGridEh使用指南 鹅倌0人评论422人阅读2012-08-06 15:17:59   1.设置表头,是否允许多表头,设置是否只读. dbgrdh1.TitleFont.Color:=clBlu ...

  9. SpringMVC 的使用映射路径 <mvc:resources >

    以下是测试结果,可能存在纰漏,暂记录一下. 使用springMVC时,一般将DispatcherServlet请求映射配置为"/",则Spring MVC将捕获Web容器所有的请求 ...

  10. 抽屉之Tornado实战(1)--分析与架构

    抽屉之Tornado实战(1)--分析与架构   项目模拟地址:http://dig.chouti.com/ 知识点应用: AJAX  用于偷偷发请求 原生ajax jQuery  ajax($.aj ...