WO2013091570A1 - I/o平衡处理方法和设备 - Google Patents

I/o平衡处理方法和设备 Download PDF

Info

Publication number
WO2013091570A1
WO2013091570A1 PCT/CN2012/087153 CN2012087153W WO2013091570A1 WO 2013091570 A1 WO2013091570 A1 WO 2013091570A1 CN 2012087153 W CN2012087153 W CN 2012087153W WO 2013091570 A1 WO2013091570 A1 WO 2013091570A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
data
disk
data table
disks
Prior art date
Application number
PCT/CN2012/087153
Other languages
English (en)
French (fr)
Inventor
赵春阳
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP12859046.0A priority Critical patent/EP2674852B1/en
Publication of WO2013091570A1 publication Critical patent/WO2013091570A1/zh
Priority to US14/143,729 priority patent/US9460749B2/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/12Formatting, e.g. arrangement of data block or words on the record carriers
    • G11B20/1217Formatting, e.g. arrangement of data block or words on the record carriers on discs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Definitions

  • the present invention relates to computer technology, and in particular, to an I/O balance processing method and apparatus.
  • TPC Transaction Processing Performance Council
  • the Transaction Processing Performance Council (TPC)-C test is a basic procedure for testing the performance of online transaction processing built into relational databases. Since the input/output (I/O) performance of the storage unit can improve storage utilization, reduce total cost of ownership (TCO), and effectively avoid database performance problems, The I/O performance of this storage unit is a major consideration in the TPC-C test.
  • I/O balanced deployment can fully utilize the I/O performance of the storage unit, so database vendors and storage vendors have database and storage.
  • the I/O balance deployment solution for example: Some manufacturers use the automatic storage management (ASM) of the Oracle database to implement I/O balanced deployment.
  • ASM automatic storage management
  • a first aspect of the present invention provides an I/O balance processing method, including:
  • the storage request message includes: a data table, an estimated capacity of the data table, a size of a data block corresponding to the data table, and a disk identifier storing the data table; wherein the data table includes At least one data file;
  • the estimated capacity of the data table the size of the data block corresponding to the data table, and the disk label Obtaining the total number of the corresponding disks, and acquiring the database information, where the database information includes: an estimated capacity of the data table in a disk corresponding to each of the disk identifiers, and a data file in the disk corresponding to each of the disk identifiers Number and size of the data file;
  • N and m are integers, and both are greater than or equal to 1.
  • an I/O balance processing apparatus including:
  • a dividing module configured to divide N LUs on the disk, set m LUs as data disks, and set N-m LUs as reserved disks;
  • a receiving module configured to receive a storage request message, where the storage request message includes: a data table, an estimated capacity of the data table, a size of a data block corresponding to the data table, and a disk identifier storing the data table;
  • the data table includes at least one of the data files;
  • An I/O balance processing module configured to acquire database information according to an estimated capacity of the data table, a size of a data block corresponding to the data table, and a total number of disks corresponding to the disk identifier, where the database information includes: The estimated capacity of the data table in the disk corresponding to each of the disk identifiers, the number of data files in the disk corresponding to each of the disk identifiers, and the size of the data file;
  • a database creation module configured to generate a first shell script according to the storage request message and the database information, and create a database according to the first shell script
  • N and m are integers, and both are greater than or equal to 1.
  • the technical effect of the present invention is: by dividing the N LUs on the disk, setting m LUs as data disks, and setting Nm LUs as reserved disks; receiving a storage request message, and according to the storage request message
  • the estimated capacity of the data table, the size of the data block corresponding to the data table, and the total number of disks corresponding to the disk identifier obtain database information, and then generate a first shell script according to the storage request message and the database information, and according to the first shell Scripts, creating databases, because of the division of the disk, the capacity is thus relatively balanced deployment, taking up less storage space on the disk, thereby improving storage utilization.
  • FIG. 1 is a flowchart of an embodiment of an I/O balance processing method according to the present invention
  • FIG. 2 is a schematic diagram of storage partitioning in a relational database
  • 3 is a flow chart of another embodiment of an I/O balance processing method according to the present invention
  • FIG. 4 is a schematic structural diagram of an embodiment of an I/O balance processing device according to the present invention.
  • FIG. 5 is a schematic structural diagram of another embodiment of an I/O balance processing apparatus according to the present invention.
  • FIG. 1 is a flowchart of an embodiment of an I/O balance processing method according to the present invention. As shown in FIG. 1, the method in this embodiment is mainly applied to a relational database, and the method includes:
  • Step 101 Divide the N LUs on the disk, set m LUs as data disks, and set N-m LUs as reserved disks.
  • N and m are integers, and both are greater than or equal to 1.
  • the hard disks corresponding to the storage in the relational database are grouped, and each group has a Redundant Array of Independent Disk (RAID) controller, and the mapped hard disks are mapped.
  • RAID Redundant Array of Independent Disk
  • FIG. 2 is a schematic diagram of storage partitioning in a relational database.
  • the storage disks corresponding to the storage in the relational database are divided into four groups, each group has a RAID controller control, and four groups of hard disks are provided. Maps to the host server, and then divides each disk group mapped to the host server into four LUNs. A total of 16 LUNs can be displayed on the host server.
  • 16 LUNs can be partitioned, for example: Set 15 LUs as data disks and the remaining 1 LU as reserved disks.
  • the data disk can store a data table with a large capacity and high performance; the reserved disk can store a data table with a small capacity and a low performance requirement.
  • Step 102 Receive a storage request message, where the storage request message includes: a data table, an estimated capacity of the data table, a size of a data block corresponding to the data table, and a disk identifier storing the data table; wherein the data table includes at least one data files.
  • the data table includes at least one data file.
  • the estimated capacity of the data table is the storage space occupied by all data files recorded in the index data table.
  • the size of the data block corresponding to the data table refers to the data block in which the data file in the data table is stored.
  • Step 103 According to an estimated capacity of the data table, a size of a data block corresponding to the data table, and the The total number of disks corresponding to the disk identifier is obtained, and the database information is: the estimated capacity of the data table in each disk corresponding to the disk identifier, the number of data files in the disk corresponding to each disk identifier, and The size of the data file.
  • Step 104 Generate a first shell script according to the storage request message and the database information, and create a database according to the first shell script.
  • the m LUs are set as data disks, and the Nm LUs are set as reserved disks; the storage request message is received, and the data in the storage request message is received according to the data.
  • the estimated capacity of the table, the size of the data block corresponding to the data table, and the total number of disks corresponding to the disk identifier obtain database information, and generate a first shell script according to the storage request message and the database information, and according to the first shell script , create a database, because the disk is divided, the capacity to achieve a relatively balanced deployment, taking up less disk storage space, thereby improving storage utilization.
  • FIG. 3 is a flowchart of another embodiment of the method for processing I/O balance according to the present invention. As shown in FIG. 3, the method in this embodiment is mainly applied to a relational database, and the method includes:
  • Step 201 Divide N LUs on the disk, set m LUs as data disks, and set N-m LUs as reserved disks.
  • N and m are integers, and both are greater than or equal to 1.
  • Step 202 Receive a storage request message, where the storage request message includes: a data table, an estimated capacity of the data table, a size of a data block corresponding to the data table, and a disk identifier storing the data table; wherein the data table Includes at least one data file.
  • Step 203 Obtain an estimated capacity of the data table in the disk corresponding to each disk identifier according to the estimated capacity of the data table and the total number of disks corresponding to the disk identifier.
  • Step 204 According to the size of the data block corresponding to the data table, query a mapping relationship between the data block size and the maximum capacity of the single data file, and obtain a maximum capacity of the single data file corresponding to the size of the data block; and according to the estimated capacity of the data table.
  • Step 205 Obtain a size of the data file according to an estimated capacity of the data table, a total number of disks corresponding to the disk identifier, and a number of data files in the disk corresponding to each disk identifier.
  • Step 206 Generate a first shell script according to the storage request message and the database information, and create a database according to the first shell script, where the database information includes: the data The estimated capacity of the table in each disk corresponding to the disk identifier, the number of data files in the disk corresponding to each disk identifier, and the size of the data file.
  • the storage request message is received, where the storage request message includes four data tables, which are data table 1, data table 2, data table 3, and data table 4, wherein the estimated capacity of the data table 1 is 524288 M, and the data table 1
  • the size of the corresponding data block is 2K, and the disk identifier of the data table 1 is stored as the data disk identifier;
  • the estimated capacity of the data table 2 is 1048576M, and the size of the data block corresponding to the data table 2 is 16K, and the data table 2 is stored.
  • the disk identifier is the data disk identifier; the estimated capacity of the data table 3 is 50M, the size of the data block corresponding to the data table 3 is 2K, and the disk identifier storing the data table 3 is the reserved disk identifier; the estimated capacity of the data table 4 For 20480M, the size of the data block corresponding to the data table 4 is 2K, and the disk identifier storing the data table 4 is the reserved disk identifier.
  • the mapping of the data block size to the maximum capacity of a single data file can be as shown in Table 1 below:
  • the table 1 is queried, and the maximum capacity of the single data file is 8G, and according to the estimated capacity of the data table 1, the total number of data disks and the maximum capacity of the single data file.
  • the storage request information and the database information of the data table 1 to the data table 4 can be as shown in the following Table 2:
  • the m LUs are set as data disks, and the Nm LUs are set as reserved disks; the storage request message is received, and the data in the storage request message is received according to the data.
  • the estimated capacity of the table, the size of the data block corresponding to the data table, and the total number of disks corresponding to the disk identifier obtain database information, and generate a first shell script according to the storage request message and the database information, and according to the first shell script , create a database, because the disk is divided, the capacity to achieve a relatively balanced deployment, taking up less disk storage space, thereby improving storage utilization.
  • the method may further include: Receiving an I/O performance detection request message, the I/O performance detection request message includes detecting a disk identifier; when the disk identifier is a reserved disk identifier, using an input output state (Input Output Statues; IOSTAT), At the sampling time point, the first I/O information in the data disk is separately collected, and the second I/O information in the reserved disk is separately collected;
  • IOSTAT Input Output Statues
  • the first I/O information and the second I/O information at each sampling time are subjected to recognition processing and analysis processing to obtain a first detection result.
  • the first I/O information includes: read I/O information and write I/O information, wherein the read I/O information includes: reading the number of read and write operations per second (Input/Output Operations Per Second; Abbreviation: IOPS) Information and read bandwidth information; Write I/O information including writing IOPS information and writing bandwidth information.
  • IOPS Input/Output Operations Per Second
  • IOPS Information and read bandwidth information
  • Write I/O information including writing IOPS information and writing bandwidth information.
  • Krni l Rni, 1 / ( 1 Rni, I + 1 Wni' I)
  • Kwni I Wni' 1 / ( 1 Rni, I + 1 Wni' I)
  • n denotes the sampling moment
  • i denotes the data disk identifier
  • Rni represents the read I/O information in the first I/O information of the i-th data disk at the sampling time n
  • Rna represents the read I/O in the first I/O information of all the data disks at the sampling time n.
  • Wni represents the write I/O information in the first I/O information of the i-th data disk at the sampling time n
  • Wna represents the first I/O information of all the data disks at the sampling time n
  • the method may further include:
  • a second shell script is generated, and the database is recreated according to the second shell script.
  • the first detection result is obtained as follows:
  • the data table in the reserved disk has higher performance requirements and is suitable for storing in the data.
  • the storage request message and the database information are adjusted. Specifically, the disk identifier is modified, and the "reserved disk” is modified to "data disk”.
  • a second shell script is generated according to the adjusted storage request message and the database information, and the database is re-created according to the second shell script.
  • the I/O performance in the data table can be accurately and intuitively evaluated, and the storage request message and the database information are adjusted according to the detection result, and then according to the adjusted
  • the request message and the database information are stored, a second shell script is generated, and the database is re-created according to the second shell script, thereby effectively avoiding database performance problems and reducing the TCO cost.
  • FIG. 4 is a schematic structural diagram of an embodiment of an I/O balancing processing device according to the present invention. As shown in FIG. 4, the device in this embodiment includes: a dividing module 11, a receiving module 12, an I/O balancing processing module 13, and a database creating module. 14.
  • the dividing module 11 is configured to divide N LUNs on the disk, set m LUs as data disks, and set Nm LUs as reserved disks; and receive module 12 is configured to receive And storing the request message, where the storage request message includes: a data table, an estimated capacity of the data table, a size of the data block corresponding to the data table, and a disk identifier storing the data table; wherein the data table includes at least one data file;
  • the /O balance processing module 13 is configured to obtain database information according to an estimated capacity of the data table, a size of a data block corresponding to the data table, and a total number of disks corresponding to the disk identifier, where the database information includes: the data table is in each The disk identifier identifies the estimated capacity in the disk, the number of data files in the disk corresponding to the disk identifier, and the size of the data file.
  • the database creating module 14 is configured to generate the first according to the storage request message and the database information. a shell script, and
  • N and m are integers, and both are greater than or equal to 1.
  • the I/O balancing processing device of this embodiment may perform the technical solution of the method embodiment shown in FIG. 1 , and the implementation principles thereof are similar, and details are not described herein again.
  • the m LUs are set as data disks, and the Nm LUs are set as reserved disks; the storage request message is received, and the data in the storage request message is received according to the data.
  • the estimated capacity of the table, the size of the data block corresponding to the data table, and the total number of disks corresponding to the disk identifier obtain database information, and generate a first shell script according to the storage request message and the database information, and according to the first shell script , create a database, because the disk is divided, the capacity to achieve a relatively balanced deployment, taking up less disk storage space, thereby improving storage utilization.
  • FIG. 5 is a schematic structural diagram of another embodiment of an I/O balance processing device according to the present invention.
  • the I/O balance processing module 13 includes: The obtaining unit 131, the number of data file obtaining unit 132, and the size obtaining unit 133 of the data file, wherein the estimated capacity obtaining unit 131 is configured to obtain the data according to the estimated capacity of the data table and the total number of disks corresponding to the disk identifier.
  • the estimated capacity of the data table in each disk corresponding to the disk identifier; the number of data file obtaining unit 132 is configured to query the mapping relationship between the data block size and the maximum capacity of the single data file according to the size of the data block corresponding to the data table.
  • the number of data files in the data file size obtaining unit 133 is used to estimate the capacity of the data table according to the data table.
  • the number of disk identification data file corresponding to each disk and the total number of the disk corresponding to the identifier acquires the size of the data file.
  • the device further includes: The disk detecting module 15 includes: a collecting unit 151 and a detecting unit 152, wherein the collecting unit 151 is configured to use the IOSTAT to collect the first I/O information in the data disk at the set sampling time point, The second I/O information in the reserved disk is separately collected, and the detecting unit 152 is configured to perform the identification processing and the analysis processing on the first I/O information and the second I/O information at the sampling time. The first test result.
  • the device further includes: a data disk detecting module 16, comprising: a read I/O information acquiring unit 161, a write I/O information acquiring unit 162, and a weighted average number Pn acquiring unit.
  • Krni l Rni, 1 / ( 1 Rni, I + 1 Wni' I)
  • Kwni I Wni' 1 / ( 1 Rni, I + 1 Wni' I)
  • n denotes the sampling moment
  • i denotes the data disk identifier
  • Rni represents the read I/O information in the first I/O information of the i-th data disk at the sampling time n
  • Rna represents the read I/O in the first I/O information of all the data disks at the sampling time n.
  • Wni represents the write I/O information in the first I/O information of the i-th data disk at the sampling time n
  • Wna represents the first I/O information of all the data disks at the sampling time n
  • the I/O balancing processing device of this embodiment may perform the basic solution of the method embodiment shown in FIG. 3, and the implementation principles thereof are similar, and details are not described herein again.
  • the device may further include: an adjustment module 17 configured to adjust the database information according to the first detection result and/or the weighted average Pn; then the database creation module 14 is further configured to use the adjusted storage request message according to the And the database information, generate a second shell script, and recreate the database according to the second shell script.
  • the m LUs are set as data disks, and the Nm LUs are set as reserved disks; the storage request message is received, and the data in the storage request message is received according to the data.
  • the first shell script is generated, and the database is created according to the first shell script. Due to the division of the disk, the capacity is relatively balanced, and the storage space occupied by the disk is less, thereby improving the storage utilization.
  • the I/O performance in the data table can be accurately and intuitively evaluated, and the storage request message and the database information are adjusted according to the detection result, and then according to the adjusted storage request message and Database information, generate a second shell script, and re-create the database according to the second shell script, thereby effectively avoiding database performance problems and reducing TCO costs.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种 I/O平衡处理方法和设备,该方法包括对磁盘上的N个LUN进行划分处理,将m个LUN设置为数据磁盘,将N-m个LUN设置为预留磁盘;接收携带有数据表、数据表的预计容量、数据表对应的数据块的大小以及存储数据表的磁盘标识的存储请求消息;其中所述数据表包括至少一个数据文件;根据数据表的预计容量、数据表对应的数据块的大小以及磁盘标识对应的磁盘的总数量,获取数据库信息,根据存储请求消息和数据库信息生成第一shell脚本,并根据第一shell脚本创建数据库,其中N和m均为整数,且均大于等于1。

