亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    AIX掛載NFS寫入效率低的解決方案

    背景: Linux是NFS的Server端,AIX是NFS的Client端(此外,有一個Linux也作為Client端對比測試)。

    • 1.NFS對應(yīng)的底層設(shè)備是閃存卡,本地測試I/O寫性能可達(dá)2GB/s;
    • 2.服務(wù)器是千兆網(wǎng)卡,F(xiàn)TP測試傳輸可達(dá)到100MB/s;
    • 3.AIX成功掛載NFS,dd測試寫入速度只有10MB/s;
    • 4.Linux成功掛載NFS,同樣dd測試寫入速度可達(dá)到100MB/s;

    說明:以上速度主要是體現(xiàn)數(shù)量級的差異,實際測試會有少許偏差。

    具體環(huán)境:
    NFS Server:RHEL 6.8
    NFS Client:AIX 6.1、RHEL 6.8

    掛載參數(shù)均依據(jù)MOS文檔配置:

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

    根據(jù)本次實際需求,提煉一下需要配置的參數(shù):

    –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的掛載參數(shù):

    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.

    查資料確認(rèn)AIX需要額外設(shè)置網(wǎng)絡(luò)參數(shù):

    # 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

    所有參數(shù)都是根據(jù)實際需求,按照MOS的建議設(shè)置的。有什么問題嗎?

    • 嘗試去掉cio參數(shù)測試,發(fā)現(xiàn)結(jié)果幾乎沒變化;
    • 嘗試去掉hard參數(shù)測試,發(fā)現(xiàn)結(jié)果幾乎沒變化;
    • 嘗試協(xié)議從tcp改為udp測試,發(fā)現(xiàn)結(jié)果幾乎沒變化;

    幾乎能試的參數(shù)都試了,結(jié)果都不理想,馬上都準(zhǔn)備協(xié)調(diào)資源找主機(jī)工程師定位了。

    此時,靈感乍現(xiàn),突然想到一個可能性。有沒有可能AIX上的NFS限制了單個進(jìn)程的I/O吞吐能力?帶著這個猜測,進(jìn)行并行測試:
    開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

    驚喜的發(fā)現(xiàn)5個窗口都在55s同時完成,這相當(dāng)于800M*5=4000M,都在55s完成,每秒達(dá)到72MB/s,通過這種并行的方式已滿足提升效率的需求。
    而且看起來只要繼續(xù)嘗試多開窗口測試,基本也能達(dá)到網(wǎng)絡(luò)上限100MB/s(千兆網(wǎng)卡限制)。

    附:測試同樣的NFS掛載到另一臺Linux服務(wù)器上,無需并行,dd寫入速度就可達(dá)100MB/s,這也是之前影響自己思考的因素。
    Linux NFS的掛載參數(shù):

    # 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的測試結(jié)果:

    –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不熟悉,沒有進(jìn)一步深究底層原理。開始解決問題過程中的主要困惑在于,為何Linux作為client時,無需并行就可以dd測試達(dá)到100MB/s的速度,使自己陷入了固有思維中。從這件事情得到的思考是:有些時候,要跳出常規(guī)思維去思考方可有所突破。
    最后把NFS Server端本地測試的結(jié)果也貼出來,感嘆下閃存卡的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

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號