CN103838521B - Data processing method and data processing device - Google Patents

Data processing method and data processing device Download PDF

Info

Publication number
CN103838521B
CN103838521B CN201410073208.6A CN201410073208A CN103838521B CN 103838521 B CN103838521 B CN 103838521B CN 201410073208 A CN201410073208 A CN 201410073208A CN 103838521 B CN103838521 B CN 103838521B
Authority
CN
China
Prior art keywords
data
hard disk
disk groups
log area
written
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410073208.6A
Other languages
Chinese (zh)
Other versions
CN103838521A (en
Inventor
金添福
李明君
任努努
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410073208.6A priority Critical patent/CN103838521B/en
Publication of CN103838521A publication Critical patent/CN103838521A/en
Priority to PCT/CN2014/089623 priority patent/WO2015127791A1/en
Application granted granted Critical
Publication of CN103838521B publication Critical patent/CN103838521B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • G06F3/0613Improving I/O performance in relation to throughput
    • 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

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An embodiment of the invention discloses a data processing method and a data processing device, and relates to the technical field of storage. By the data processing method and the data processing device, data writing speed and data arrangement speed can be increased simultaneously, IOPS (input/output operation per second) performance of the data processing process is improved, and further, rapidness and persistence of data can be realized. The data processing method specifically includes if the occupied quantity of a log space of a log area of a first hard-disk pack is higher than a preset threshold value, writing first data and feature values thereof both read from an internal storage into a log area of a second hard-disk pack, and pausing arranging data written in the log area of the second hard-disk pack into a first data area; according to the data feature values written in the log area of the first hard-disk pack, arranging the data written in the log area of the first hard-disk pack to a second data area. The data processing method and the data processing device are applied to data read-write processes.

Description

A kind of data processing method and device
Technical field
The present invention relates to technical field of memory, more particularly, to a kind of data processing method and device.
Background technology
With the fast development of processor technique, existing storage system is not enough to mate through fast-developing processor system System, causes the bottleneck of storage technology to become increasingly conspicuous.Wherein, the bottleneck of storage technology development is mainly reflected in two sides Face:In storage system, the write of data and reading speed are relatively low.
In prior art, improve the write of data and reading speed in storage system, can enter in the way of using full internal memory The write of row data and reading.Specifically, after receiving data writing commands, the data write dynamic random being written into is deposited Access to memory(Dynamic Random Access Memory, DRAM), in order to can after receiving in digital independent order Directly to read corresponding data from DRAM;And the data write nonvolatile memory being written into(Non-Volatile Memory, NVM), then in the log area that the data of write NVM is write one by one hard disk, and writing number to the log area of hard disk According to while, arrange hard disk log area data, then by reduced data write hard disk data field.In said process In, it is possible to achieve read data and the separation writing data to hard disk from hard disk, improve the read or write speed of data.
During writing data in prior art is to hard disk, often execute for a hard disk simultaneously:To this hard disk Write the data reading from NVM in log area, and arrange in the log area of this hard disk written into data, and arranged number According to the data field writing this hard disk.And be cannot to take into account from NVM the daily record to this hard disk using the above-mentioned method writing data simultaneously The speed of written data in the speed of data and the log area of this hard disk of arrangement is write in area.
Specifically, to ensure to write the speed of data to the log area of this hard disk, then the arrangement speed of data may be sacrificed Degree, to ensure the arrangement speed of data, then may sacrifice the speed writing data to the log area of this hard disk, data processing Number of times (Input/Output Operations Per Second, the IOPS) poor-performing being written and read operating per second in journey.
Content of the invention
Embodiments of the invention provide a kind of data processing method and device, can improve writing speed sum simultaneously According to arranging speed, improve the IOPS performance of data handling procedure.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
The embodiment of the present invention in a first aspect, provide a kind of data processing method, including:
If the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, the reading from internal memory The eigenvalue of one data and described first data writes the log area of the second hard disk groups, and suspend will be written into described second hard disk Data compilation in the log area of group is to the first data field, the packet in the described log area written into described second hard disk groups Include described first data, the eigenvalue of described first data includes the write address information of described first data and described first data Size information;
According to the eigenvalue of the data in the log area written into described first hard disk groups, by described written into described first Data compilation in the log area of hard disk groups is to the second data field, the number in the described log area written into described first hard disk groups According to the data for reading from described internal memory.
In conjunction with a first aspect, in a kind of possible implementation, described first data field is described second hard disk groups Data field;Described second data field is the data field of described first hard disk groups.
In conjunction with first aspect and above-mentioned possible implementation, in alternatively possible implementation, described first number The data field being the 3rd hard disk groups according to area;Described second data field is the data field of described 3rd hard disk groups.
In conjunction with first aspect and any one possible implementation above-mentioned, in alternatively possible implementation, institute State the first hard disk groups and comprise log area data area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described first hard disk groups is used for the daily record from described first hard disk groups for the storage The data arranging in area;
Described second hard disk groups comprise log area data area;
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
In conjunction with first aspect and any one possible implementation above-mentioned, in alternatively possible implementation, institute State the first hard disk groups and only comprise log area;Described second hard disk groups only comprise log area;Described 3rd hard disk groups only comprise data Area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
The second aspect of the embodiment of the present invention, also provides a kind of data processing equipment, including:
First judging unit, whether the log space consumption for judging the log area of the first hard disk groups is higher than default threshold Value;
First writing unit, if determine the daily record sky of the log area of described first hard disk groups for described first judging unit Between consumption be higher than described predetermined threshold value, then by from internal memory read the first data and described first data eigenvalue write The log area of the second hard disk groups, and suspend the data compilation in the log area written into described second hard disk groups to the first data Area, the data in the described log area written into described second hard disk groups includes described first data, the spy of described first data Value indicative includes the write address information of described first data and the size information of described first data;
First arrangement unit, if determine the daily record sky of the log area of described first hard disk groups for described first judging unit Between consumption be higher than described predetermined threshold value, then according to written into the data in the log area of described first hard disk groups eigenvalue, By the data compilation in the described log area written into described first hard disk groups to the second data field, described written into described first Data in the log area of hard disk groups is the data reading from described internal memory.
In conjunction with second aspect, in a kind of possible implementation, described first data field is described second hard disk groups Data field;Described second data field is the data field of described first hard disk groups.
In conjunction with second aspect and any one possible implementation above-mentioned, in alternatively possible implementation, institute State the data field that the first data field is the 3rd hard disk groups;Described second data field is the data field of described 3rd hard disk groups.
In conjunction with second aspect and any one possible implementation above-mentioned, in alternatively possible implementation, institute State the first hard disk groups and comprise log area data area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described first hard disk groups is used for the daily record from described first hard disk groups for the storage The data arranging in area;
Described second hard disk groups comprise log area data area;
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
In conjunction with second aspect and any one possible implementation above-mentioned, in alternatively possible implementation, institute State the first hard disk groups and only comprise log area;Described second hard disk groups only comprise log area;Described 3rd hard disk groups only comprise data Area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
The third aspect of the embodiment of the present invention, also provides a kind of data processing equipment, including:
Processor, if the log space consumption for the log area of described first hard disk groups is higher than described predetermined threshold value, Then the eigenvalue of the first data reading from internal memory and described first data is write the log area of the second hard disk groups, and suspend By the data compilation in the log area written into described second hard disk groups to the first data field, described written into described second hard disk Data in the log area of group includes described first data, and what the eigenvalue of described first data included described first data writes ground Location information and the size information of described first data;Feature according to the data in the log area written into described first hard disk groups Value, by the data compilation in the described log area written into described first hard disk groups to the second data field, described written into described Data in the log area of the first hard disk groups is the data reading from described internal memory.
In conjunction with the third aspect, in a kind of possible implementation, described first data field is described second hard disk groups Data field;Described second data field is the data field of described first hard disk groups.
In conjunction with the third aspect and above-mentioned possible implementation, in alternatively possible implementation, described first Data field is the data field of the 3rd hard disk groups;Described second data field is the data field of described 3rd hard disk groups.
In conjunction with the third aspect and above-mentioned possible implementation, in alternatively possible implementation, described first Hard disk groups comprise log area data area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described first hard disk groups is used for the daily record from described first hard disk groups for the storage The data arranging in area;
Described second hard disk groups comprise log area data area;
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
In conjunction with the third aspect and above-mentioned possible implementation, in alternatively possible implementation, described first Hard disk groups only comprise log area;Described second hard disk groups only comprise log area;Described 3rd hard disk groups only comprise data field;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
Data processing method provided in an embodiment of the present invention and device, if the log space of the log area of the first hard disk groups is Consumption is higher than predetermined threshold value, then the eigenvalue of the first data reading from internal memory and the first data is write the second hard disk groups Log area, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to written into The eigenvalue of the data in the log area of one hard disk groups, by the data compilation in the log area written into the first hard disk groups to second Data field, is the data reading from described internal memory written into the data in the log area of the first hard disk groups.In prior art Execute data write data arrangement for all hard disks to compare simultaneously, by this programme, hard disk can be grouped, and By different hard disk groups, only execution data writes or data compilation operates it is achieved that the pure of data is continuously written into respectively, can Arrange speed to improve writing speed data simultaneously, improve the IOPS performance of data handling procedure, and then can realize Quick and durableization of data.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, also may be used So that other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is one of the embodiment of the present invention 1 data processing method flow chart;
Fig. 2 is one of the embodiment of the present invention 2 data processing method flow chart;
Fig. 3 is one of the embodiment of the present invention 3 data processing method flow chart;
Fig. 4 is the composition schematic diagram of one of the embodiment of the present invention 4 data processing equipment;
Fig. 5 is the composition schematic diagram of another kind of data processing equipment in the embodiment of the present invention 4;
Fig. 6 is the composition schematic diagram of one of embodiment of the present invention data handling system;
Fig. 7 is the composition schematic diagram of another kind of data handling system in the embodiment of the present invention;
Fig. 8 is one of the embodiment of the present invention 2 data processing method schematic diagram;
Fig. 9 is one of the embodiment of the present invention 3 data processing method schematic diagram.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
In addition, the terms " system " and " network " are herein often used interchangeably.The terms " and/ Or ", only a kind of incidence relation of description affiliated partner, represents there may be three kinds of relations, for example, A and/or B, can be with table Show:, there are A and B, these three situations of individualism B in individualism A simultaneously.In addition, character "/" herein, before and after typicallying represent Affiliated partner is a kind of relation of "or".
Embodiment 1
The embodiment of the present invention provides a kind of data processing method, as shown in figure 1, including:
If the log space consumption of the log area of S101 first hard disk groups is higher than predetermined threshold value, data processing equipment is then The eigenvalue of the first data reading from internal memory and the first data is write the log area of the second hard disk groups, and suspend and write Enter data compilation in the log area of the second hard disk groups to the first data field.
Wherein, include the first data written into the data in the log area of the second hard disk groups.
It should be noted that the data processing equipment in the embodiment of the present invention can be one of data base Data Control Module or data processing module, the write for middle data of controlling database and reading.For example, data control block can be The central processing unit of computer(Central Processing Unit, CPU).
Specifically, the internal memory in the embodiment of the present invention can include the first internal storage location and the second internal storage location.At data Reason device can read the first data and the eigenvalue of the first data in the first internal storage location from internal memory, and will be in first The first data reading in memory cell and the log area of eigenvalue write second hard disk groups of the first data.
Exemplary, in a kind of application scenarios of the embodiment of the present invention, it is non-that the first internal storage location can include at least one Volatile memory(Non-Volatile Memory, NVM);Second internal storage location can include at least one dynamic random and deposit Access to memory(Dynamic Random Access Memory, DRAM).Wherein, the storage speed of NVM and per second be written and read The number of times (Input/Output Operations Per Second, IOPS) of operation is more than common hard disc, supports power-off protection. DRAM is a kind of volatile memory, is a kind of internal memory not supporting power-off protection, and the storage speed of DRAM and IOPS are much larger than Common hard disc, slightly above NVM).
It should be noted that the first data in the first internal storage location is write according to data writing commands for data processing equipment Enter the first internal storage location.
Specifically, data processing equipment can receive the eigenvalue comprising data to be written and described data to be written Data writing commands after, execution step one and step 2 simultaneously.Wherein, step one:In eigenvalue according to data to be written The write address information of the data to be written comprising is written into data and writes the second internal storage location(DRAM);Step 2:Will be to be written Enter data and the eigenvalue of data to be written writes the first internal storage location(NVM).
Wherein, on the one hand because the storage speed of DRAM and IOPS are much larger than common hard disc, and it is slightly above NVM, and count According to processing meanss after receiving data writing commands, write data into the data that order comprised and be written with deposit receipt in second Unit, therefore, data processing equipment, after receiving data read command, can directly read corresponding from the second internal storage location Data, can improve data reading speed.On the other hand because NVM is a kind of internal memory supporting power-off protection, and the depositing of NVM Storage speed and IOPS are more than common hard disc, and therefore, data processing equipment, after receiving data writing commands, writes data into life Make comprised data be written with the first internal storage location, then the data writing the first internal storage location is write hard disk sky one by one Between, the writing speed of data can be improved.I.e. the data in the first internal storage location is used for writing hard disk groups(First hard disk groups and Two hard disk groups), data in the second internal storage location is used for providing the required data reading of data read command it is achieved that data The separation of read-write.
Specifically, the feature of data to be written and data to be written is read from the first internal storage location in data processing equipment Before value, the method for the embodiment of the present invention can also include:Data processing equipment is by least two hard disk partition at least two Hard disk groups.
It should be noted that described hard disk groups can include at least one according to function division writes data disks group(Disk Group for Write, DGW)With reading data disks group(Disk Group for Read, DGR), described DGW is for receiving from institute State the data of the first internal storage location write, it is whole to the hard disk groups data written into described DGR function that described DGR is used for acceptance Reason.
And, in order to prevent leading to loss of data due to hard disk corruptions, at least two in each hard disk groups, can be comprised Hard disk, each two hard disk mirror image hard disk each other.
Specifically, in the first application scenarios of the embodiment of the present invention, data processing equipment can be by hard drive space At least two hard disk partition to two hard disk groups:First hard disk groups and the second hard disk groups.
Wherein, in this application scenarios, the first hard disk groups comprise log area data area, and the first hard disk groups comprise at least One hard disk;Second hard disk groups comprise log area data area, and the second hard disk groups comprise at least one hard disk.
Further alternative, at least two hard disks, each two hard disk mirror image hard disk each other can be comprised in the first hard disk groups; At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in second hard disk groups.
In the second application scenarios of the embodiment of the present invention, data processing equipment can be by least three in hard drive space Individual hard disk partition is to three hard disk groups:First hard disk groups, the second hard disk groups and the 3rd hard disk groups.
Wherein, in second application scenarios, the first hard disk groups only comprise log area, and the second hard disk groups only comprise daily record Area, the 3rd hard disk groups only comprise data field.First hard disk groups comprise at least one hard disk, and it is hard that the second hard disk groups comprise at least one Disk, the 3rd hard disk groups comprise at least one hard disk.
Further alternative, at least two hard disks, each two hard disk mirror image hard disk each other can be comprised in the first hard disk groups; At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in second hard disk groups;Can comprise in 3rd hard disk groups At least two hard disks, each two hard disk mirror image hard disk each other.
It should be noted that when data processing equipment judges to obtain the log space consumption of the log area of the first hard disk groups During higher than predetermined threshold value, can be by the eigenvalue of the first data reading from the first internal storage location and the first data, write the The log area of two hard disk groups, and suspend the data compilation in the log area written into the second hard disk groups to the first data field.This When, data processing equipment do not arrange in the log area of the second hard disk groups written into data, but be directed to the first hard disk groups Only execute:According to the eigenvalue of the data in the log area written into the first hard disk groups, by the daily record written into the first hard disk groups Data compilation in area is to the second data field.
Wherein, the first data is one of data to be written data or one group of data, and data to be written is at data Reason device, after receiving data writing commands, is written to internal memory(It is specially the first internal storage location in internal memory)In data.
It should be noted that in the first application scenarios of the embodiment of the present invention, the first data field is the second hard disk groups Data field.
In the second application scenarios of the embodiment of the present invention, the first data field is the data field of the 3rd hard disk groups.
Specifically, the eigenvalue of the first data comprises:The write address information of the first data and the size information of the first data.
S102, data processing equipment, according to the eigenvalue of the data in the log area written into the first hard disk groups, have been write Enter data compilation in the log area of the first hard disk groups to the second data field, written into the data in the log area of the first hard disk groups For stating the data reading in internal memory.
Accordingly, in embodiments of the present invention, data processing equipment can daily record in the log area of the first hard disk groups empty Between when consumption is higher than predetermined threshold value, according to the eigenvalue of the data in the log area written into the first hard disk groups, will be written into Data compilation in the log area of the first hard disk groups is to the second data field.Now, data processing equipment is only directed to the first hard disk groups Execution:By the data compilation in the log area written into the first hard disk groups to the second data field.
It should be noted that in the first application scenarios of the embodiment of the present invention, the second data field is the first hard disk groups Data field.
In the second application scenarios of the embodiment of the present invention, the second data field is the data field of the 3rd hard disk groups.
Data processing method provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, then the eigenvalue of the first data reading from internal memory and the first data is write the daily record of the second hard disk groups Area, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to hard written into first The eigenvalue of the data in the log area of disk group, by the data compilation in the log area written into the first hard disk groups to the second data Area, is the data reading from described internal memory written into the data in the log area of the first hard disk groups.It is directed to prior art All hard disks execute data write data arrangement simultaneously and compare, and by this programme, can be grouped hard disk, and by not The only write of execution data or data compilation operates it is achieved that the pure of data is continuously written into same hard disk groups respectively, Ke Yitong Shi Tigao writing speed data arranges speed, improves the IOPS performance of data handling procedure, and then can realize data Quick and durableization.
Embodiment 2
The embodiment of the present invention provides a kind of data processing method, with two hard disk groups(First hard disk groups and the second hard disk groups Data field)As a example carrying out log write data arrangement respectively, in the present embodiment, as shown in fig. 6, the first hard disk groups comprise day Data area of will area, the second hard disk groups comprise log area data area;First data field is the data field of the second hard disk groups, second Data field is the data field of the first hard disk groups;As shown in Fig. 2 the method for the present embodiment can include:
The data that S201, data processing equipment are written into writes the flow process of internal memory.
It should be noted that the internal memory in the embodiment of the present invention can include:First internal storage location and the second internal storage location. Wherein, the specific descriptions of the first internal storage location and the second internal storage location may be referred to the related content in the embodiment of the present invention 1, this Embodiment repeats no more here.
Exemplary, the first internal storage location in the embodiment of the present invention can be made up of at least one NVM, deposit receipt in second Unit can be by least one DRAM.
Specifically, S201 can include:S201a-S201c:
S201a, data processing equipment receiving data writing commands.
Wherein, data to be written and the eigenvalue of data to be written are comprised in data writing commands, number to be written According to eigenvalue comprise:The write address information of data to be written and the size information of data to be written.
Data processing equipment can receive from read-write(Input/Ouput, I/O)The data writing commands of interface, data Writing commands are used for indicating data processing equipment:Writing the data into the data to be written comprising in order, to write this to be written Data the corresponding position of the hard disk indicated by write address information.
S201b, data processing equipment, after receiving data writing commands, write data into comprise in order to be written Data write the second internal storage location.
Wherein, the second internal storage location in the embodiment of the present invention is DRAM, and the first internal storage location is NVM.Because DRAM is A kind of volatile memory, is a kind of internal memory not supporting power-off protection, and the storage speed of DRAM and IOPS are much larger than commonly hard Disk, slightly above NVM.Therefore, in order to improve data processing equipment after receiving data read command, read the speed of data, Data processing equipment can write data into according to the writing position information of data to be written after receiving data writing commands The data to be written comprising in order writes the second internal storage location, is receiving digital independent life in order to data processing equipment After order, directly can read corresponding data from the second internal storage location, improve data reading speed.
It should be noted that the writing position information of data to be written is specifically as follows the block number of data to be written.I.e. The writing position information of the first data in the embodiment of the present invention can be the block number of the first data;The writing position information of the second data It can be the block number of the second data.
S201c, data processing equipment are written into data and the eigenvalue of data to be written writes the first internal storage location.
Wherein, the eigenvalue being written into data and data to be written in data processing equipment write the first internal storage location it Afterwards, in the embodiment of the present invention, data to be written that data processing equipment reads from the first internal storage location can be referred to as the first data, Second data and the 3rd data etc., that is, the first data and the second data are one of data to be written data or one group of number According to.
Specifically, the data in the first internal storage location is used for writing hard disk groups, and the data in the second internal storage location is used for carrying For the data that reads required by data read command it is achieved that the separation of reading and writing data.
It should be noted that the data that data processing equipment writes the second internal storage location only comprises data to be written, number Contain the eigenvalue of data to be written and data to be written according to the packet that processing meanss write the first internal storage location(To be written The write address information of the size information of data and data to be written).
It should be noted that after execution S201a, the sequencing that the embodiment of the present invention executes to S201b and S201c It is not limited.S201b can be first carried out in embodiments of the present invention, then execute S201c;S201c can also be first carried out, then execute S201b;S201b and S201c can also be executed simultaneously.
S202, data processing equipment carry out hard disk packet and the initialized flow process of hard disk groups function.
S202a, data processing equipment will be hard to the first hard disk groups and second at least two hard disk partition in hard drive space Disk group.
Wherein, comprise at least one hard disk in the first hard disk groups;At least one hard disk is comprised in second hard disk groups.
Hard disk groups divide according to function and can include the hard disk groups of at least one described DGW function and described DGR function Hard disk groups, the hard disk groups of DGW function are used for receiving the data from described first internal storage location write, and the hard disk groups of DGR function are used In the arrangement accepting the data to the hard disk groups written into described DGR function.
Further alternative, in order to prevent leading to loss of data due to hard disk corruptions, can comprise in each hard disk groups At least two hard disks, each two hard disk mirror image hard disk each other.Specifically, the first hard disk groups include at least two hard disks, described Two hard disk mirror image hard disks each other in first hard disk groups;Described second hard disk groups include at least two hard disks, and described second Two hard disk mirror image hard disks each other in hard disk groups.
Wherein, when carrying out the initialization of hard disk groups function, data processing equipment can determine that the first hard disk groups are DGW function Hard disk groups, determine the second hard disk groups be DGR function hard disk groups.Specifically, S202 includes S202b:
S202b, data processing equipment read the eigenvalue of the 3rd data and the 3rd data from the first internal storage location.
Wherein, the 3rd data is similar with the first data in the embodiment of the present invention and the second data, is written into first One of data to be written in internal storage location data or one group of data.Data processing equipment can be according to data to be written Write the sequencing of the first internal storage location, read data successively from the first internal storage location.
It should be noted that data processing equipment is in the hard disk that multiple hard disk partition are extremely different in the embodiment of the present invention Group, and when determining the function of each hard disk groups, it is necessary to assure comprise a DGW in above-mentioned at least two hard disk groups.
Exemplary, if data processing equipment determines comprises 4 hard disks in data handling system, data processing equipment can For two hard disk groups, comprise 2 hard disks with by four hard disk partition of person in each hard disk groups, then one of hard disk groups can Using the hard disk groups as DGW function, another hard disk groups then can be used as the hard disk groups of DGR function(Current DGW function hard When the log space of the log area of disk group consumption is higher than predetermined threshold value, this two hard disk groups can switch the work(of its hard disk groups Can, the hard disk groups of that is, current DGW function switch to the hard disk groups of DGR function, and the hard disk groups of current DGR function switch to The hard disk groups of DGW function).Now, the first hard disk groups can be the hard disk groups of DGW function, and the second hard disk groups can be then DG work( Hard disk groups R of energy, the first hard disk groups and the second hard disk groups can be respectively hard disk groups.
Certainly, the hard disk included in the first hard disk groups and the second hard disk groups can also be different, if data processing equipment Determine and in data handling system, comprise 8 hard disks, 3 hard disks can be comprised in the first hard disk groups, can wrap in the second hard disk groups Containing 5 hard disks.
Wherein, data processing equipment can write the speed of data by Random data processing device to the log area of hard disk groups Data processing meanss arrange the speed of the data of the log area written into hard disk groups, and the speed writing data obtaining according to statistics The speed of degree and disposal data determines the number of hard disk in the hard disk groups of DGW function and the hard disk groups of DGR function respectively.At data It is existing that reason device determines that the concrete grammar of the number of hard disk in the hard disk groups of DGW function and the hard disk groups of DGR function may be referred to Associated description in technology, the embodiment of the present invention repeats no more here.
Wherein, because the log area of the first hard disk groups and the log area of the second hard disk groups are when carrying out hard disk groups initialization, Any data may be had not been written to, thus, it is supposed that data processing equipment determines the hard disk groups that the first hard disk groups are DGW function, the After two hard disk groups are the hard disk groups of DGR function, can first the eigenvalue of the read second data and the second data be write The log area of the first hard disk groups, that is, S202 also include S202c:
The eigenvalue of the 3rd data and the 3rd data is write the log area of the first hard disk groups by S202c, data processing equipment.
Specifically, because data processing equipment is in function Initialize installation, the first hard disk groups are hard as DGW function Disk group, using the second hard disk groups as DGR function hard disk groups, therefore, data processing equipment from the first internal storage location read To after the eigenvalue of the second data and the second data, the eigenvalue of the read the 3rd data and the 3rd data can be write The log area of the first hard disk groups.Now, data processing equipment does not arrange the data of the log area written into the first hard disk groups, only Only the write of data is carried out to the log area of the first hard disk groups, the pure write of data can improve the writing speed of data.
It is below data processing equipment by internal memory(First internal storage location)In data write the log area of hard disk groups, and whole Reason is written into the flow process of the first data in the log area of hard disk groups.
S203, data processing equipment read the eigenvalue of the first data and the first data from the first internal storage location.
Wherein, because the first data of write in the first internal storage location NVM is used for storing to hard disk groups, therefore, data Processing meanss, after hard disk groups carry out function initialization, can read the first data from the first internal storage location.
Whether S204, data processing equipment judge the log space consumption of the log area of the first hard disk groups higher than default threshold Value.
Wherein, because data processing equipment is in execution:The eigenvalue of the 3rd data and the 3rd data is write the first hard disk After the log area of group, in the log area of the first hard disk groups, the data volume of the first data of write may exceed certain threshold Value, and now have not been written to any data in the log area of the second hard disk groups, if now continuing to write the data reading The log area of the first hard disk groups, then may result in memory space inadequate in the log area of the first hard disk groups it is impossible to enough continuation Write data, leads to the write of data cannot be normally carried out, therefore, data processing equipment can be with real-time judge first hard disk groups Whether the log space of log area consumption is higher than predetermined threshold value, and the consumption of the log space in the log area of the first hard disk groups During higher than predetermined threshold value, function switching is carried out to the first hard disk groups and the second hard disk groups, determine that the first hard disk groups are DGR function Hard disk groups, determine the hard disk groups that the second hard disk groups are DGW function.Execute S205-S206:
Specifically, if the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, execute S205- S206;If the log space of the log area of the first hard disk groups consumption is not higher than predetermined threshold value, data processing equipment then can be by The first data reading and the eigenvalue of the first data continue to write to the log area of the first hard disk groups, i.e. execution and S202c class As step:The eigenvalue of the first data and the first data is write the log area of the first hard disk groups by data processing equipment.
The eigenvalue of the first data and the first data is write the log area of the second hard disk groups by S205, data processing equipment.
It should be noted that due to the first data except just having write in the log area of the second hard disk groups under current state With do not include any other data outside the eigenvalue of the first data, therefore data processing equipment is not to written into the second hard disk groups Log area in data arranged.
S206, data processing equipment, according to the eigenvalue of the data in the log area written into the first hard disk groups, have been write Enter the data compilation in the log area of the first hard disk groups to the data field of the first hard disk groups.
Wherein, include the 3rd data written into the data in the log area of the first hard disk groups.
It should be noted that when the log space consumption of the log area of the first hard disk groups is higher than predetermined threshold value, to first After hard disk groups and the second hard disk groups carry out hard disk groups function switching, data processing equipment then needs to suspend the data reading (As the first data)Write the log area of the first hard disk groups, only the first hard disk groups are executed:By the day written into the first hard disk groups Data compilation in will area to the first hard disk groups data field;And, due in the log area of the second hard disk groups under current state Do not include any other data in addition to the eigenvalue of the first data of just having write and the first data, data processing equipment is not Data in log area written into the second hard disk groups is arranged, write first number only in the log area of the second hard disk groups According to.It is thereby achieved that the separation of data compilation data write, improve the speed of data compilation data write simultaneously.
S207, data processing equipment read the eigenvalue of the second data and the second data from the first internal storage location.
Whether S208, data processing equipment judge the log space consumption of the log area of the second hard disk groups higher than default threshold Value.
Specifically, if the log space of the log area of the second hard disk groups consumption is higher than predetermined threshold value, execute S209- First hard disk groups and the second hard disk groups are carried out function switching by S210, determine the hard disk groups that the first hard disk groups are DGW function, Determine the hard disk groups that the second hard disk groups are DGR function;If the log space of the log area of the first hard disk groups consumption is not higher than pre- If threshold value, the eigenvalue of the read second data and the second data then can be continued to write to the second hard disk by data processing equipment The log area of group, that is, execute the step similar with S205:The eigenvalue of the second data and the second data is write by data processing equipment Enter the log area of the second hard disk groups.
The eigenvalue of the second data and the second data is write the log area of the first hard disk groups by S209, data processing equipment, And suspend the data field of the data compilation in the log area written into the first hard disk groups to the first hard disk groups, hard written into first Data in the log area of disk group includes the second data and unfinished 3rd data.
S210, data processing equipment, according to the eigenvalue of the data in the log area written into the second hard disk groups, have been write Enter the data compilation in the log area of the second hard disk groups to the data field of the second hard disk groups.
Wherein, it is the data reading in the first internal storage location written into the data in the log area of the second hard disk groups, that is, Write the first data of the second hard disk groups.
S211, data processing equipment read the eigenvalue of the 4th data and the 4th data from the first internal storage location.
Whether S212, data processing equipment judge the log space consumption of the log area of the first hard disk groups higher than default threshold Value.
Specifically, if the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, execute S213- First hard disk groups and the second hard disk groups are carried out function switching by S214, determine the hard disk groups that the second hard disk groups are DGW function, Determine the hard disk groups that the first hard disk groups are DGR function;If the log space of the log area of the first hard disk groups consumption is not higher than pre- If threshold value, the eigenvalue of the read the 4th data and the 4th data then can be continued to write to the first hard disk by data processing equipment The log area of group, that is, execute the step similar with S209:The eigenvalue of the 4th data and the 4th data is write by data processing equipment Enter the log area of the first hard disk groups.
The eigenvalue of the 4th data and the 4th data is write the log area of the second hard disk groups by S213, data processing equipment, And suspend the data field of the data compilation in the log area written into the second hard disk groups to the second hard disk groups.
S214, data processing equipment, according to the eigenvalue of the data in the log area written into the first hard disk groups, have been write Enter the data compilation in the log area of the first hard disk groups to the data field of the first hard disk groups.
Further alternative, in order to reduce after system cut-off, in the first internal storage location, do not write the data in hard disk groups Loss, data processing equipment can after cut-offing instruction is detected, by the first internal storage location all first data write DGW(First hard disk groups or the second hard disk groups)Log area.The method of the embodiment of the present invention can also include S215:
Before S215, data processing equipment execution power-off, the first data in the first internal storage location is write the hard disk of DGW function The flow process of group log area.
Specifically, before data processing equipment execution power-off, the first data in the first internal storage location is write the hard of DGW function The flow process of disk group log area can include:S215a and S215b or S215a and S215c:
S215a, data processing equipment detection cut-offing instruction.
Wherein, data processing equipment is after cut-offing instruction is detected, in order to prevent the number in the first internal storage location after power-off According to loss, all first data in the first internal storage location can be read successively from the first internal storage location, and will read First data write DGW function hard disk groups log area.
When the first hard disk groups are the hard disk groups of DGW function, and the second hard disk groups are the hard disk groups of DGR function, data processing Before device execution power-off, the flow process of the hard disk groups log area that the first data in the first internal storage location is write DGW function can be wrapped Include:S215a and S215b:
S215b, data processing equipment after cut-offing instruction is detected, according to the write of the first data in the first internal storage location Sequencing, reads all data in the first internal storage location successively from the first internal storage location, and the data reading is write Enter the log area of the first hard disk groups.
When the second hard disk groups are the hard disk groups of DGW function, and the first hard disk groups are the hard disk groups of DGR function, data processing Before device execution power-off, the flow process of the hard disk groups log area that the first data in the first internal storage location is write DGW function can be wrapped Include S215a and S215c:
S215c, data processing equipment after cut-offing instruction is detected, according to the write of the first data in the first internal storage location Sequencing, reads all data in the first internal storage location successively from the first internal storage location, and the data reading is write Enter the log area of the second hard disk groups.
Further, because the second internal storage location is volatibility random access devices for DRAM, DRAM is not support power-off The internal memory of protection.Therefore, after system cut-off, if described upper electricity is detected to load instruction, and after re-powering loading data, the It is any data that is stored with two internal storage locations.Now, if after receiving described data read command, data processing equipment Then need to read the data that corresponding data is then back to read from hard disk groups, the reading speed of data is relatively low, therefore, is Improve the reading speed of data, data processing equipment electricity on detecting loads instruction can by the data field of the first hard disk groups In the data that comprises and the second hard disk groups data field in the data that comprises write the second internal storage location.Specifically, the present invention is real The method applying example can also include:
Data Recovery Process after S216, the upper electricity of data processing equipment execution.
Wherein, S216 specifically can include S216a, S216b, S216c and S216d:
S216a, the upper electricity of data processing equipment detection load instruction.
S216b, data processing equipment electricity on detecting loads after instructing, according to the log area written into the second hard disk groups In data eigenvalue, by the data field of the data compilation in the log area written into the second hard disk groups to the second hard disk groups.
S216c, data processing equipment electricity on detecting loads after instructing, according to the log area written into the first hard disk groups In data eigenvalue, by the data field of the data compilation in the log area written into the first hard disk groups to the first hard disk groups.
S216d, data processing equipment are by the data of the data comprising in the data field of the first hard disk groups and the second hard disk groups The data comprising in area writes the second internal storage location.
Further alternative, if described upper electricity loads the upper electricity after instruction is specially abnormal power-down and loads instruction, in inspection After measuring electricity loading instruction, arranging written into the data in the log area of the first hard disk groups with written into the second hard disk groups Log area in data before, the method for the embodiment of the present invention can also include:Described in described first internal storage location The write sequencing of the first data, reads all data in the first internal storage location successively from the first internal storage location, and will The the first data write log area of the first hard disk groups reading and the log area of the second hard disk groups.
Further, due in S202 data processing equipment after receiving data writing commands, data can be write Enter the data to be written comprising in order and write the second internal storage location;Therefore, data processing equipment is receiving described data After reading order, can directly from second internal storage location read described data to be read, and not in need from hard disk groups read Fetch data, the reading speed of data is very fast, and can reduce the access times to hard disk groups.The method of the embodiment of the present invention is also S217 can be included:
S217, data processing equipment read the flow process of data to be read from the second internal storage location.
Wherein, S217 specifically can include S217a and S217b:
S217a, data processing equipment receiving data reading order, comprise data to be read in described data writing commands Mark.
S217b, data processing equipment after receiving described data read command, mark according to data to be read from Second internal storage location reads data to be read.
It should be noted that because data processing equipment is in alternately once two flow processs:1)To the first hard disk groups Log area writes data;Arrange in the log area of the second hard disk groups written into data, and by reduced data write second The data field of hard disk groups;2)Write data to the log area of the second hard disk groups;Arrange in the log area of the first hard disk groups written into Data, and by reduced data write the first hard disk groups data field.When then on detecting, electricity loads instruction, data The data of storage in the data of storage in the data field of the first hard disk groups and the data field of the second hard disk groups can be write by processing meanss Enter the second internal storage location, can directly be read from the second internal storage location according to data read command in order to data processing equipment Corresponding data, realizes the separation of reading and writing data, improves data reading speed.
But, there is problems that:Respectively by the data of storage and second hard disk groups in the data field of the first hard disk groups In data field, the data of storage writes the second internal storage location, may exist in the data field of the first hard disk groups the data of storage with The repetition of the data of storage in the data field of the second hard disk groups, and data processing equipment can not judge the number of which hard disk groups Data according to storage in area is up-to-date data, and therefore, data processing equipment can be will be first hard for the data reading write During the log area of disk group, determine the version information of data, then will be whole for the data in the log area written into the first hard disk groups When managing the data field to the first hard disk groups, update the version information of the data arranging to the data field of the first hard disk groups;To When the data that reads writes the log area of the second hard disk groups, determine the version information of data, then will be hard written into second Data compilation in the log area of disk group to the second hard disk groups data field when, update arrange to the data field of the second hard disk groups Data version information.Wherein, data processing equipment can determine the version information of data according to the write address information of data.
Exemplary, if the hard disk address corresponding to write address information a of data a to be written currently written into data Version information be version 2, the hard disk address corresponding to data b write address information b to be written currently written into data Version information is version 8;Then when comprising data a to be written, to be written in the first data that data processing equipment receives When write address information a of data a and data b to be written, write address information b of data b to be written, data processing equipment is then Can determine the data that will write write address information a(Data a to be written)Version information be version 3;Determination will be write Enter the data of write address information b(Data b to be written)Version information be version 9.
For example, executed with data processing equipment in the embodiment of the present invention:As a example step a and step b, illustrate that data processing fills Put the process that the pure data of concrete execution writes data arrangement.Wherein step a is:Will be from internal memory(First internal storage location)Middle reading The eigenvalue of the data data got writes the log area of the second hard disk groups, and suspends the daily record written into the second hard disk groups Data compilation in area to the second hard disk groups data field;Step b is:According to the number in the log area written into the first hard disk groups According to eigenvalue, by the data field of the data compilation in the log area written into the first hard disk groups to the first hard disk groups.
As shown in figure 8, adopting lowercase letter data itself in this example, represented using common Arabic data The write address information of data(As the block number of data), using the version information of the Arabic tables of data registration evidence of runic.For example, The block number of data d of write request in processes is the block number of 9, data b is 8 etc. for the block number of 2 and data c;Hard second The block number of data h in the data field of disk group is 11, and version information is 7, and this version information represents the 7th write hard disk of data h. Wherein.The version information of data is used for representing this data write hard drive space(Including the second hard disk groups and the first hard disk groups)Total Number of times.
As shown in figure 8, data processing equipment can according to the block number of the data in the log area written into the first hard disk groups, Write the data in the address corresponding to relevant block number in the data field of the first hard disk groups.As written into the first hard disk groups The block number of data r in log area is 4, and has determined that its version information is 3, then data processing equipment can be by written into the It is 4 address space that data r in the log area of one hard disk groups writes block number in the data field of the first hard disk groups, and by its version This information updating is 3;Block number written into data p in the log area of the first hard disk groups is 2, and has determined that its version information For 8, then data p in the log area written into the first hard disk groups can be write the data of the first hard disk groups by data processing equipment In area, block number is 2 address space, and its version information is updated to 8.Wherein, when the version information of data is more than 1, then It is not to write data for the first time in address space corresponding to the block number of this data, then data processing equipment can adopt this data Replace the data of storage in the address space corresponding to the block number of this data in the data field of the first hard disk groups.
Data processing method provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, data processing equipment then will be hard for the eigenvalue write second of the first data reading from internal memory and the first data The log area of disk group, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to Write the eigenvalue of the data in the log area of the first hard disk groups, by the data compilation in the log area written into the first hard disk groups To the second data field, it is the data reading from described internal memory written into the data in the log area of the first hard disk groups.With existing Execute data write data for all hard disks in technology simultaneously and arrange and compare, by this programme, hard disk can be carried out point Group, and only execute data write respectively by different hard disk groups or data compilation operate it is achieved that data pure continuously Write, can improve writing speed data simultaneously and arrange speed, improve the IOPS performance of data handling procedure, Jin Erke To realize quick and durableization of data.
Embodiment 3
The embodiment of the present invention provides a kind of data processing method, with two hard disk groups(First hard disk groups and the second hard disk groups) Carry out log write data arrangement, another hard disk groups respectively(3rd hard disk groups)Storage arranges from above-mentioned two hard disk groups and obtains Data instance, in embodiments of the present invention, as shown in fig. 7, the first hard disk groups only comprise log area, the second hard disk groups only comprise Log area;First data field and the second data field are the data field of the 3rd hard disk groups;As shown in figure 3, the method for the present embodiment Can include:
The data that S301, data processing equipment are written into writes the flow process of internal memory.
It should be noted that the internal memory in the embodiment of the present invention can include:First internal storage location(As NVM)In second Memory cell(As DRAM).Wherein, the specific descriptions of the first internal storage location and the second internal storage location may be referred to the embodiment of the present invention 1 In related content, the present embodiment repeats no more here.
Specifically, S301 can include:S301a-S301c:
S301a, data processing equipment receiving data writing commands.
Wherein, data to be written and the eigenvalue of data to be written are comprised in data writing commands, number to be written According to eigenvalue comprise:The write address information of data to be written and the size information of data to be written.
Data processing equipment can receive the data writing commands from I/O interface, and data writing commands are used for indicated number Write the data into the data to be written comprising in order according to processing meanss and write comprise in this data writing commands to be written The corresponding position of hard disk indicated by write address information of the data to be written in the eigenvalue of the data entering.
S301b, data processing equipment, after receiving data writing commands, write data into comprise in order to be written Data write the second internal storage location.
Wherein, the second internal storage location in the embodiment of the present invention is DRAM, and the first internal storage location is NVM.Because DRAM is A kind of volatile memory, is a kind of internal memory not supporting power-off protection, and the storage speed of DRAM and IOPS are much larger than commonly hard Disk, slightly above NVM.Therefore, in order to improve data processing equipment after receiving data read command, read the speed of data, Data processing equipment can write data into according to the writing position information of data to be written after receiving data writing commands The data to be written comprising in order writes the second internal storage location, is receiving digital independent life in order to data processing equipment After order, directly can read corresponding data from the second internal storage location, improve data reading speed.
It should be noted that the writing position information of data to be written is specifically as follows the block number of data to be written.I.e. The writing position information of the first data in the embodiment of the present invention can be the block number of the first data;The writing position information of the second data It can be the block number of the second data.
S301c, data processing equipment are written into data and the eigenvalue of data to be written writes the first internal storage location.
Wherein, the eigenvalue being written into data and data to be written in data processing equipment write the first internal storage location it Afterwards, in the embodiment of the present invention, data to be written that data processing equipment reads from the first internal storage location can be referred to as the first data, Second data and the 3rd data etc., that is, the first data and the second data are one of data to be written data or one group of number According to.
Specifically, the data in the first internal storage location is used for writing hard disk groups, and the data in the second internal storage location is used for carrying For the data that reads required by data read command it is achieved that the separation of reading and writing data.
It should be noted that the data that data processing equipment writes the second internal storage location only comprises data to be written, number Contain the eigenvalue of data to be written and data to be written according to the packet that processing meanss write the first internal storage location(To be written The write address information of the size information of data and data to be written).
It should be noted that after execution S301a, the sequencing that the embodiment of the present invention executes to S301b and S301c It is not limited.S301b can be first carried out in embodiments of the present invention, then execute S301c;S301c can also be first carried out, then execute S301b;S301b and S301c can also be executed simultaneously.
S302, data processing equipment carry out hard disk packet and the initialized flow process of hard disk groups function.
Specifically, S302 specifically can include S303a-S303b:
S302a, data processing equipment are by least three hard disk partition in hard drive space to the first hard disk groups, the second hard disk Group and the 3rd hard disk groups.
Wherein, comprise at least one hard disk in the first hard disk groups;At least one hard disk is comprised in second hard disk groups;3rd is hard At least one hard disk is comprised in disk group.
Hard disk groups divide hard disk groups, the hard disk groups of a DGR function and that can include a DGW function according to function The individual hard disk groups arranging the data obtaining for storage from above-mentioned two hard disk groups, described DGW is used for receiving from described first The data of internal storage location write, described DGR is used for accepting the arrangement to the hard disk groups data written into DGR function.
Further alternative, in order to prevent leading to loss of data due to hard disk corruptions, can comprise in each hard disk groups At least two hard disks, each two hard disk mirror image hard disk each other.Specifically, the first hard disk groups include at least two hard disks, described Two hard disk mirror image hard disks each other in first hard disk groups;Described second hard disk groups include at least two hard disks, and described second Two hard disk mirror image hard disks each other in hard disk groups;Described 3rd hard disk groups include at least two hard disks, described 3rd hard disk Two hard disk mirror image hard disks each other in group.
S302b, data processing equipment read the eigenvalue of the 3rd data and the 3rd data from the first internal storage location.
Wherein, the 3rd data is similar with the first data in the embodiment of the present invention and the second data, is written into first One of data to be written in internal storage location data or one group of data.Data processing equipment can be according to data to be written Write the sequencing of the first internal storage location, read data successively from the first internal storage location.
Wherein, described log area is used for described first data that storage is read from described first internal storage location.
Exemplary, if data processing equipment determines comprises 6 hard disks in data handling system, data processing equipment can For 3 hard disk groups, comprise 2 hard disks with by 6 hard disk partition of person in each hard disk groups, then one of hard disk groups are permissible As DGW, another hard disk groups then can be used as the hard disk groups of DGR function(The current log area of the hard disk groups of DGW function When log space consumption is higher than predetermined threshold value, this two hard disk groups can switch the function of its hard disk groups, that is, current DGW work( The hard disk groups of energy switch to the hard disk groups of DGR function, and the hard disk groups of current DGR function switch to the hard disk groups of DGW function), 3rd hard disk groups then can be used as the hard disk groups comprising data field.Now, the first hard disk groups can be the hard disk of DGW function Group, the second hard disk groups can be then the hard disk groups of DGR function, and the 3rd hard disk groups can comprise the hard disk groups of data field.
Certainly, the hard disk included in the first hard disk groups, the second hard disk groups and the 3rd hard disk groups can also be different, if number Determine according to processing meanss and in data handling system, comprise 9 hard disks, 2 hard disks, the second hard disk in the first hard disk groups, can be comprised 3 hard disks can be comprised in group, and 4 hard disks in the 3rd hard disk groups, can be comprised.
Wherein, data processing equipment can write the speed of data by Random data processing device to the log area of hard disk groups Data processing meanss arrange the speed of the data of the log area written into hard disk groups, and the speed writing data obtaining according to statistics The speed of degree and disposal data determines the number of hard disk in the hard disk groups of DGW function and the hard disk groups of DGR function respectively.At data It is existing that reason device determines that the concrete grammar of the number of hard disk in the hard disk groups of DGW function and the hard disk groups of DGR function may be referred to Associated description in technology, the embodiment of the present invention repeats no more here.
Wherein, because the log area of the first hard disk groups and the log area of the second hard disk groups are when carrying out hard disk groups initialization, Any data may be had not been written to, thus, it is supposed that data processing equipment determines the hard disk groups that the first hard disk groups are DGW function, the After two hard disk groups are the hard disk groups of DGR function, can first the eigenvalue of the read second data and the second data be write The log area of the first hard disk groups, that is, S302 also include S302c:
The eigenvalue of the 3rd data and the 3rd data is write the log area of the first hard disk groups by S302c, data processing equipment.
Specifically, because data processing equipment is in function Initialize installation, the first hard disk groups are hard as DGW function Disk group, using the second hard disk groups as DGR function hard disk groups, therefore, data processing equipment from the first internal storage location read To after the eigenvalue of the second data and the second data, the eigenvalue of the read the 3rd data and the 3rd data can be write The log area of the first hard disk groups.Now, data processing equipment does not arrange the data of the log area written into the first hard disk groups, only Only the write of data is carried out to the log area of the first hard disk groups, the pure write of data can improve the writing speed of data.
It is below data processing equipment by internal memory(First internal storage location)In data write the log area of hard disk groups, and whole Reason is written into the flow process of the first data in the log area of hard disk groups.
S303, data processing equipment read the eigenvalue of the first data and the first data from the first internal storage location.
Wherein, because the first data of write in the first internal storage location NVM is used for storing to hard disk groups, therefore, data Processing meanss, after hard disk groups carry out function initialization, can read the first data from the first internal storage location.
Whether S304, data processing equipment judge the log space consumption of the log area of the first hard disk groups higher than default threshold Value.
Wherein, because data processing equipment is in execution:The eigenvalue of the 3rd data and the 3rd data is write the first hard disk After the log area of group, in the log area of the first hard disk groups, the data volume of the first data of write may exceed certain threshold Value, and now have not been written to any data in the log area of the second hard disk groups, if now continuing to write the data reading The log area of the first hard disk groups, then may result in memory space inadequate in the log area of the first hard disk groups it is impossible to enough continuation Write data, leads to the write of data cannot be normally carried out, therefore, data processing equipment can be with real-time judge first hard disk groups Whether the log space of log area consumption is higher than predetermined threshold value, and the consumption of the log space in the log area of the first hard disk groups During higher than predetermined threshold value, function switching is carried out to the first hard disk groups and the second hard disk groups, determine that the first hard disk groups are DGR function Hard disk groups, determine the hard disk groups that the second hard disk groups are DGW function.Execute S305-S306:
Specifically, if the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, execute S305- S306;If the log space of the log area of the first hard disk groups consumption is not higher than predetermined threshold value, data processing equipment then can be by The first data reading and the eigenvalue of the first data continue to write to the log area of the first hard disk groups, i.e. execution and S302c class As step:The eigenvalue of the first data and the first data is write the log area of the first hard disk groups by data processing equipment.
The eigenvalue of the first data and the first data is write the log area of the second hard disk groups by S305, data processing equipment.
It should be noted that due to the first data except just having write in the log area of the second hard disk groups under current state With do not include any other data outside the eigenvalue of the first data, therefore data processing equipment is not to written into the second hard disk groups Log area in data arranged.
S306, data processing equipment, according to the eigenvalue of the data in the log area written into the first hard disk groups, have been write Enter the data compilation in the log area of the first hard disk groups to the data field of the 3rd hard disk groups.
Wherein, include the 3rd data written into the data in the log area of the first hard disk groups.
It should be noted that when the log space consumption of the log area of the first hard disk groups is higher than predetermined threshold value, to first After hard disk groups and the second hard disk groups carry out hard disk groups function switching, data processing equipment then needs to suspend the data reading (As the first data)Write the log area of the first hard disk groups, only the first hard disk groups are executed:By the day written into the first hard disk groups Data compilation in will area to the 3rd hard disk groups data field;And, due in the log area of the second hard disk groups under current state Do not include any other data in addition to the eigenvalue of the first data of just having write and the first data, data processing equipment is not Data in log area written into the second hard disk groups is arranged, write first number only in the log area of the second hard disk groups According to.It is thereby achieved that the separation of data compilation data write, improve the speed of data compilation data write simultaneously.
S307, data processing equipment read the eigenvalue of the second data and the second data from the first internal storage location.
Whether S308, data processing equipment judge the log space consumption of the log area of the second hard disk groups higher than default threshold Value.
Specifically, if the log space of the log area of the second hard disk groups consumption is higher than predetermined threshold value, execute S309- First hard disk groups and the second hard disk groups are carried out function switching by S310, determine the hard disk groups that the first hard disk groups are DGW function, Determine the hard disk groups that the second hard disk groups are DGR function;If the log space of the log area of the first hard disk groups consumption is not higher than pre- If threshold value, the eigenvalue of the read second data and the second data then can be continued to write to the second hard disk by data processing equipment The log area of group, that is, execute the step similar with S305:The eigenvalue of the second data and the second data is write by data processing equipment Enter the log area of the second hard disk groups.
The eigenvalue of the second data and the second data is write the log area of the first hard disk groups by S309, data processing equipment, And suspend the data field of the data compilation in the log area written into the first hard disk groups to the 3rd hard disk groups.
Wherein, the second data and unfinished 3rd data are included written into the data in the log area of the first hard disk groups.
S310, data processing equipment, according to the eigenvalue of the data in the log area written into the second hard disk groups, have been write Enter the data compilation in the log area of the second hard disk groups to the data field of the 3rd hard disk groups.
Wherein, it is the data reading in the first internal storage location written into the data in the log area of the second hard disk groups, that is, Write the first data of the second hard disk groups.
S311, data processing equipment read the eigenvalue of the 4th data and the 4th data from the first internal storage location.
Whether S312, data processing equipment judge the log space consumption of the log area of the first hard disk groups higher than default threshold Value.
Specifically, if the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, execute S313- First hard disk groups and the second hard disk groups are carried out function switching by S314, determine the hard disk groups that the second hard disk groups are DGW function, Determine the hard disk groups that the first hard disk groups are DGR function;If the log space of the log area of the first hard disk groups consumption is not higher than pre- If threshold value, the eigenvalue of the read the 4th data and the 4th data then can be continued to write to the first hard disk by data processing equipment The log area of group, that is, execute the step similar with S309:The eigenvalue of the 4th data and the 4th data is write by data processing equipment Enter the log area of the first hard disk groups.
The eigenvalue of the 4th data and the 4th data is write the log area of the second hard disk groups by S313, data processing equipment, And suspend the data field of the data compilation in the log area written into the second hard disk groups to the 3rd hard disk groups.
S314, data processing equipment, according to the eigenvalue of the data in the log area written into the first hard disk groups, have been write Enter the data compilation in the log area of the first hard disk groups to the data field of the 3rd hard disk groups.
Exemplary, executed with data processing equipment in the embodiment of the present invention:As a example step c and step d, illustrate at data The pure data of the concrete execution of reason device writes the process of data arrangement.Wherein step c is:Will be from internal memory(First internal storage location) In the eigenvalue of data data that reads write the log area of the second hard disk groups, and suspend written into the second hard disk groups Data compilation in log area to the 3rd hard disk groups data field;Step d is:According in the log area written into the first hard disk groups Data eigenvalue, by the data field of the data compilation in the log area written into the first hard disk groups to the 3rd hard disk groups.
As shown in figure 9, adopting lowercase letter data itself in this example, using Arabic tables of data registration evidence Write address information(As the block number of data).For example, the block number of data d of write request in processes is that the 9, block number of data b is 2 and the block number of data c be 8 etc.;The block number of data h in the data field of the 3rd hard disk groups is 11.
As shown in figure 9, data processing equipment can according to the block number of the data in the log area written into the first hard disk groups, Write the data in the address corresponding to relevant block number in the data field of the 3rd hard disk groups.As written into the first hard disk groups The block number of data r in log area is 4, then data processing equipment can be by the data in the log area written into the first hard disk groups In the data field of r write the 3rd hard disk groups, block number is 4 address space;Written into data p in the log area of the first hard disk groups Block number be 2, then data processing equipment can by the log area written into the first hard disk groups data p write the 3rd hard disk groups Data field in block number be 2 address space.Wherein, it is not write for the first time in the address space corresponding to when the block number of data During data, data processing equipment can be using corresponding to the block number of this data in the data field of this data replacement the 3rd hard disk groups The data of storage in address space.
Further alternative, in order to reduce after system cut-off, in the first internal storage location, do not write the data in hard disk groups Loss, data processing equipment can after cut-offing instruction is detected, by the first internal storage location all first data write DGW(First hard disk groups or the second hard disk groups)Log area.The method of the embodiment of the present invention can also include S315:
Before S315, data processing equipment execution power-off, the first data in the first internal storage location is write the hard disk of DGW function The flow process of group log area.
Specifically, before data processing equipment execution power-off, the first data in the first internal storage location is write the hard of DGW function The flow process of disk group log area can include:S315a and S315b or S315a and S315c:
S315a, data processing equipment detection cut-offing instruction.
Wherein, data processing equipment is after cut-offing instruction is detected, in order to prevent the number in the first internal storage location after power-off According to loss, all first data in the first internal storage location can be read successively from the first internal storage location, and will read First data write DGW function hard disk groups log area.
When the first hard disk groups are the hard disk groups of DGW function, and the second hard disk groups are the hard disk groups of DGR function, data processing Before device execution power-off, the flow process of the hard disk groups log area that the first data in the first internal storage location is write DGW function can be wrapped Include:S315a and S315b:
S315b, data processing equipment after cut-offing instruction is detected, according to the write of the first data in the first internal storage location Sequencing, reads all data in the first internal storage location successively from the first internal storage location, and the data reading is write Enter the log area of the first hard disk groups.
When the second hard disk groups are the hard disk groups of DGW function, and the first hard disk groups are the hard disk groups of DGR function, data processing Before device execution power-off, the flow process of the hard disk groups log area that the first data in the first internal storage location is write DGW function can be wrapped Include S315a and S315c:
S315c, data processing equipment after cut-offing instruction is detected, according to the write of the first data in the first internal storage location Sequencing, reads all data in the first internal storage location successively from the first internal storage location, and the data reading is write Enter the log area of the second hard disk groups.
Further, because the second internal storage location is volatibility random access devices for DRAM, DRAM is not support power-off The internal memory of protection.Therefore, after system cut-off, if described upper electricity is detected to load instruction, and after re-powering loading data, the It is any data that is stored with two internal storage locations.Now, if after receiving described data read command, data processing equipment Then need to read the data that corresponding data is then back to read from hard disk groups, the reading speed of data is relatively low, therefore, is Improve the reading speed of data, data processing equipment electricity on detecting loads instruction can by the data field of the 3rd hard disk groups In the data that comprises and the 3rd hard disk groups data field in the data that comprises write the second internal storage location.Specifically, the present invention is real The method applying example can also include:
Data Recovery Process after S316, the upper electricity of data processing equipment execution.
Wherein, S316 specifically can include S316a, S316b, S316c and S316d:
S316a, the upper electricity of data processing equipment detection load instruction.
S316b, data processing equipment electricity on detecting loads after instructing, according to the log area written into the second hard disk groups In data eigenvalue, by the data field of the data compilation in the log area written into the second hard disk groups to the 3rd hard disk groups.
S316c, data processing equipment electricity on detecting loads after instructing, according to the log area written into the first hard disk groups In data eigenvalue, by the data field of the data compilation in the log area written into the first hard disk groups to the 3rd hard disk groups.
S316d, data processing equipment are by the data of the data comprising in the data field of the 3rd hard disk groups and the 3rd hard disk groups The data comprising in area writes the second internal storage location.
Further alternative, if described upper electricity loads the upper electricity after instruction is specially abnormal power-down and loads instruction, in inspection After measuring electricity loading instruction, arranging written into the data in the log area of the first hard disk groups with written into the second hard disk groups Log area in data before, the method for the embodiment of the present invention can also include:Described in described first internal storage location The write sequencing of the first data, reads all data in the first internal storage location successively from the first internal storage location, and will The the first data write log area of the first hard disk groups reading and the log area of the second hard disk groups.
Further, due in S202 data processing equipment after receiving data writing commands, data can be write Enter the data to be written comprising in order and write the second internal storage location;Therefore, data processing equipment is receiving described data After reading order, can directly from second internal storage location read described data to be read, and not in need from hard disk groups read Fetch data, the reading speed of data is very fast, and can reduce the access times to hard disk groups.The method of the embodiment of the present invention is also S317 can be included:
S317, data processing equipment read the flow process of data to be read from the second internal storage location.
Wherein, S317 specifically can include S317a and S317b:
S317a, data processing equipment receiving data reading order, comprise data to be read in described data writing commands Mark.
S317b, data processing equipment after receiving described data read command, mark according to data to be read from Second internal storage location reads data to be read.
Data processing method provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, data processing equipment then will be hard for the eigenvalue write second of the first data reading from internal memory and the first data The log area of disk group, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to Write the eigenvalue of the data in the log area of the first hard disk groups, by the data compilation in the log area written into the first hard disk groups To the second data field, it is the data reading from described internal memory written into the data in the log area of the first hard disk groups.With existing Execute data write data for all hard disks in technology simultaneously and arrange and compare, by this programme, hard disk can be carried out point Group, and only execute data write respectively by different hard disk groups or data compilation operate it is achieved that data pure continuously Write, can improve writing speed data simultaneously and arrange speed, improve the IOPS performance of data handling procedure, Jin Erke To realize quick and durableization of data.
Embodiment 4
The embodiment of the present invention provides a kind of data processing equipment, as shown in figure 4, including:First judging unit 41, first write Unit 42 and the first arrangement unit 43.
First judging unit 41, whether the log space consumption for judging the log area of the first hard disk groups is higher than default Threshold value.
First writing unit 42, if determine the day of the log area of described first hard disk groups for described first judging unit 41 Will space consumption is higher than described predetermined threshold value, then by the eigenvalue of the first data reading from internal memory and described first data Write the log area of the second hard disk groups, and suspend the data compilation in the log area written into described second hard disk groups to first Data field, the data in the described log area written into described second hard disk groups includes described first data, described first data Eigenvalue include the write address information of described first data and the size information of described first data.
First arrangement unit 43, if determine the day of the log area of described first hard disk groups for described first judging unit 41 Will space consumption is higher than described predetermined threshold value, then according to the feature written into the data in the log area of described first hard disk groups Value, by the data compilation in the described log area written into described first hard disk groups to the second data field, described written into described Data in the log area of the first hard disk groups is the data reading from described internal memory.
Further, as shown in figure 5, described data processing equipment, also include:Second judging unit 44, second writes single Unit 45 and the second arrangement unit 46.
Second judging unit 44, for the first data and described that will read from internal memory in described first writing unit 42 After the eigenvalue of the first data writes the log area of the second hard disk groups, judge that the daily record of the log area of described second hard disk groups is empty Between consumption be higher than whether described predetermined threshold value.
Second writing unit 45, if determine the day of the log area of described second hard disk groups for described second judging unit 44 Will space consumption is higher than described predetermined threshold value, then by the spy of the second data reading from described internal memory and described second data Value indicative writes the log area of described first hard disk groups, and suspends the number in the described log area written into described first hard disk groups According to arranging to described second data field, the data in the described log area written into described first hard disk groups includes described second number According to the eigenvalue of described second data includes the write address information of described second data and the size information of described second data.
Second arrangement unit 46, if determine the day of the log area of described second hard disk groups for described second judging unit 44 Will space consumption is higher than described predetermined threshold value, then according to the feature written into the data in the log area of described second hard disk groups Value, by the data compilation in the described log area written into described second hard disk groups to described first data field, described written into Data in the log area of described second hard disk groups is the data reading from described internal memory.
It should be noted that as shown in figure 5, in embodiments of the present invention, the number that described first arrangement unit 43 is arranged Data according to the log area writing described first hard disk groups for the second writing unit 45;Described second arrangement unit 46 is arranged Data is the data of the log area that the first writing unit 42 writes described second hard disk groups.
Further alternative, in the first application scenarios of the embodiment of the present invention, described first data field is described the The data field of two hard disk groups;Described second data field is the data field of described first hard disk groups.
Further alternative, in the second application scenarios of the embodiment of the present invention, described first data field is hard for the 3rd The data field of disk group;Described second data field is the data field of described 3rd hard disk groups.
Further, in the first application scenarios of the embodiment of the present invention, described first hard disk groups comprise log area and Data field.
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described first hard disk groups is used for the daily record from described first hard disk groups for the storage The data arranging in area.
Described second hard disk groups comprise log area data area.
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
Further, in the second application scenarios of the embodiment of the present invention, described first hard disk groups only comprise log area; Described second hard disk groups only comprise log area;Described 3rd hard disk groups only comprise data field.
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
Further, in the first application scenarios, described first hard disk groups and described second hard disk groups are hard drive space In hard disk packet;At least two hard disks are comprised in described hard drive space.
Described data processing equipment also includes:Grouped element.
Grouped element, for judging the log space consumption of the log area of the first hard disk groups in described first judging unit Whether higher than before predetermined threshold value, by least two hard disk partition in described hard drive space to described first hard disk groups and described Second hard disk groups.
Wherein, described first hard disk groups comprise at least one described hard disk, and described second hard disk groups comprise at least one institute State hard disk.
Further alternative, in the first application scenarios, in described first hard disk groups, at least two hard disks can be comprised, Each two hard disk mirror image hard disk each other;At least two hard disks, each two hard disk mirror each other can be comprised in described second hard disk groups As hard disk.
Further, in second application scenarios, described first hard disk groups, described second hard disk groups and described 3rd hard Disk group is the hard disk packet in hard drive space;At least three hard disks are comprised in described hard drive space.
Described data processing equipment also includes:Grouped element.
Grouped element, for judging the log space consumption of the log area of the first hard disk groups in described first judging unit Whether higher than before predetermined threshold value, by least three hard disk partition in described hard drive space to described first hard disk groups, described Second hard disk groups and described 3rd hard disk groups.
Wherein, described first hard disk groups comprise at least one described hard disk, and described second hard disk groups comprise at least one institute State hard disk, described 3rd hard disk groups comprise at least one described hard disk.
Further alternative, in second application scenarios, at least two hard disks in the first hard disk groups, can be comprised, every two Individual hard disk mirror image hard disk each other;At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in second hard disk groups;The At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in three hard disk groups.
It should be noted that the specific descriptions of part functional module can in data processing equipment provided in an embodiment of the present invention With the corresponding content in reference method embodiment, the present embodiment is no longer described in detail here.
Data processing equipment provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, then the eigenvalue of the first data reading from internal memory and the first data is write the daily record of the second hard disk groups Area, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to hard written into first The eigenvalue of the data in the log area of disk group, by the data compilation in the log area written into the first hard disk groups to the second data Area, is the data reading from described internal memory written into the data in the log area of the first hard disk groups.It is directed to prior art All hard disks execute data write data arrangement simultaneously and compare, and by this programme, can be grouped hard disk, and by not The only write of execution data or data compilation operates it is achieved that the pure of data is continuously written into same hard disk groups respectively, Ke Yitong Shi Tigao writing speed data arranges speed, improves the IOPS performance of data handling procedure, and then can realize data Quick and durableization.
Embodiment 5
The embodiment of the present invention also provides a kind of data processing equipment, including:Processor.
Processor, if the log space consumption for the log area of described first hard disk groups is higher than described predetermined threshold value, Then the eigenvalue of the first data reading from internal memory and described first data is write the log area of the second hard disk groups, and suspend By the data compilation in the log area written into described second hard disk groups to the first data field, described written into described second hard disk Data in the log area of group includes described first data, and what the eigenvalue of described first data included described first data writes ground Location information and the size information of described first data;Feature according to the data in the log area written into described first hard disk groups Value, by the data compilation in the described log area written into described first hard disk groups to the second data field, described written into described Data in the log area of the first hard disk groups is the data reading from described internal memory.
Further, described processor, is additionally operable in the first data that will read from internal memory and described first data After eigenvalue writes the log area of the second hard disk groups, judge that the log space consumption of the log area of described second hard disk groups is No higher than described predetermined threshold value;If it is determined that the log space consumption of the log area of described second hard disk groups is higher than described default threshold Value, then write the day of described first hard disk groups by the eigenvalue of the second data reading from described internal memory and described second data Will area, and suspend the data compilation in the described log area written into described first hard disk groups to described second data field, institute State and include described second data, the eigenvalue bag of described second data written into the data in the log area of described first hard disk groups Include the write address information of described second data and the size information of described second data;According to written into described second hard disk groups The eigenvalue of the data in log area, by the data compilation in the described log area written into described second hard disk groups to described the One data field, the data in the described log area written into described second hard disk groups is the data reading from described internal memory.
Further alternative, in the first application scenarios of the embodiment of the present invention, described first data field is described the The data field of two hard disk groups;Described second data field is the data field of described first hard disk groups.
Further alternative, in the second application scenarios of the embodiment of the present invention, described first data field is hard for the 3rd The data field of disk group;Described second data field is the data field of described 3rd hard disk groups.
Further, in the first application scenarios of the embodiment of the present invention, described first hard disk groups comprise log area and Data field.
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described first hard disk groups is used for the daily record from described first hard disk groups for the storage The data arranging in area.
Described second hard disk groups comprise log area data area.
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
Further, in the second application scenarios of the embodiment of the present invention, described first hard disk groups only comprise log area; Described second hard disk groups only comprise log area;Described 3rd hard disk groups only comprise data field.
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
Further, in the first application scenarios, described first hard disk groups and described second hard disk groups are hard drive space In hard disk packet;At least two hard disks are comprised in described hard drive space.
Described processor, is additionally operable to whether the log space consumption in the log area judging the first hard disk groups is higher than default Before threshold value, by least two hard disk partition in described hard drive space to described first hard disk groups and described second hard disk groups.
Wherein, described first hard disk groups comprise at least one described hard disk, and described second hard disk groups comprise at least one institute State hard disk.
Further alternative, in the first application scenarios, in described first hard disk groups, at least two hard disks can be comprised, Each two hard disk mirror image hard disk each other;At least two hard disks, each two hard disk mirror each other can be comprised in described second hard disk groups As hard disk.
Further, in second application scenarios, described first hard disk groups, described second hard disk groups and described 3rd hard Disk group is the hard disk packet in hard drive space;At least three hard disks are comprised in described hard drive space.
Described processor, is additionally operable to whether the log space consumption in the log area judging the first hard disk groups is higher than default Before threshold value, by least three hard disk partition in described hard drive space to described first hard disk groups, described second hard disk groups and Described 3rd hard disk groups.
Wherein, described first hard disk groups comprise at least one described hard disk, and described second hard disk groups comprise at least one institute State hard disk, described 3rd hard disk groups comprise at least one described hard disk.
Further alternative, in second application scenarios, at least two hard disks in the first hard disk groups, can be comprised, every two Individual hard disk mirror image hard disk each other;At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in second hard disk groups;The At least two hard disks, each two hard disk mirror image hard disk each other can be comprised in three hard disk groups.
It should be noted that the specific descriptions of part functional module can in data processing equipment provided in an embodiment of the present invention With the corresponding content in reference method embodiment, the present embodiment is no longer described in detail here.
Data processing equipment provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, then the eigenvalue of the first data reading from internal memory and the first data is write the daily record of the second hard disk groups Area, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to hard written into first The eigenvalue of the data in the log area of disk group, by the data compilation in the log area written into the first hard disk groups to the second data Area, is the data reading from described internal memory written into the data in the log area of the first hard disk groups.It is directed to prior art All hard disks execute data write data arrangement simultaneously and compare, and by this programme, can be grouped hard disk, and by not The only write of execution data or data compilation operates it is achieved that the pure of data is continuously written into same hard disk groups respectively, Ke Yitong Shi Tigao writing speed data arranges speed, improves the IOPS performance of data handling procedure, and then can realize data Quick and durableization.
Embodiment 6
The embodiment of the present invention provides a kind of data handling system, in the first application scenarios of the embodiment of the present invention, such as Shown in Fig. 6, described data handling system includes:First hard disk groups, the second hard disk groups data processing meanss.
Wherein, in the first application scenarios, described first hard disk groups comprise log area data area;Described first hard disk The log area of group is used for the eigenvalue of the storage data of reading and described data reading from described internal memory from described internal memory; The data field of described first hard disk groups is used for the data that storage arranges from the log area of described first hard disk groups.
Described second hard disk groups comprise log area data area.
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The data field of described second hard disk groups is used for the daily record from described second hard disk groups for the storage The data arranging in area.
Specifically, in the first application scenarios, described data processing equipment, if the log area for first hard disk groups Log space consumption is higher than predetermined threshold value, then will be from internal memory(The first internal storage location in internal memory)First data of middle reading and The eigenvalue of described first data writes the log area of the second hard disk groups, and suspends the daily record written into described second hard disk groups Data compilation in area to the second hard disk groups data field, the packet in the described log area written into described second hard disk groups Include described first data, the eigenvalue of described first data includes the write address information of described first data and described first data Size information;According to the eigenvalue of the data in the log area written into described first hard disk groups, by described written into described Data compilation in the log area of the first hard disk groups to the first hard disk groups data field, described written into described first hard disk groups Data in log area is the data reading from described internal memory.
Further, described data processing equipment, the daily record being additionally operable in the log area determining described first hard disk groups is empty Between consumption be higher than described predetermined threshold value after, judge whether the log space consumption of the log area of described second hard disk groups high In described predetermined threshold value;If the log space consumption of the log area of described second hard disk groups is higher than described predetermined threshold value, will The second data reading from described internal memory and the log area of eigenvalue described first hard disk groups of write of described second data, and Suspend the data field of the data compilation in the described log area written into described first hard disk groups to described first hard disk groups, institute State and include described second data, the eigenvalue bag of described second data written into the data in the log area of described first hard disk groups Include the write address information of described second data and the size information of described second data;According to written into described second hard disk groups The eigenvalue of the data in log area, by the data compilation in the described log area written into described second hard disk groups to described the The data field of two hard disk groups, the data in the described log area written into described second hard disk groups is to read from described internal memory Data.
In the second application scenarios of the embodiment of the present invention, as shown in fig. 7, described data handling system includes:First Hard disk groups, the second hard disk groups, the 3rd hard disk groups, data processing equipment and internal memory(Described internal memory includes the first internal storage location and Two internal storage locations).
Wherein, in second application scenarios, described first hard disk groups only comprise log area;Described second hard disk groups are only wrapped Containing log area;Described 3rd hard disk groups only comprise data field.
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described The eigenvalue of the data reading in internal memory;The log area of described second hard disk groups is used for the data that storage is read from described internal memory Eigenvalue with the described data reading from described internal memory;The data field of described 3rd hard disk groups is used for storing from described first The data arranging in the log area of hard disk groups and the data arranging from the log area of described second hard disk groups.
Specifically, in second application scenarios, described data processing equipment, if the log area for first hard disk groups Log space consumption is higher than predetermined threshold value, then will be from internal memory(The first internal storage location in internal memory)First data of middle reading and The eigenvalue of described first data writes the log area of the second hard disk groups, and suspends the daily record written into described second hard disk groups Data compilation in area to the 3rd hard disk groups data field, the packet in the described log area written into described second hard disk groups Include described first data, the eigenvalue of described first data includes the write address information of described first data and described first data Size information;According to the eigenvalue of the data in the log area written into described first hard disk groups, by described written into described Data compilation in the log area of the first hard disk groups to the 3rd hard disk groups data field, described written into described first hard disk groups Data in log area is the data reading from described internal memory.
Further, described data processing equipment, the daily record being additionally operable in the log area determining described first hard disk groups is empty Between consumption be higher than described predetermined threshold value after, judge whether the log space consumption of the log area of described second hard disk groups high In described predetermined threshold value;If the log space consumption of the log area of described second hard disk groups is higher than described predetermined threshold value, will The second data reading from described internal memory and the log area of eigenvalue described first hard disk groups of write of described second data, and Suspend the data field of the data compilation in the described log area written into described first hard disk groups to described 3rd hard disk groups, institute State and include described second data, the eigenvalue bag of described second data written into the data in the log area of described first hard disk groups Include the write address information of described second data and the size information of described second data;According to written into described second hard disk groups The eigenvalue of the data in log area, by the data compilation in the described log area written into described second hard disk groups to described the The data field of three hard disk groups, the data in the described log area written into described second hard disk groups is to read from described internal memory Data.
Further, the internal memory in the embodiment of the present invention includes the first internal storage location and the second internal storage location.
Second internal storage location, for storing described data processing equipment after receiving data writing commands, write is described The data to be written of the second internal storage location, comprises described data to be written and described to be written in described data writing commands Data eigenvalue, the eigenvalue of described data to be written comprises:The write address information of described data to be written and institute State the size information of data to be written.
First internal storage location, for storing described data processing equipment after receiving data writing commands, write is described First data of the first internal storage location, described first data is that described data processing equipment wraps according in described data writing commands The data described to be written containing and the data message of the eigenvalue generation of described data to be written.
Further, described first internal storage location is nonvolatile memory NVM, described second internal storage location be dynamic with Machine accesses DRAM memory.
It should be noted that the specific descriptions of part functional module can in data handling system provided in an embodiment of the present invention With the corresponding content in reference method embodiment, the present embodiment is no longer described in detail here.
Data handling system provided in an embodiment of the present invention, if the log space of the log area of the first hard disk groups consumption is high In predetermined threshold value, data processing equipment then will be hard for the eigenvalue write second of the first data reading from internal memory and the first data The log area of disk group, and suspend the data compilation in the log area written into the second hard disk groups to the first data field;According to Write the eigenvalue of the data in the log area of the first hard disk groups, by the data compilation in the log area written into the first hard disk groups To the second data field, it is the data reading from described internal memory written into the data in the log area of the first hard disk groups.With existing Execute data write data for all hard disks in technology simultaneously and arrange and compare, by this programme, hard disk can be carried out point Group, and only execute data write respectively by different hard disk groups or data compilation operate it is achieved that data pure continuously Write, can improve writing speed data simultaneously and arrange speed, improve the IOPS performance of data handling procedure, Jin Erke To realize quick and durableization of data.
Through the above description of the embodiments, those skilled in the art can be understood that, for description Convenient and succinct, only it is illustrated with the division of above-mentioned each functional module, in practical application, can as desired will be upper State function distribution to be completed by different functional modules, the internal structure of device will be divided into different functional modules, to complete All or part of function described above.The specific work process of the system, apparatus, and unit of foregoing description, before may be referred to State the corresponding process in embodiment of the method, will not be described here.
It should be understood that disclosed system in several embodiments provided herein, apparatus and method are permissible Realize by another way.For example, device embodiment described above is only schematically, for example, described module or The division of unit, only a kind of division of logic function, actual can have other dividing mode when realizing, for example multiple units Or assembly can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not execute.Another, institute Display or the coupling each other discussing or direct-coupling or communication connection can be by some interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
The described unit illustrating as separating component can be or may not be physically separate, show as unit The part showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.The mesh to realize this embodiment scheme for some or all of unit therein can be selected according to the actual needs 's.
In addition, can be integrated in a processing unit in each functional unit in each embodiment of the present invention it is also possible to It is that unit is individually physically present it is also possible to two or more units are integrated in a unit.Above-mentioned integrated list Unit both can be to be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If described integrated unit is realized and as independent production marketing or use using in the form of SFU software functional unit When, can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part in other words prior art being contributed or all or part of this technical scheme can be in the form of software products Embody, this computer software product is stored in a storage medium, including some instructions with so that a computer Equipment(Can be personal computer, server, or network equipment etc.)Or processor(processor)Execution the present invention each The all or part of step of embodiment methods described.And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory(RAM, Random Access Memory), magnetic disc or CD Etc. various can be with the medium of store program codes.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by described scope of the claims.

Claims (4)

1. a kind of data processing method is it is characterised in that include:
If the log space of the log area of the first hard disk groups consumption is higher than predetermined threshold value, by the read from internal memory first number Write the log area of the second hard disk groups according to the eigenvalue with described first data, and suspend written into described second hard disk groups Data compilation in log area includes institute to the first data field, the data in the described log area written into described second hard disk groups State the first data, the eigenvalue of described first data includes the write address information of described first data and the big of described first data Little information;
According to the eigenvalue of the data in the log area written into described first hard disk groups, by described written into described first hard disk To the second data field, the data in the described log area written into described first hard disk groups is data compilation in the log area of group The data reading from described internal memory;
Wherein, described first data field is the data field of described second hard disk groups, and described second data field is described first hard disk The data field of group.
2. data processing method according to claim 1 is it is characterised in that described first hard disk groups comprise log area sum According to area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described internal memory The eigenvalue of the data of middle reading;The data field of described first hard disk groups is used for storage from the log area of described first hard disk groups The data arranging;
Described second hard disk groups comprise log area data area;
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described internal memory The eigenvalue of the data of middle reading;The data field of described second hard disk groups is used for storage from the log area of described second hard disk groups The data arranging.
3. a kind of data processing equipment is it is characterised in that include:
First judging unit, whether the log space consumption for judging the log area of the first hard disk groups is higher than predetermined threshold value;
First writing unit, if determine the log space of the log area of described first hard disk groups for described first judging unit Consumption is higher than described predetermined threshold value, then by the eigenvalue write second of the first data reading from internal memory and described first data The log area of hard disk groups, and suspend the data compilation in the log area written into described second hard disk groups to the first data field, Data in the described log area written into described second hard disk groups includes described first data, the eigenvalue of described first data Write address information including described first data and the size information of described first data;
First arrangement unit, if determine the log space of the log area of described first hard disk groups for described first judging unit Consumption is higher than described predetermined threshold value, then according to the eigenvalue written into the data in the log area of described first hard disk groups, by institute State written into the data compilation in the log area of described first hard disk groups to the second data field, described written into described first hard disk Data in the log area of group is the data reading from described internal memory;
Wherein, described first data field is the data field of described second hard disk groups, and described second data field is described first hard disk The data field of group.
4. data processing equipment according to claim 3 is it is characterised in that described first hard disk groups comprise log area sum According to area;
Wherein, the log area of described first hard disk groups be used for storage from described internal memory read data and described from described internal memory The eigenvalue of the data of middle reading;The data field of described first hard disk groups is used for storage from the log area of described first hard disk groups The data arranging;
Described second hard disk groups comprise log area data area;
Wherein, the log area of described second hard disk groups be used for storage from described internal memory read data and described from described internal memory The eigenvalue of the data of middle reading;The data field of described second hard disk groups is used for storage from the log area of described second hard disk groups The data arranging.
CN201410073208.6A 2014-02-28 2014-02-28 Data processing method and data processing device Active CN103838521B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410073208.6A CN103838521B (en) 2014-02-28 2014-02-28 Data processing method and data processing device
PCT/CN2014/089623 WO2015127791A1 (en) 2014-02-28 2014-10-28 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410073208.6A CN103838521B (en) 2014-02-28 2014-02-28 Data processing method and data processing device

Publications (2)

Publication Number Publication Date
CN103838521A CN103838521A (en) 2014-06-04
CN103838521B true CN103838521B (en) 2017-02-08

Family

ID=50802075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410073208.6A Active CN103838521B (en) 2014-02-28 2014-02-28 Data processing method and data processing device

Country Status (2)

Country Link
CN (1) CN103838521B (en)
WO (1) WO2015127791A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838521B (en) * 2014-02-28 2017-02-08 华为技术有限公司 Data processing method and data processing device
CN105138280B (en) * 2015-07-31 2018-10-19 成都华为技术有限公司 Method for writing data, apparatus and system
CN106648444B (en) * 2015-10-30 2019-06-28 大唐移动通信设备有限公司 A kind of message treatment method and equipment
CN106598768B (en) * 2016-11-28 2020-02-14 华为技术有限公司 Method and device for processing write request and data center
CN108334277B (en) * 2017-05-10 2019-06-28 中兴通讯股份有限公司 A kind of log write-in and synchronous method, device, system, computer storage medium
CN108763454A (en) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 Distributed file system daily record update method, system, device and storage medium
CN110908828A (en) * 2018-09-18 2020-03-24 杭州海康威视数字技术股份有限公司 Data storage method and device, electronic equipment and storage medium
CN113495883A (en) * 2020-03-20 2021-10-12 华为技术有限公司 Data storage method and device for database

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542054A (en) * 2011-12-29 2012-07-04 厦门雅迅网络股份有限公司 Method utilizing cache tables to improve insertion performance of data in database
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device
CN103559145A (en) * 2013-10-22 2014-02-05 华为技术有限公司 Data reading and writing method and electronic equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606694B2 (en) * 2000-12-22 2003-08-12 Bull Hn Information Systems Inc. Write logging in mirrored disk subsystems
KR100849221B1 (en) * 2006-10-19 2008-07-31 삼성전자주식회사 Method for managing non-volatile memory, and memory-based apparatus including the non-volatile memory
CN102750196A (en) * 2011-04-20 2012-10-24 大连兆阳软件科技有限公司 Data storage and backup system and method
CN102810050A (en) * 2011-05-31 2012-12-05 深圳市金蝶友商电子商务服务有限公司 Log data writing method and log system
SG196732A1 (en) * 2012-07-16 2014-02-13 Agency Science Tech & Res Data storage system, method of writing to storage in the data storage system, hard disk and method of forming the hard disk
CN103049355B (en) * 2012-12-25 2015-06-17 华为技术有限公司 Method and equipment for database system recovery
CN103678149B (en) * 2013-12-19 2017-01-18 华为技术有限公司 Data processing method and device
CN103838521B (en) * 2014-02-28 2017-02-08 华为技术有限公司 Data processing method and data processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542054A (en) * 2011-12-29 2012-07-04 厦门雅迅网络股份有限公司 Method utilizing cache tables to improve insertion performance of data in database
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device
CN103559145A (en) * 2013-10-22 2014-02-05 华为技术有限公司 Data reading and writing method and electronic equipment

Also Published As

Publication number Publication date
CN103838521A (en) 2014-06-04
WO2015127791A1 (en) 2015-09-03

Similar Documents

Publication Publication Date Title
CN103838521B (en) Data processing method and data processing device
CN103064795B (en) A kind of control method of memory device and relevant apparatus
CN101273334B (en) Assigning a processor to a logical partition in computer supporting multi-logic partition
CN103294557A (en) Multicore processor having active and inactive execution cores
CN101169760B (en) Electronic hard disk storage room management method
CN107562483A (en) A kind of method and device of carry guiding file system
CN103647850A (en) Data processing method, device and system of distributed version control system
CN104424122A (en) Electronic equipment and memory dividing method
CN103543901A (en) Method and device for generating menus
US8402199B2 (en) Memory management system and method thereof
CN104517067A (en) Method, device and system for data access
US8001314B2 (en) Storing a driver for controlling a memory
CN106055273A (en) Control panel and control method
CN103019624A (en) Phase change memory device
CN106708445B (en) Link selecting method and device
CN100492323C (en) Method and apparatus for protecting caching content and caching controller thereof
CN110618872B (en) Hybrid memory dynamic scheduling method and system
CN101290602B (en) Memory management method and system
CN105513630A (en) DRAM initialization method and device thereof
CN102956270B (en) Movable storage device detection method and device
CN106557385A (en) Data snapshot method and storage device
CN1312570C (en) Method and relative device for hardware array data migration
CN103064777A (en) Disk array alarming display method and device
CN101551802B (en) File access method used for management system
CN109032859A (en) A kind of NVME SSD logical block detection method, system and relevant apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220214

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right