Optimizing database IO using AIX strip

Source: Internet
Author: User

I. background

The production environment IBM P560 is currently used on the standby machine of Oracle universal uard. When oracle applies archive logs, check the server I/O and find that the I/O on Hdisk0 and 1 can sometimes reach 100%. There are very few I/O activities on Hdisk2 and 3.

After analysis, the oracle data file storage directory is stored in/oradata, which is created on hdisk0 and 1. Therefore, when the database reads and writes data files, only hdisk0 and 1 have IO. The other two disks have less I/O activity. Therefore, we want to migrate database files from rootvg and create database archive files in rootvg to evenly deploy the server IO.

Ii. theoretical support

Generally, the storage managed by LVM may have many PVS in one vg. Similarly, one lv may span multiple PVS. In order to speed up hard disk storage, the strip technology is used to divide continuous data into data blocks of the same size and store them on various PVS in sequence. Similar to RAID0, the storage speed is faster. But it does not make data as dangerous and easy to lose as RAID0, because in formal use, it will not make multiple hard disks into a vg as it is tested at this time without any guarantee, it is a commonly connected back-end storage. RAID5 or RAID1 has been prepared on the physical hard disk before the LUN is divided, and multiple Luns have been divided based on RAID5 or RAID1, that is, the pv on the system. Even if the hard disk where the pv is located is damaged, the underlying hard RAID redundancy does not cause data loss.

Stripe unit size: the size of each stripe unit in a striped LV, corresponding to the size of data blocks in I/O. For Oracle, db_block_size is the set data block size. While db_file_multiblock_read_count is the maximum number of parallel data blocks during one read, and db_block_size and db_file_multiblock_read_count are multiplied by the total I/O size. The size cannot exceed the maximum I/O (max_io_size) value of the operating system. In ORACLE applications, the lv strip size is generally set to twice or more than twice the size of the Oracle block, because if it is set to the same size as the Oracle data block, it cannot be ensured that the boundary of Oracle data blocks exactly corresponds to the boundary of the Strip unit. Otherwise, a large number of I/O segments are processed by two strip units.

The principle of strip size: in the case of high concurrency and small I/O requests, a physical hard disk processes multiple I/O requests, with low concurrency but large I/O requests, multiple hard disks may be required to process one I/O Request. In principle, one I/O request can be processed at a time.

This is probably the concept of striping.

Iii. Parameter Extraction

  1. P560A:/# lspv
  2. Hdisk0 00c3ee9e3439bc67 rootvg active
  3. Hdisk1 00c3ee9e5033384d rootvg active
  4. Hdisk2 00c3ee9eae48cc48 rootvg active
  5. Hdisk3 00c3ee9eae48df75 rootvg active
  6.  
  7. P560A:/# lspv-l hdisk0
  8. Hdisk0:
  9. LVNAMELPs PPs DISTRIBUTION MOUNT POINT
  10. Hd10opt 8 8 00... 00... 08... 00 .. 00/opt
  11. Hd3 40 40 00... 00... 40... 00... 00/tmp
  12. Hd1 4 4 00... 00... 04... 00... 00/home
  13. Hd2 16 16 00... 00... 16... 00... 00/usr
  14. Hd9var 4 4 00... 00... 04... 00 .. 00/var
  15. Hd8 1 1 00... 00... 01... 00... 00 N/
  16. Hd4 4 4 00... 00... 04... 00... 00/
  17. Hd5 1 1 01... 00... 00... 00... 00 N/
  18. Hd6 32 32 00... 00... 32... 00... 00 N/
  19. Tsmdb 30 30 20... 10... 00... 00 .. 00/tsmdb
  20. Oradatalv 278 278 49 .. 11 .. 00 .. 109 .. 109/oradata
  21. Oraclelv 40 40 40... 00... 00... 00 .. 00/home/oracle
  22. Weblogiclv 40 40 00... 40... 00... 00 .. 00 .. 00/weblogic
  23. Weblogic9lv 40 40 00... 40... 00... 00 .. 00/weblogic9
  24. Lg_dumplv 8 8 00... 08... 00... 00... 00 N/
  25.  
  26. P560A:/# lspv-l hdisk1
  27. Hdisk1:
  28. LVNAMELPs PPs DISTRIBUTION MOUNT POINT
  29. Hd10opt 8 8 00... 00... 08... 00 .. 00/opt
  30. Hd3 40 40 00... 00... 40... 00... 00/tmp
  31. Hd1 4 4 00... 00... 04... 00... 00/home
  32. Hd2 16 16 00... 00... 16... 00... 00/usr
  33. Hd9var 4 4 00... 00... 04... 00 .. 00/var
  34. Hd8 1 1 00... 00... 01... 00... 00 N/
  35. Hd4 4 4 00... 00... 04... 00... 00/
  36. Hd5 1 1 01... 00... 00... 00... 00 N/
  37. Hd6 32 32 00... 00... 32... 00... 00 N/
  38. Tsmdb 30 30 20... 10... 00... 00 .. 00/tsmdb
  39. Oradatalv 324 324 89 .. 17 .. 00 .. 109 .. 109/oradata
  40. Fwdump 2 2 00... 02... 00... 00 .. 00/var/adm/ras/platform
  41. Weblogiclv 40 40 00... 40... 00... 00 .. 00 .. 00/weblogic
  42. Weblogic9lv 40 40 00... 40... 00... 00 .. 00/weblogic9
  43.  
  44. P560A:/# lspv-l hdisk2
  45. Hdisk2:
  46. LVNAMELPs PPs DISTRIBUTION MOUNT POINT
  47. Oradatalv 598 598 152... 223... 223... 00... 00/oradata
  48.  
  49. P560A:/# lspv-l hdisk3
  50. Hdisk3:
  51. LVNAMELPs PPs DISTRIBUTION MOUNT POINT
  52. Archlog_lv 400 400 00 .. 223 .. 177 .. 00 .. 00/archivelog
  53.  
  54. P560A:/# lslv-l oradatalv
  55. Oradatalv:/oradata
  56. PV COPIESINBAND DISTRIBUTION
  57. Hdisk0 278: 000: 000 3% 049: 011: 000: 109: 109
  58. Hdisk1 324: 000: 000 5% 089: 017: 000: 109: 109
  59. Hdisk2 598: 000: 000 37% 152: 223: 223: 000: 000
  60.  
  61. P560A:/# lslv-l oraclelv
  62. Oraclelv:/home/oracle
  63. PV COPIESINBAND DISTRIBUTION
  64. Hdisk0 040: 000: 000 0% 040: 000: 000: 000: 000
  65.  
  66. P560A:/# lslv-l archlog_lv
  67. Archlog_lv:/archivelog
  68. PV COPIESINBAND DISTRIBUTION
  69. Hdisk3 400: 000: 000 55%: 223: 177: 000: 000
  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.