日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > ChatGpt >内容正文

ChatGpt

AIX本地磁盘io优化

發(fā)布時間:2025/6/15 ChatGpt 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 AIX本地磁盘io优化 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

什么是磁盤的IO
當一塊磁盤被格式化后,會被分成上百個磁道(tracks),每個磁道又將被分割成許多扇區(qū)(sectors),一般都是512 bytes。上下一串盤片中,相同半徑的磁道所組成的一個圓柱型的環(huán)壁,就稱為柱面。

磁帶的讀寫過程主要包括三個部分:
尋道時間:磁盤頭從原始位置徑直移動到目標數(shù)據(jù)所在的磁道的時間(平均是8毫秒)
旋轉(zhuǎn)延遲時間:通過盤片的旋轉(zhuǎn),使得要讀取的扇區(qū)轉(zhuǎn)到讀寫頭的下方的時間。這個時間取決磁盤的轉(zhuǎn)數(shù),比如一塊7200(轉(zhuǎn)/分鐘)的硬盤,120轉(zhuǎn)/秒,一轉(zhuǎn)大概需要8毫秒,平均旋轉(zhuǎn)延遲是4毫秒。
傳輸時間:磁盤傳輸數(shù)據(jù)的時間,這個取決于磁盤接口速率,SATAFCSAS盤的接口帶寬都各不相同。比如2Gb/s的帶寬,8K的數(shù)據(jù)塊大概只需要0.004毫秒。

磁盤的IO=尋道時間+旋轉(zhuǎn)延遲時間+傳輸時間

?

一塊已經(jīng)固定磁盤無法去變更旋轉(zhuǎn)速率和傳輸時間,只能通過優(yōu)化數(shù)據(jù)的存放位置來減少尋道時間和平均旋轉(zhuǎn)延遲,從而加快磁盤的IO 速率。

?

AIX下的磁盤結(jié)構(gòu):

AIX操作系統(tǒng)將PV劃分成5個區(qū)域,這些區(qū)域與他們在硬盤磁盤自身上的位置對應:外側(cè)邊緣(out edge)、外側(cè)中間(outer middle)、中心(center)、內(nèi)側(cè)中間(inner middle)和內(nèi)側(cè)邊緣(inner edge)

PP是由一組大量的連續(xù)扇區(qū)組成,從1開始編號,out edgeinner edge根據(jù)磁盤的大小被分成了一定數(shù)量的PP數(shù)。5個區(qū)域分配的PP數(shù)量大致相等。如下:


# lspv -p hdisk1
hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-76 used outer edge fslv01 jfs2 /oracle
77-102 free outer edge
103-110 used outer edge lg_dumplv sysdump N/A
111-210 used outer middle hd6 paging N/A
211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
214-218 used outer middle fslv01 jfs2 /oracle
219-219 used outer middle hd11admin jfs2 /admin
220-220 used center hd8 jfs2log N/A
221-239 used center hd2 jfs2 /usr
240-243 used center hd9var jfs2 /var
244-323 used center hd3 jfs2 /tmp
324-324 used center hd1 jfs2 /home
325-328 used center hd10opt jfs2 /opt
329-330 used inner middle hd4 jfs2 /
331-437 free inner middle
438-464 free inner edge
465-504 used inner edge testlv jfs2 /test
505-546 free inner edge

總共有546PPS
outer edgePPS=110
outer middlePPS=109
centerPPS=109
inner middlePPS=109
inner edgePPS=109
其中/oracle 文件系統(tǒng)對應fslv01的被分配到了2個區(qū)域,前5PPouter middle區(qū)域,其他PPout edge中。

[html] viewplaincopyprint?

  • # lslv -p hdisk1 fslv01

  • hdisk1:fslv01:/oracle

  • USED 0006 0007 0008 0009 0010 0011 0012 0013 0014 1-10

  • 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 11-20

  • 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 21-30

  • 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 31-40

  • 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 41-50

  • 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 51-60

  • 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 61-70

  • 0075 0076 0077 0078 0079 0080 FREE FREE FREE FREE 71-80

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 81-90

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 91-100

  • FREE FREE USED USED USED USED USED USED USED USED 101-110

  • ?

  • USED USED USED USED USED USED USED USED USED USED 111-120

  • USED USED USED USED USED USED USED USED USED USED 121-130

  • USED USED USED USED USED USED USED USED USED USED 131-140

  • USED USED USED USED USED USED USED USED USED USED 141-150

  • USED USED USED USED USED USED USED USED USED USED 151-160

  • USED USED USED USED USED USED USED USED USED USED 161-170

  • USED USED USED USED USED USED USED USED USED USED 171-180

  • USED USED USED USED USED USED USED USED USED USED 181-190

  • USED USED USED USED USED USED USED USED USED USED 191-200

  • USED USED USED USED USED USED USED USED USED USED 201-210

  • USED USED USED 0001 0002 0003 0004 0005 USED 211-219

  • ?

  • USED USED USED USED USED USED USED USED USED USED 220-229

  • USED USED USED USED USED USED USED USED USED USED 230-239

  • USED USED USED USED USED USED USED USED USED USED 240-249

  • USED USED USED USED USED USED USED USED USED USED 250-259

  • USED USED USED USED USED USED USED USED USED USED 260-269

  • USED USED USED USED USED USED USED USED USED USED 270-279

  • USED USED USED USED USED USED USED USED USED USED 280-289

  • USED USED USED USED USED USED USED USED USED USED 290-299

  • USED USED USED USED USED USED USED USED USED USED 300-309

  • USED USED USED USED USED USED USED USED USED USED 310-319

  • USED USED USED USED USED USED USED USED USED 320-328

  • ?

  • USED USED FREE FREE FREE FREE FREE FREE FREE FREE 329-338

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 339-348

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 349-358

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 359-368

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 369-378

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 379-388

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 389-398

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 399-408

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 409-418

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 419-428

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE 429-437

  • ?

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 438-447

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 448-457

  • FREE FREE FREE FREE FREE FREE FREE USED USED USED 458-467

  • USED USED USED USED USED USED USED USED USED USED 468-477

  • USED USED USED USED USED USED USED USED USED USED 478-487

  • USED USED USED USED USED USED USED USED USED USED 488-497

  • USED USED USED USED USED USED USED FREE FREE FREE 498-507

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 508-517

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 518-527

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 528-537

  • FREE FREE FREE FREE FREE FREE FREE FREE FREE 538-546

  • # lslv -phdisk1 fslv01

    hdisk1:fslv01:/oracle

    USED????? 0006?????0007????? 0008????? 0009?????0010????? 0011????? 0012?????0013????? 0014??????????? 1-10

    0015????? 0016?????0017????? 0018????? 0019?????0020????? 0021????? 0022?????0023????? 0024??????????? 11-20

    0025????? 0026?????0027????? 0028????? 0029?????0030????? 0031????? 0032?????0033????? 0034??????????? 21-30

    0035????? 0036?????0037????? 0038????? 0039?????0040????? 0041????? 0042?????0043????? 0044??????? ????31-40

    0045????? 0046?????0047????? 0048????? 0049?????0050????? 0051????? 0052?????0053????? 0054??????????? 41-50

    0055????? 0056?????0057????? 0058????? 0059?????0060????? 0061????? 0062?????0063????? 0064??????????? 51-60

    0065????? 0066?????0067????? 0068????? 0069?????0070????? 0071????? 0072?????0073????? 0074??????????? 61-70

    0075????? 0076?????0077?? 0078????? 0079?????0080????? FREE????? FREE?????FREE????? FREE?????????????? 71-80

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????? 81-90

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????? 91-100

    FREE????? FREE?????USED????? USED????? USED?????USED????? USED????? USED?????USED ?????USED????????? 101-110

    ?

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 111-120

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 121-130

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 131-140

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 141-150

    USED????? USED?????USED????? USED ?????USED?????USED????? USED????? USED?????USED????? USED????????? 151-160

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED???????? 161-170

    USED????? USED?????USED????? USED????? USED?????USED????? USED??? ??USED?????USED????? USED????????? 171-180

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 181-190

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????? ????191-200

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 201-210

    USED????? USED?????USED????? 0001????? 0002?????0003????? 0004????? 0005?????USED??????????????????? 211-219

    ?

    USED????? USED?????USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED????????? 220-229

    USED????? USED?????USED?? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 230-239

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 240-249

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 250-259

    USED????? USED?????USED????? USED????? USED????USED????? USED????? USED?????USED? ????USED????????? 260-269

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 270-279

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 280-289

    USED? ????USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 290-299

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 300-309

    USED????? USED?????USED????? USED??? ??USED?????USED????? USED????? USED?????USED????? USED????????? 310-319

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED???????????????????? 320-328

    ?

    USED????? USED?????FREE????? FREE????? FREE?????FREE????? FREE?? ???FREE?????FREE????? FREE????????? 329-338

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 339-348

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE???? ?????349-358

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 359-368

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 369-378

    FREE????? FREE?????FREE????? FREE?????FREE????? FREE????? FREE??FREE????? FREE????? FREE???????????? 379-388

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 389-398

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 399-408

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE???? FREE????????? 409-418

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 419-428

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE??????????????????? 429-437

    ?

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 438-447

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 448-457

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? USED?????USED????? USED????????? 458-467

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED????????? 468-477

    USED????? USED????USED????? USED????? USED?????USED????? USED????? USED?????USED????? USED?????????? 478-487

    USED????? USED?????USED????? USED????? USED?????USED????? USED? ????USED?????USED????? USED????????? 488-497

    USED????? USED?????USED????? USED????? USED?????USED????? USED????? FREE?????FREE????? FREE????????? 498-507

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??? ??????508-517

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 518-527

    FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE????????? 528-537

    FREE????? FREE?????FREE????? FREE?????FREE????? FREE????? FREE?????FREE????? FREE??????????????????? 538-546




    由于中心是磁盤頭經(jīng)常通過的區(qū)域,所以越靠近中心,尋道時間就越短,從而加快整體的IO。而在out edge或者inner edge 的數(shù)據(jù)需要花費的尋道時間較長,從而導致應用程序的響應緩慢。

    雖然outer edge的尋道時間長,但是由于在圓的外道,圓周的速度最快,所以outer edge的順序讀寫速度更快些。

    ?

    下面測試下:

    先將/dev/ fslv01的前5pp移到out edge中:

    ?

    #migratelp fslv01/1 hdisk1/77
    # migratelp fslv01/2 hdisk1/78
    # migratelp fslv01/3 hdisk1/79
    #migratelp fslv01/4 hdisk1/80
    # migratelp fslv01/5 hdisk1/81

    # lspv -p hdisk1
    hdisk1:
    PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
    1-1 used outer edge hd5 boot N/A
    2-81 used outer edge fslv01 jfs2 /oracle
    82-102 free outer edge
    103-110 used outer edge lg_dumplv sysdump N/A
    111-210 used outer middle hd6 paging N/A
    211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
    212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
    214-218 free outer middle
    219-219 used outer middle hd11admin jfs2 /admin
    220-220 used center hd8 jfs2log N/A
    221-239 used center hd2 jfs2 /usr
    240-243 used center hd9var jfs2 /var
    244-323 used center hd3 jfs2 /tmp
    324-324 used center hd1 jfs2 /home
    325-328 used center hd10opt jfs2 /opt
    329-330 used inner middle hd4 jfs2 /
    331-437 free inner middle
    438-464 free inner edge
    465-504 used inner edge testlv jfs2 /test
    505-546 free inner edge

    /oracle 文件系統(tǒng)已經(jīng)全部位于out edge中了,選擇/oracle/tmp /test 進行測試:

    ?

    先對outer edge進行測試:
    #time dd if=/dev/zero of=/oracle/test bs=1024k count=4096
    real 0m46.03s
    user 0m0.03s
    sys 0m11.36s
    消耗時間為:46.03
    Topas監(jiān)控到的磁盤IO 88.6M


    接著對center進行測試:
    #time dd if=/dev/zero of=/tmp/test bs=1024k count=4096
    real 0m53.29s
    user 0m0.02s
    sys 0m12.16s
    消耗時間為:53.29s
    Topas監(jiān)控到的磁盤IO 77M

    最后看下inner edge
    #time dd if=/dev/zero of=/test/test bs=1024k count=4096
    real 1m5.75s
    user 0m0.02s
    sys 0m12.43s

    消耗時間為:15.75

    Topas監(jiān)控到的磁盤IO 只有62M

    ?

    由此看出,對于順序讀寫,Outer edge的確有很大的優(yōu)勢。再來做一個測試,將oraclelv拆分到多個區(qū)域,進行測試,類似如下:

    [html] viewplaincopyprint?

  • # for i in 2 3 4 5 6 7 8 9

  • > do migratelp fslv01/$i hdisk1/33$i

  • > done

  • migratelp: Mirror copy 1 of logical partition 2 of logical ? ? volume

  • fslv01 migrated to physical partition 332 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 3 of logical ? ? volume

  • fslv01 migrated to physical partition 333 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 4 of logical ? ? volume

  • fslv01 migrated to physical partition 334 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 5 of logical ? ? volume

  • fslv01 migrated to physical partition 335 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 6 of logical ? ? volume

  • fslv01 migrated to physical partition 336 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 7 of logical ? ? volume

  • fslv01 migrated to physical partition 337 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 8 of logical ? ? volume

  • fslv01 migrated to physical partition 338 of hdisk1.

  • migratelp: Mirror copy 1 of logical partition 9 of logical ? ? volume

  • fslv01 migrated to physical partition 339 of hdisk1.

  • # for iin??? 2 3 4 5 6 7 8 9?

    > domigratelp fslv01/$i hdisk1/33$i

    > done

    migratelp:Mirror copy 1 of logical partition 2 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 332 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 3 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 333 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 4 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 334 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 5 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 335 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 6 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 336 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 7 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 337 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 8 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 338 of hdisk1.

    migratelp:Mirror copy 1 of logical partition 9 of logical volume

    ??????????????? fslv01 migrated to physicalpartition 339 of hdisk1.

    ?

    查看下/oracle 文件系統(tǒng)的pp分布:

    ?

    #lspv -p hdisk1
    hdisk1:
    PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
    1-1 used outer edge hd5 boot N/A
    2-36 free outer edge
    37-59 used outer edge fslv01 jfs2 /oracle
    60-66 free outer edge
    67-84 used outer edge fslv01 jfs2 /oracle
    85-86 free outer edge
    87-102 used outer edge fslv01 jfs2 /oracle
    103-110 used outer edge lg_dumplv sysdump N/A
    111-210 used outer middle hd6 paging N/A
    211-211 used outer middle fwdump jfs2 /var/adm/ras/platform
    212-213 used outer middle livedump jfs2 /var/adm/ras/livedump
    214-218 used outer middle fslv01 jfs2 /oracle
    219-219 used outer middle hd11admin jfs2 /admin
    220-220 used center hd8 jfs2log N/A
    221-239 used center hd2 jfs2 /usr
    240-243 used center hd9var jfs2 /var
    244-323 used center hd3 jfs2 /tmp
    324-324 used center hd1 jfs2 /home
    325-328 used center hd10opt jfs2 /opt
    329-330 used inner middle hd4 jfs2 /
    331-339 used inner middle fslv01 jfs2 /oracle
    340-437 free inner middle
    438-464 free inner edge
    465-504 used inner edge testlv jfs2 /test
    505-510 free inner edge
    511-519 used inner edge fslv01 jfs2 /oracle
    520-546 free inner edge

    /oracle 目錄被分配到了4個區(qū)域,測下順序IO
    #time dd if=/dev/zero of=/oracle/test bs=1024k count=4096
    real 0m53.32s
    user 0m0.02s
    sys 0m12.60s
    IO 速度有所下降。如果是隨機IO,磁盤頭進行的尋道時間會大大的增加,IO 的速率就會受到很大的影響。

    ?

    優(yōu)化規(guī)則:

    通過以上的磁盤尋道原理和AIXLVM磁盤管理方式,優(yōu)化本地磁盤應該遵循以下規(guī)則:

    1. LV 盡可能保持連續(xù)。當文件系統(tǒng)數(shù)據(jù)分散在一個磁盤上時,硬盤頭需要花費更長的時間在尋道時間和旋轉(zhuǎn)延遲上。如果 LV 存在于一個連續(xù)的區(qū)域,會最大程度地縮短搜索時間,更快地找到文件。這就要求最好是一次性建好足夠大的LV,而不是經(jīng)常去擴空間。

    2. 將具有高 I/O、順序讀取或?qū)懭氩僮鞯?/span>LV 放在外側(cè)邊緣。由于磁盤外側(cè)邊緣的速度因素,如果 LV 需要更快讀取或?qū)懭胼^長序列(比如大型靜態(tài)文件或數(shù)據(jù)表內(nèi)容)中的數(shù)據(jù),外側(cè)邊緣的更高旋轉(zhuǎn)速度會有所幫助。
    3.將具有高活躍度的 LV 放在靠近中心位置。如果您有一個文件系統(tǒng)具有大量讀取和寫入操作,并且需要快速響應,盡量分布在中心附近。如果空間足夠?qū)?/span>swap空間也放在該區(qū)域。
    4.將使用率較低的 LV 放在內(nèi)部邊緣附近。如果您的文件系統(tǒng)很少使用或訪問,那么可以將它們放在具有最低 I/O 速度的磁盤區(qū)域內(nèi)(內(nèi)部邊緣上接近主軸的區(qū)域)。例如,很少使用的邏輯卷很適合放在這里。
    5. 當存在多個swap 分區(qū)時,一塊磁盤最好只分配一個swap分區(qū),而且大小要相等,從而減少跨區(qū)域的lv操作,增大IO 負擔。
    6.如果可能將兩個磁盤分別創(chuàng)建一個獨立的分頁空間 LV,那么每個磁盤均可解決內(nèi)存交換,效率將會翻倍。
    7.盡可能分散 I/O 負載,以提高性能和冗余。如果您有一個較大的系統(tǒng)具有多個硬盤,可以通過將數(shù)據(jù)分散在一組磁盤組合中開利用它們。如果您選擇鏡像您的 PV,可以在多個硬盤上這么做,以便如果一個磁盤抽屜(drawer)出現(xiàn)故障,冗余不會限制到一個硬盤。參考參數(shù)range of physical volumesminimummaximum

    磁盤優(yōu)化的常用工具:

    ?

    查看工具:

    1. 使用lsvg 查看VG的信息

    查看所有的VG

    #lsvg

    查看激活的VG

    #lsvg –o

    查看VG的總體信息:

    #lsvg rootvg

    查看VGlv的信息

    # lsvg -l rootvg

    查看VGPV中的分布

    #lsvg –p rootvg

    2.lspv用來查看某塊磁盤的信息,如PVIDPP的大小、包含的LV數(shù)目、5個區(qū)域中PP的使用情況等等。如:

    查看PV總體信息:

    # lspv -L hdisk1

    查看PVLVLPsPPs、以及5個區(qū)域的總體分布大小

    # lspv -l hdisk1

    詳細查看PV中每個PP的使用情況:

    #lspv –p hdisk1

    3. lslv用來查看某個LV的特征、狀態(tài)以及其PPsPV中的詳細分布

    查看LV的總體信息:

    #lslv –L fslv01

    查看LVPV中的分布信息:

    #lslv –p hdisk1 fslv00

    查看LV的鏡像在各個磁盤上的分布

    #lslv –l fslv00

    查看LVLP對應的PP的分布信息

    #lslv –m fslv00

    遷移工具:

    1. chlvsmit chlv用來更改LV的屬性,及PPPV上的分布,使得LVPP盡可能變的連續(xù)。

    #chlv -a e -e x -r y -s n -u 5 fslv00

    2. migratepv用來遷移PV上的LV到其他PVs 比如將hdisk1上的LV遷移到hdisk6hdisk7

    #migratepv hdisk1 hdisk6 hdisk7

    lv01 hdisk1遷移到hdisk6

    #migratepv –l lv01 hdisk1 hdisk6

    ?

    3. migratelp用來遷移LV上的某個lp到指定的PVpp

    比如將lv01 上的第一個LP遷移到 hdisk1上的第100PP

    #migratelp lv01/1 hdisk1/100

    lv01 上的第3LP的第二個鏡像拷貝遷移到hdisk1

    #migratelp lv01/3/2 hdisk1

    ?

    4. mirrorvgunmirror

    vg生成3份鏡像

    #mirrorvg -c 3 datavg

    生成默認鏡像(2份)

    #mirrorvg datavg

    更換鏡像的壞盤

    #unmirrorvg datavg hdisk7

    #reducevg datavg hdisk7

    #rmdev -dl hdisk7

    #extendvg datavg hdisk7

    #mirrorvg datavg hdisk7

    在指定的PV上生成鏡像

    #mirrorvg -m datavg hdisk2

    將鏡像工作放入后臺運行

    #mirrorvg –S workvg

    5. Mklvcopy 用來單獨將某個LV進行復制

    比如將lv01 hdisk1middle區(qū)域創(chuàng)建一個鏡像

    #mklvcopy –a m –m lv01 hdisk1

    ?

    6. reorgvg [-i],-i 參數(shù)用于3塊以上PV重組,在重組時,臨時文件存放在/tmp目錄下確保/tmp目錄的空間大小。

    重組整個vg

    #reoravg rootvg

    重組指定LV

    #reoravg rootvg lv01 lv02 v03

    重組指定PV上的LV

    #echo "hdisk4 hdisk6" | reorgvg-i vg02 lv203 lv205


    轉(zhuǎn)自:http://blog.csdn.net/lixz_2008/article/details/7855049

    總結(jié)

    以上是生活随笔為你收集整理的AIX本地磁盘io优化的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。