Description

I/O平衡处理方法和设备 本申请要求于 2011 年 12 月 21 日提交中国专利局、 申请号为 201110432300.3、 发明名称为 "I/O 平衡处理方法和设备" 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术, 尤其涉及一种 I/O平衡处理方法和设备。 背景技术 事务处理性能委员会 ( Transaction Processing Performance Council; 简称: TPC ) -C测试是测试建立在关系型数据库的在线事务处理性能的基本程序。 由 于存储单元的输入输出 (Input/output; 简称: I/O )性能能够提高存储利用率, 降低总所有成本((Total cost of ownership; 简称: TCO ), 并且有效地避免数 据库的性能问题, 因此, 该存储单元的 I/O性能是 TPC-C测试中主要考虑的 因素。 目前, I/O平衡部署能够充分发挥存储单元的 I/O性能, 因此数据库厂家 和存储厂家均有针对数据库和存储的 I/O平衡部署方案, 例如: 某些厂家釆用 曱骨文 (oracle ) 数据库 (database ) 的自动存储管理 ( Automatic Storage Management; 简称: ASM ) 实现 I/O平衡部署, 具体的, 在一组独立的磁盘 上创建一个单独的磁盘组, 实现单个磁盘组的 I/O平衡。但是, 由于现有的 I/O 平衡部署方案是对数据进行完全平衡部署, 即绝对平衡部署, 因此, 占用了磁 盘的存储空间较大, 并难以分析具体的热点表和热点数据。
发明内容 本发明的第一个方面是提供一种 I/O平衡处理方法, 包括:
对磁盘上的 N个 LU 进行划分处理 , 将 m个 LU 设置为数据磁盘 , 将 N-m 个 LU 设置为预留磁盘;
接收存储请求消息, 所述存储请求消息包括: 数据表、 所述数据表的预计 容量、所述数据表对应的数据块的大小以及存储所述数据表的磁盘标识;其中, 所述数据表包括至少一个数据文件;
根据所述数据表的预计容量、数据表对应的数据块的大小以及所述磁盘标 识对应的磁盘的总数量, 获取数据库信息, 所述数据库信息包括: 所述数据表 在每个所述磁盘标识对应的磁盘中的预计容量、每个所述磁盘标识对应的磁盘 中数据文件的个数以及所述数据文件的大小;
根据所述存储请求消息和所述数据库信息, 生成第一 shell脚本, 并根据所 述第一 shell脚本, 创建数据库;
其中, N和 m均为整数, 且均大于等于 1。
本发明的另一个方面是提供一种 I/O平衡处理设备, 包括:
划分模块, 用于对磁盘上的 N个 LU 进行划分处理, 将 m个 LU 设置为数 据磁盘, 将 N-m个 LU 设置为预留磁盘;
接收模块, 用于接收存储请求消息, 所述存储请求消息包括: 数据表、 所 述数据表的预计容量、所述数据表对应的数据块的大小以及存储所述数据表的 磁盘标识; 其中, 所述数据表包括至少一个所述数据文件;
I/O平衡处理模块, 用于根据所述数据表的预计容量、 数据表对应的数据 块的大小以及所述磁盘标识对应的磁盘的总数量, 获取数据库信息, 所述数据 库信息包括: 所述数据表在每个所述磁盘标识对应的磁盘中的预计容量、每个 所述磁盘标识对应的磁盘中数据文件的个数以及所述数据文件的大小;
数据库创建模块, 用于根据所述存储请求消息和所述数据库信息, 生成第 一 shell脚本, 并根据所述第一 shell脚本, 创建数据库;
其中, N和 m均为整数, 且均大于等于 1。
本发明的技术效果是:通过对磁盘上的 N个 LU 进行划分处理,将 m个 LU 设置为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收存储请求消息, 并根据 存储请求消息中的数据表的预计容量、数据表对应的数据块的大小以及磁盘标 识对应的磁盘的总数量, 获取数据库信息,再根据该存储请求消息和数据库信 息, 生成第一 shell脚本, 并根据该第一 shell脚本, 创建数据库, 由于对磁盘进 行了划分, 将容量从而实现了相对平衡部署, 占用了磁盘的存储空间较少, 进 而提高了存储利用率。
附图说明 图 1为本发明 I/O平衡处理方法的一个实施例的流程图;
图 2为关系型数据库中存储划分的示意图; 图 3为本发明 I/O平衡处理方法的另一个实施例的流程图;
图 4为本发明 I/O平衡处理设备的一个实施例结构示意图;
图 5为本发明 I/O平衡处理设备的另一个实施例的结构示意图。
具体实施方式 图 1为本发明 I/O平衡处理方法的一个实施例的流程图, 如图 1所示, 本实 施例的方法主要应用在关系型数据库中, 则该方法包括:
步骤 101、对磁盘上的 N个 LU 进行划分处理,将 m个 LU 设置为数据磁盘, 将 N-m个 LU 设置为预留磁盘。
其中, N和 m均为整数, 且均大于等于 1。
在本实施例中,对关系型数据库中的存储对应的硬盘进行分组,每组均有 一个冗余磁盘阵列 ( Redundant Array of Independent Disk; 简称: RAID )控制 器控制, 并将分组后的硬盘映射到主机服务器上, 再将映射到主机服务器上的 每组硬盘分别划分成至少一个逻辑单元号码( Logical Unit Number; 简称: LU ) 。
举例来说, 图 2为关系型数据库中存储划分的示意图, 如图 2所示, 将关系 型数据库中的存储对应的硬盘分成四组, 每组均有 RAID控制器控制, 并将四 组硬盘映射到主机服务器上,再将映射到主机服务器上的每组硬盘分别划分成 四个 LUN, 则主机服务器上可以共显示 16个 LUN。 另外, 可以将 16个 LUN进 行划分处理, 例如: 将 15个 LU 设置为数据磁盘, 将剩余的 1个 LU 设置为预 留磁盘。
在本实施例中, 优选地, 数据磁盘可以存储容量较大, 且性能较高的数据 表(table ) ; 预留磁盘可以存储容量较小, 且性能要求较低的数据表。
步骤 102、 接收存储请求消息, 该存储请求消息包括: 数据表、 该数据表 的预计容量、该数据表对应的数据块的大小以及存储该数据表的磁盘标识; 其 中, 该数据表包括至少一个数据文件。
在本实施例中,数据表包括至少一个数据文件。数据表的预计容量是指数 据表中所记录的所有数据文件要占用的存储空间。数据表对应的数据块的大小 是指存储该数据表中的数据文件的数据块。
步骤 103、 根据该数据表的预计容量、 数据表对应的数据块的大小以及该 磁盘标识对应的磁盘的总数量, 获取数据库信息, 该数据库信息包括: 该数据 表在每个该磁盘标识对应的磁盘中的预计容量、每个该磁盘标识对应的磁盘中 数据文件的个数以及该数据文件的大小。
步骤 104、 根据该存储请求消息和该数据库信息, 生成第一 shell脚本, 并 根据该第一 shell脚本, 创建数据库。
在本实施例中 , 通过对磁盘上的 N个 LUN进行划分处理 , 将 m个 LU 设置 为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收存储请求消息, 并根据存储 请求消息中的数据表的预计容量、数据表对应的数据块的大小以及磁盘标识对 应的磁盘的总数量, 获取数据库信息, 再根据该存储请求消息和数据库信息, 生成第一 shell脚本, 并根据该第一 shell脚本, 创建数据库, 由于对磁盘进行了 划分, 将容量从而实现了相对平衡部署, 占用了磁盘的存储空间较少, 进而提 高了存储利用率。
图 3为本发明 I/O平衡处理方法的另一个实施例的流程图, 如图 3所示, 本 实施例的方法主要应用在关系型数据库中, 则该方法包括:
步骤 201、对磁盘上的 N个 LU 进行划分处理,将 m个 LU 设置为数据磁盘, 将 N-m个 LU 设置为预留磁盘。
其中, N和 m均为整数, 且均大于等于 1。
步骤 202、 接收存储请求消息, 该存储请求消息包括: 数据表、 该数据表 的预计容量、 该数据表对应的数据块(block ) 的大小以及存储该数据表的磁 盘标识; 其中, 该数据表包括至少一个数据文件。
步骤 203、 根据数据表的预计容量和磁盘标识对应的磁盘的总数量, 获取 数据表在每个磁盘标识对应的磁盘中的预计容量。
步骤 204、 根据该数据表对应的数据块的大小, 查询数据块大小与单个数 据文件最大容量的映射关系 ,获取该数据块的大小对应的单个数据文件最大容 量; 并根据该数据表的预计容量、该磁盘标识对应的磁盘的总数量和该单个数 据文件最大容量, 获取每个该磁盘标识对应的磁盘中数据文件的个数。
步骤 205、 根据该数据表的预计容量、 该磁盘标识对应的磁盘的总数量和 每个该磁盘标识对应的磁盘中数据文件的个数, 获取该数据文件的大小。
步骤 206、 根据该存储请求消息和该数据库信息, 生成第一壳 (shell )脚 本, 并根据该第一 shell脚本, 创建数据库; 其中, 该数据库信息包括: 该数据 表在每个该磁盘标识对应的磁盘中的预计容量、每个该磁盘标识对应的磁盘中 数据文件的个数以及该数据文件的大小。
在本实施例中, 举例来说, 以 N为 20 , m为 19为例, 详细介绍本实施例的 技术方案。 具体的, 接收存储请求消息, 该存储请求消息包括四个数据表, 分 别为数据表 1、 数据表 2、 数据表 3和数据表 4 , 其中, 数据表 1的预计容量为 524288M,该数据表 1对应的数据块的大小为 2K,存储该数据表 1的磁盘标识为 数据磁盘标识; 数据表 2的预计容量为 1048576M, 该数据表 2对应的数据块的 大小为 16K, 存储该数据表 2的磁盘标识为数据磁盘标识; 数据表 3的预计容量 为 50M,该数据表 3对应的数据块的大小为 2K,存储该数据表 3的磁盘标识为预 留磁盘标识; 数据表 4的预计容量为 20480M, 该数据表 4对应的数据块的大小 为 2K , 存储该数据表 4的磁盘标识为预留磁盘标识。
对于数据表 1 , 根据数据表 1的预计容量和数据磁盘的总数量, 数据表 1在 每个数据磁盘中的预计容量 =524288M/19=27594.10526M;根据该数据表 1对应 的数据块的大小, 查询数据块大小与单个数据文件最大容量的映射关系, 获取 该数据块的大小对应的单个数据文件最大容量。 优选的, 在本实施例中, 数据 块大小与单个数据文件最大容量的映 可以如下表一所示:
Figure imgf000006_0001
Figure imgf000006_0002
数据表 1对应的数据块的大小为 2K, 则查询该表一, 获取单个数据文件最 大容量为 8G, 再根据该数据表 1的预计容量, 数据磁盘的总数量和该单个数据 文件最大容量, 获取每个数据磁盘中数据文件的个数, 其具体实现方式可以如 下所示: 每个数据磁盘中数据文件的个数 =[524288M/19/8G]=[3.368]=4 , 其中, 符号 []表示向上取整。 再根据数据表 1的预计容量、 数据磁盘的总数量和每个 数 据 磁 盘 中 数 据 文 件 的 个 数 , 获 取 数 据 文 件 的 大 小 =524288M/19/4=6898.526316M。
对于数据表 3 , 根据数据表 3的预计容量和预留磁盘的总数量, 数据表 1在 每个预留磁盘中的预计容量 =50M/1=50M; 该数据表 3对应的数据块的大小为 2K, 则查询表一, 获取该数据块的大小对应的单个数据文件最大容量为 8G, 再根据该数据表 3的预计容量 ,预留磁盘的总数量和该单个数据文件最大容量 , 获取每个预留磁盘中数据文件的个数, 其具体实现方式可以如下所示: 每个预 留磁盘中数据文件的个数 =[50M/1/8G]=[0.006]=1 ,其中,符号 []表示向上取整。 再根据数据表 3的预计容量、 预留磁盘的总数量和每个预留磁盘中数据文件的 个数, 获取数据文件的大小 =50M/1/1=50M。
另夕卜,数据表 2由于存储在数据磁盘中, 因此实现原理与数据表 1的实现原 理相类似,数据表 4由于存储在预留磁盘中, 因此实现原理与数据表 3的实现原 理相类似, 此处不再赘述。 具体的, 数据表 1至数据表 4的存储请求信息和数据 库信息可以如下表二所示:
Figure imgf000007_0001
Figure imgf000007_0002
在本实施例中, 通过对磁盘上的 N个 LUN进行划分处理, 将 m个 LU 设置 为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收存储请求消息, 并根据存储 请求消息中的数据表的预计容量、数据表对应的数据块的大小以及磁盘标识对 应的磁盘的总数量, 获取数据库信息, 再根据该存储请求消息和数据库信息, 生成第一 shell脚本, 并根据该第一 shell脚本, 创建数据库, 由于对磁盘进行了 划分, 将容量从而实现了相对平衡部署, 占用了磁盘的存储空间较少, 进而提 高了存储利用率。
进一步的, 在本发明的又一个实施例中,在上述图 1或图 2所示方法实施例 的基础上, 该方法还可以包括: 接收 I/O性能检测请求消息 , 该 I/O性能检测请求消息包括检测磁盘标识; 当磁盘标识为预留磁盘标识时, 釆用输入输出状态( Input Output Statues; 简称: IOSTAT ) , 在设置的抽样时刻点, 分别釆集数据磁盘中的第一 I/O信 息, 并分别釆集预留磁盘中的第二 I/O信息;
将各个抽样时刻的第一 I/O信息与第二 I/O信息进行识别处理和分析处理, 获取第一检测结果。
在本实施例中, 该第一 I/O信息包括: 读 I/O信息和写 I/O信息, 其中,读 I/O 信息包括: 读每秒进行读写操作的次数 ( Input/Output Operations Per Second; 简称: IOPS )信息和读带宽信息等; 写 I/O信息包括写 IOPS信息和写带宽信息 等。
进一步的, 当磁盘标识为数据磁盘标识时, 该方法还可以包括: 釆用公式 Rni, = ( Rni-Rna ) /Rna, 获取每个数据磁盘的第一 I/O信息中 的读 I/O信息 Rni, ;
釆用公式 Wni, = ( Wni-Wna ) /Wna , 获取每个数据磁盘中的第一 I/O信 息中的写 I/O信息 Wni, ;
釆用公式 Pn=Krni* I Rni, l+Kwni* I Wni' I , 获取加权平均数 Pn。
其中, Krni=l Rni, 1 / ( 1 Rni, I + 1 Wni' I) , Kwni= I Wni' 1 / ( 1 Rni, I + 1 Wni' I) , n表示抽样时刻, i表示数据磁盘标识, Rni表示在抽样时刻 n时第 i个数据磁 盘的第一 I/O信息中的读 I/O信息, Rna表示在抽样时刻 n所有数据磁盘的第一 I/O 信息中的读 I/O信息的平均值; Wni表示在抽样时刻 n时第 i个数据磁盘的第一 I/O信息中的写 I/O信息, Wna表示在抽样时刻 n时所有数据磁盘的第一 I/O信息 中的写 I/O信息的平均值。
需要说明的是, 当 Pn越趋近于 0, 则表示该关系型数据库中的 I/O越平衡。 更进一步的, 该方法还可以包括:
根据上述第一检测结果和 /或上述加权平均数, 调整该存储请求消息和数 据库信息;
根据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据该 第二 shell脚本, 重新创建数据库。
在本实施例中, 举例来说, 以上述表二为例, 通过对预留磁盘进行检测, 获取第一检测结果为: 预留磁盘中的数据表四性能要求较高, 适合存储在数据 磁盘中, 则调整存储请求消息和数据库信息, 具体的, 将磁盘标识进行修改, 将 "预留磁盘" 修改为 "数据磁盘" , 另外, 根据数据表 2的预计容量和数据 磁盘的总数量,数据表 1在每个数据磁盘中的预计容量 =20480M/19=1077.89M; 该数据表 2对应的数据块的大小为 2K, 则查询表一, 获取该数据块的大小对应 的单个数据文件最大容量为 8G, 再根据该数据表 2的预计容量, 数据磁盘的总 数量和该单个数据文件最大容量, 获取每个数据磁盘中数据文件的个数, 其具 体实现方式可以如下所示: 每个数据磁盘中数据文件的个数 =[20480M/19/8G]=[0.132]=1 , 其中,符号 []表示向上取整。再根据数据表 2的预 计容量、数据磁盘的总数量和每个数据磁盘中数据文件的个数, 获取数据文件 的大小 =2048M/19/1=1077.89M。 则数据表四的存储请求消息和数据库信息可 以 ^口下表三所示:
Figure imgf000009_0001
Figure imgf000009_0002
根据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据该 第二 shell脚本, 重新创建数据库。
在本实施例中, 通过对 I/O性能检测, 从而可以对数据表中的 I/O性能进行 准确和直观的评估, 并根据检测结果, 调整存储请求消息和数据库信息, 再根 据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据该第二 shell脚本, 重新创建数据库, 进而有效地避免数据库性能问题, 降低了 TCO成 本。
图 4为本发明 I/O平衡处理设备的一个实施例结构示意图, 如图 4所示, 本 实施例的设备包括: 划分模块 11、 接收模块 12、 I/O平衡处理模块 13和数据库 创建模块 14, 其中, 划分模块 11用于对磁盘上的 N个 LUN进行划分处理, 将 m 个 LU 设置为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收模块 12用于接收 存储请求消息, 该存储请求消息包括: 数据表、 该数据表的预计容量、 该数据 表对应的数据块的大小以及存储该数据表的磁盘标识; 其中, 该数据表包括至 少一个数据文件; I/O平衡处理模块 13用于根据该数据表的预计容量、 数据表 对应的数据块的大小以及该磁盘标识对应的磁盘的总数量, 获取数据库信息, 该数据库信息包括: 该数据表在每个该磁盘标识对应的磁盘中的预计容量、每 个该磁盘标识对应的磁盘中数据文件的个数以及该数据文件的大小;数据库创 建模块 14用于根据该存储请求消息和该数据库信息, 生成第一 shell脚本, 并根 据该第一 shell脚本, 创建数据库。
其中, N和 m均为整数, 且均大于等于 1。
本实施例的 I/O平衡处理设备可以执行图 1所示方法实施例的技术方案,其 实现原理相类似, 此处不再赘述。
在本实施例中 , 通过对磁盘上的 N个 LUN进行划分处理 , 将 m个 LU 设置 为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收存储请求消息, 并根据存储 请求消息中的数据表的预计容量、数据表对应的数据块的大小以及磁盘标识对 应的磁盘的总数量, 获取数据库信息, 再根据该存储请求消息和数据库信息, 生成第一 shell脚本, 并根据该第一 shell脚本, 创建数据库, 由于对磁盘进行了 划分, 将容量从而实现了相对平衡部署, 占用了磁盘的存储空间较少, 进而提 高了存储利用率。
图 5为本发明 I/O平衡处理设备的另一个实施例的结构示意图,如图 5所示, 在上述图 4所示实施例的基础上, 该 I/O平衡处理模块 13包括: 预计容量获取单 元 131、 数据文件的个数获取单元 132和数据文件的大小获取单元 133 , 其中, 预计容量获取单元 131用于根据该数据表的预计容量和该磁盘标识对应的磁盘 的总数量, 获取该数据表在每个该磁盘标识对应的磁盘中的预计容量; 数据文 件的个数获取单元 132用于根据该数据表对应的数据块的大小, 查询数据块大 小与单个数据文件最大容量的映射关系,获取该数据块的大小对应的单个数据 文件最大容量; 并根据该数据表的预计容量、该磁盘标识对应的磁盘的总数量 和该单个数据文件最大容量 ,获取每个该磁盘标识对应的磁盘中数据文件的个 数; 数据文件的大小获取单元 133用于根据该数据表的预计容量、 该磁盘标识 对应的磁盘的总数量和每个该磁盘标识对应的磁盘中数据文件的个数,获取该 数据文件的大小。 进一步的, 当接收模块 12还用于接收 I/O性能检测请求消息, 该 I/O性能检 测请求消息包括检测磁盘标识, 且该磁盘标识为预留磁盘标识时, 该设备还包 括: 预留磁盘检测模块 15, 其包括: 釆集单元 151和检测单元 152, 其中, 釆集 单元 151用于釆用 IOSTAT,在设置的抽样时刻点,分别釆集数据磁盘中的第一 I/O信息, 并分别釆集预留磁盘中的第二 I/O信息; 检测单元 152用于将各个该 抽样时刻的该第一 I/O信息与该第二 I/O信息进行识别处理和分析处理, 获取第 一检测结果。
另外, 当该磁盘标识为预留磁盘标识时, 该设备还包括: 数据磁盘检测模 块 16, 包括: 读 I/O信息获取单元 161、 写 I/O信息获取单元 162和加权平均数 Pn 获取单元 163, 其中, 读 I/O信息获取单元 161用于釆用公式 Rni, = ( Rni-Rna ) /Rna, 获取每个数据磁盘的第一 I/O信息中的读 I/O信息 Rni, ; 写 I/O信息获取 单元 162用于釆用公式 Wni, = ( Wni-Wna ) /Wna, 获取每个所述数据磁盘中 的第一 I/O信息中的写 I/O信息 Wni, ; 加权平均 »11获取单元 163, 用于釆用公式 Pn=Krni* iRni' l+Kwiii* IWni' I , 获取加权平均¾¾。
其中, Krni=l Rni, 1 / ( 1 Rni, I + 1 Wni' I) , Kwni= I Wni' 1 / ( 1 Rni, I + 1 Wni' I) , n表示抽样时刻, i表示数据磁盘标识, Rni表示在抽样时刻 n时第 i个数据磁 盘的第一 I/O信息中的读 I/O信息, Rna表示在抽样时刻 n所有数据磁盘的第一 I/O 信息中的读 I/O信息的平均值; Wni表示在抽样时刻 n时第 i个数据磁盘的第一 I/O信息中的写 I/O信息, Wna表示在抽样时刻 n时所有数据磁盘的第一 I/O信息 中的写 I/O信息的平均值。
本实施例的 I/O平衡处理设备可以执行图 3所示方法实施例的基础方案,其 实现原理相类似, 此处不再赘述。
更进一步的, 该设备还可以包括: 调整模块 17, 用于根据第一检测结果和 /或加权平均数 Pn, 调整所述数据库信息; 则数据库创建模块 14还用于根据调 整后的存储请求消息和数据库信息,生成第二 shell脚本,并根据第二 shell脚本, 重新创建数据库。
在本实施例中 , 通过对磁盘上的 N个 LUN进行划分处理 , 将 m个 LU 设置 为数据磁盘, 将 N-m个 LU 设置为预留磁盘; 接收存储请求消息, 并根据存储 请求消息中的数据表的预计容量、数据表对应的数据块的大小以及磁盘标识对 应的磁盘的总数量, 获取数据库信息, 再根据该存储请求消息和数据库信息, 生成第一 shell脚本, 并根据该第一 shell脚本, 创建数据库, 由于对磁盘进行了 划分, 将容量从而实现了相对平衡部署, 占用了磁盘的存储空间较少, 进而提 高了存储利用率。 另外, 通过对 I/O性能检测, 从而可以对数据表中的 I/O性能 进行准确和直观的评估, 并根据检测结果, 调整存储请求消息和数据库信息, 再根据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据该第 二 shell脚本, 重新创建数据库, 进而有效地避免数据库性能问题, 降低了 TCO 成本。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取 存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步骤; 而前述的 存储介质包括: ROM, RAM,磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者 对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并不使相 应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求
1、 一种 I/O平衡处理方法, 其特征在于, 包括:
对磁盘上的 N个逻辑单元 LU 进行划分处理,将 m个 LU 设置为数据磁盘, 将 N-m个 LU 设置为预留磁盘, 其中, N和 m均为整数, 且均大于等于 1 ;
接收存储请求消息, 所述存储请求消息包括: 数据表、 所述数据表的预计 容量、所述数据表对应的数据块的大小以及存储所述数据表的磁盘标识;其中, 所述数据表包括至少一个数据文件;
根据所述数据表的预计容量、所述数据表对应的数据块的大小以及所述磁 盘标识对应的磁盘的总数量, 获取数据库信息, 所述数据库信息包括: 所述数 据表在每个所述磁盘标识对应的磁盘中的预计容量、每个所述磁盘标识对应的 磁盘中数据文件的个数以及所述数据文件的大小
根据所述存储请求消息和所述数据库信息, 生成第一 shell脚本, 并根据所 述第一 shell脚本, 创建数据库。
2、 根据权利要求 1所述的 I/O平衡处理方法, 其特征在于, 所述根据所述 数据表的预计容量、数据表对应的数据块的大小以及所述磁盘标识对应的磁盘 的总数量, 获取数据库信息, 所述数据库信息包括: 所述数据表在每个所述磁 盘标识对应的磁盘中的预计容量、每个所述磁盘标识对应的磁盘中数据文件的 个数以及所述数据文件的大小, 包括:
根据所述数据表的预计容量和所述磁盘标识对应的磁盘的总数量,获取所 述数据表在每个所述磁盘标识对应的磁盘中的预计容量;
根据所述数据表对应的数据块的大小,查询数据块大小与单个数据文件最 大容量的映射关系, 获取所述数据块的大小对应的单个数据文件最大容量; 并 根据所述数据表的预计容量、所述磁盘标识对应的磁盘的总数量和所述单个数 据文件最大容量, 获取每个所述磁盘标识对应的磁盘中数据文件的个数;
根据所述数据表的预计容量、所述磁盘标识对应的磁盘的总数量和每个所 述磁盘标识对应的磁盘中数据文件的个数, 获取所述数据文件的大小。
3、 根据权利要求 1所述的 I/O平衡处理方法, 其特征在于, 还包括: 接收 I/O性能检测请求消息, 所述 I/O性能检测请求消息包括检测磁盘标 当所述磁盘标识为预留磁盘标识时, 釆用输入输出状态, 在设置的抽样时 刻点, 分别釆集数据磁盘中的第一 I/O信息, 并分别釆集预留磁盘中的第二 I/O 信息;
将各个所述抽样时刻的所述第一 I/O信息与所述第二 I/O信息进行识别处 理和分析处理, 获取第一检测结果。
4、 根据权利要求 3所述的 I/O平衡处理方法, 其特征在于, 所述第一 I/O信 息和所述第二 I/O信息均包括读 I/O信息和写 I/O信息, 所述读 I/O信息包括读 IOPS信息和读带宽信息; 所述写 I/O信息包括写 IOPS信息和写带宽信息。
5、 根据权利要求 4所述的 I/O平衡处理方法, 其特征在于, 还包括: 当所磁盘标识为数据磁盘标识时, 釆用公式 Rni, = ( Rni-Rna ) /Rna, 获 取每个所述数据磁盘的第一 I/O信息中的读 I/O信息 Rni, ;
釆用公式 Wni, = ( Wni-Wna ) /Wna,获取每个所述数据磁盘中的第一 I/O 信息中的写 I/O信息 Wni, ;
釆用公式 Pn=Krni* I Rni, l+Kwni* I Wni' I , 获取加权平均数 Pn;
其中, Krni=l Rni' 1 / ( 1 Rni, I + 1 Wni' I) , Kwni= I Wni' 1 / ( 1 Rni, I + 1 Wni' I) , n表示抽样时刻, i表示数据磁盘标识, Rni表示在抽样时刻 n时第 i个数据磁 盘的第一 I/O信息中的读 I/O信息, Rna表示在抽样时刻 n所有数据磁盘的第一 I/O 信息中的读 I/O信息的平均值; Wni表示在抽样时刻 n时第 i个数据磁盘的第一 I/O信息中的写 I/O信息, Wna表示在抽样时刻 n时所有数据磁盘的第一 I/O信息 中的写 I/O信息的平均值。
6、 根据权利要求 3或 5所述的 I/O平衡处理方法, 其特征在于, 还包括: 根据所述第一检测结果和 /或所述加权平均数 Pn, 调整所述存储请求消息 和数据库信息;
根据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据所 述第二 shell脚本, 重新创建数据库。
7、 一种 I/O平衡处理设备, 其特征在于, 包括:
划分模块, 用于对磁盘上的 N个 LU 进行划分处理, 将 m个 LU 设置为数 据磁盘, 将 N-m个 LU 设置为预留磁盘;
接收模块, 用于接收存储请求消息, 所述存储请求消息包括: 数据表、 所 述数据表的预计容量、所述数据表对应的数据块的大小以及存储所述数据表的 磁盘标识; 其中, 所述数据表包括至少一个数据文件;
I/O平衡处理模块, 用于根据所述数据表的预计容量、 数据表对应的数据 块的大小以及所述磁盘标识对应的磁盘的总数量, 获取数据库信息, 所述数据 库信息包括: 所述数据表在每个所述磁盘标识对应的磁盘中的预计容量、每个 所述磁盘标识对应的磁盘中数据文件的个数以及所述数据文件的大小;
数据库创建模块, 用于根据所述存储请求消息和所述数据库信息, 生成第 一 shell脚本, 并根据所述第一 shell脚本, 创建数据库;
其中, N和 m均为整数, 且均大于等于 1。
8、 根据权利要求 7所述的 I/O平衡处理设备, 其特征在于, I/O平衡处理模 块包括:
预计容量获取单元,用于根据所述数据表的预计容量和所述磁盘标识对应 的磁盘的总数量,获取所述数据表在每个所述磁盘标识对应的磁盘中的预计容 量;
数据文件的个数获取单元, 用于根据所述数据表对应的数据块的大小, 查 询数据块大小与单个数据文件最大容量的映射关系,获取所述数据块的大小对 应的单个数据文件最大容量; 并根据所述数据表的预计容量、所述磁盘标识对 应的磁盘的总数量和所述单个数据文件最大容量,获取每个所述磁盘标识对应 的磁盘中数据文件的个数;
数据文件的大小获取单元, 用于根据所述数据表的预计容量、所述磁盘标 识对应的磁盘的总数量和每个所述磁盘标识对应的磁盘中数据文件的个数,获 取所述数据文件的大小。
9、 根据权利要求 7所述的 I/O平衡处理设备, 其特征在于, 所述接收模块 还用于接收 I/O性能检测请求消息, 所述 I/O性能检测请求消息包括检测磁盘标 识;
则当所述磁盘标识为预留磁盘标识时, 所述设备还包括: 预留磁盘检测模 块, 包括:
釆集单元, 用于釆用输入输出状态, 在设置的抽样时刻点, 分别釆集数据 磁盘中的第一 I/O信息, 并分别釆集预留磁盘中的第二 I/O信息;
检测单元, 用于将各个所述抽样时刻的所述第一 I/O信息与所述第二 I/O信 息进行识别处理和分析处理, 获取第一检测结果; 其中, 所述第一 I/O信息和所述第二 I/O信息均包括读 I/O信息和写 I/O信息, 所述读 I/O信息包括读 IOPS信息和读带宽信息;所述写 I/O信息包括写 IOPS信息 和写带宽信息。
10、 根据权利要求 8所述的 I/O平衡处理设备, 其特征在于, 则当所述磁盘 标识为预留磁盘标识时, 所述设备还包括: 数据磁盘检测模块, 包括:
读 I/O信息获取单元, 用于釆用公式 Rni, = ( Rni-Rna ) /Rna, 获取每个 所述数据磁盘的第一读 I/O信息中的读 I/O信息 Rni, ;
写 I/O信息获取单元, 用于釆用公式 Wni, = ( Wni-Wna ) /Wna, 获取每 个所述数据磁盘中的第一写 I/O信息中的写 I/O信息 Wni, ;
加权平均¾¾获取单元, 用于釆用公 Pn=Kmi* iRni' l+Kwni* I Wni' I , 获 口权平均¾¾;
其中, Krni=l Rni, 1 / ( 1 Rni, I + 1 Wni' I) , Kwni= I Wni' 1 / ( 1 Rni, I + 1 Wni' I) , n表示抽样时刻, i表示数据磁盘标识, Rni表示在抽样时刻 n时第 i个数据磁 盘的第一 I/O信息中的读 I/O信息, Rna表示在抽样时刻 n所有数据磁盘的第一 I/O 信息中的读 I/O信息的平均值; Wni表示在抽样时刻 n时第 i个数据磁盘的第一 I/O信息中的写 I/O信息, Wna表示在抽样时刻 n时所有数据磁盘的第一 I/O信息 中的写 I/O信息的平均值。
11、 根据权利要求 9或 10所述的 I/O平衡处理设备, 其特征在于, 还包括: 调整模块, 用于根据所述第一检测结果和 /或所述加权平均数 Pn, 调整所 述存储请求消息和数据库信息;
则所述数据库创建模块还用于根据调整后的存储请求消息和数据库信息, 生成第二 shell脚本, 并根据所述第二 shell脚本, 重新创建数据库。
PCT/CN2012/087153 2011-12-21 2012-12-21 I/o平衡处理方法和设备 WO2013091570A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12859046.0A EP2674852B1 (en) 2011-12-21 2012-12-21 I/o balanced processing method and device
US14/143,729 US9460749B2 (en) 2011-12-21 2013-12-30 I/O balance processing method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110432300.3 2011-12-21
CN201110432300.3A CN102566940B (zh) 2011-12-21 2011-12-21 I/o平衡处理方法和设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/143,729 Continuation US9460749B2 (en) 2011-12-21 2013-12-30 I/O balance processing method and device

Publications (1)

Publication Number Publication Date
WO2013091570A1 true WO2013091570A1 (zh) 2013-06-27

Family

ID=46412465

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087153 WO2013091570A1 (zh) 2011-12-21 2012-12-21 I/o平衡处理方法和设备

Country Status (4)

Country Link
US (1) US9460749B2 (zh)
EP (1) EP2674852B1 (zh)
CN (1) CN102566940B (zh)
WO (1) WO2013091570A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566940B (zh) 2011-12-21 2014-11-05 华为技术有限公司 I/o平衡处理方法和设备
CN106484313B (zh) * 2015-09-01 2019-06-07 北京金山云网络技术有限公司 数据信息备份方法、数据备份方法及装置
US11238107B2 (en) * 2020-01-06 2022-02-01 International Business Machines Corporation Migrating data files to magnetic tape according to a query having one or more predefined criterion and one or more query expansion profiles
CN114610245B (zh) * 2022-05-09 2022-07-26 深圳佰维存储科技股份有限公司 基于ssd的raid实现方法、装置、可读存储介质及电子设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164240A (ja) * 2005-12-09 2007-06-28 Funai Electric Co Ltd ファイル管理システムおよびストレージの自動管理方法、並びに自動管理プログラム
CN102566940A (zh) * 2011-12-21 2012-07-11 华为技术有限公司 I/o平衡处理方法和设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061362A1 (en) * 2000-03-03 2003-03-27 Qiu Chaoxin C. Systems and methods for resource management in information storage environments
US20020091722A1 (en) 2000-03-03 2002-07-11 Surgient Networks, Inc. Systems and methods for resource management in information storage environments
US8612330B1 (en) * 2010-09-14 2013-12-17 Amazon Technologies, Inc. Managing bandwidth for shared resources
US8595267B2 (en) * 2011-06-27 2013-11-26 Amazon Technologies, Inc. System and method for implementing a scalable data storage service

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164240A (ja) * 2005-12-09 2007-06-28 Funai Electric Co Ltd ファイル管理システムおよびストレージの自動管理方法、並びに自動管理プログラム
CN102566940A (zh) * 2011-12-21 2012-07-11 华为技术有限公司 I/o平衡处理方法和设备

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
JI, YU ET AL.: "Optimization Practice for Terrain Data Storage in Oracle", GEOSPATIAL INFORMATION, vol. 9, no. 1, 28 February 2011 (2011-02-28), pages 50 - 52 *
LIANG, CHANGMING ET AL.: "Application of Asm to data storage in No.1 Military Medical Project", CHINESE MEDICAL EQUIPMENT JOURNAL, vol. 28, no. 9, 30 September 2007 (2007-09-30), pages 43 *
LIU, RANGGUO ET AL.: "Research and Application of High Availability Based on Mass Spatial Database", COMPUTER ENGINEERING, vol. 34, no. 6, 31 March 2008 (2008-03-31), pages 263 - 265 *
MA, NA ET AL.: "Research of disk array storage systems performance testing software", COMPUTER ENGINEERING AND APPLICATIONS, vol. 46, no. 36, 31 December 2010 (2010-12-31), pages 74 *
MA, NI ET AL.: "Optimization Practice of ArcSDE for Oracle", BULLETIN OF SURVEYING AND MAPPING, vol. 10, 31 December 2007 (2007-12-31), pages 50 - 53 *

Also Published As

Publication number Publication date
US9460749B2 (en) 2016-10-04
US20140111881A1 (en) 2014-04-24
CN102566940A (zh) 2012-07-11
CN102566940B (zh) 2014-11-05
EP2674852A4 (en) 2014-03-12
EP2674852B1 (en) 2016-11-09
EP2674852A1 (en) 2013-12-18

Similar Documents

Publication Publication Date Title
EP2746927B1 (en) Data-tiered storage processing method and device and storage device
CA2758304C (en) Converting luns into files or files into luns in real time
US9680933B2 (en) Computer system
US8473787B2 (en) Intelligent LUN generation and management
CN104583930B (zh) 数据迁移的方法、控制器和数据迁移装置
US9223509B2 (en) File processing method and storage device
WO2013091570A1 (zh) I/o平衡处理方法和设备
US9135262B2 (en) Systems and methods for parallel batch processing of write transactions
CN103218270B (zh) 具有多个固态盘的计算机
CN1258713C (zh) 基于磁盘特征的数据分布动态映射的方法
CN103150261B (zh) 用于同时访问多个固态盘的方法与装置
CN103176858B (zh) 具有多个固态盘的存储设备
Gim et al. Extract and infer quickly: Obtaining sector geometry of modern hard disk drives
CN102915270A (zh) 用于存储i/o需求录制与压力模拟验证的方法
US10929066B1 (en) User stream aware file systems with user stream detection
CN107273251A (zh) 一种在生产环境下Rack机柜JBOD存储的测试方法
Liu et al. Understanding the SWD-based RAID system
KR20240025451A (ko) 데이터 캐싱을 위한 방법 및 장치
US20130019122A1 (en) Storage device and alternative storage medium selection method
US20130024643A1 (en) Storage apparatus and data management method
CN103975309B (zh) 数据恢复方法、数据恢复装置、存储器及存储系统
Gim et al. Dig: Rapid characterization of modern hard disk drive and its performance implication
US20230393749A1 (en) Method and device of storage data
US10049053B1 (en) Classifying performance of an external storage resource pool associated with a performance tier in a federated tiered storage system for overload avoidance and auto-tiering
US11994989B2 (en) Cache efficiency analysis based on in-depth metrics instrumentation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12859046

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2012859046

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2012859046

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE