CN105573668B - A kind of date storage method and device - Google Patents

A kind of date storage method and device Download PDF

Info

Publication number
CN105573668B
CN105573668B CN201510920688.XA CN201510920688A CN105573668B CN 105573668 B CN105573668 B CN 105573668B CN 201510920688 A CN201510920688 A CN 201510920688A CN 105573668 B CN105573668 B CN 105573668B
Authority
CN
China
Prior art keywords
data
cache
disk
data block
predetermined amount
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
CN201510920688.XA
Other languages
Chinese (zh)
Other versions
CN105573668A (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510920688.XA priority Critical patent/CN105573668B/en
Publication of CN105573668A publication Critical patent/CN105573668A/en
Application granted granted Critical
Publication of CN105573668B publication Critical patent/CN105573668B/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/0611Improving I/O performance in relation to response time
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Abstract

The invention discloses a kind of date storage method and devices, wherein this method includes:Judge whether the data in cache reach predetermined amount, if it is, the data in cache to be divided into the data block of N number of regular length, and N number of data block is stored into corresponding N number of disk;Wherein, N number of data block is corresponded with N number of disk.In technical solution disclosed in the present application, when data in the caches reach predetermined amount every time, it is divided into the data block of N number of regular length, and it is respectively written into corresponding N number of disk, thus, for any disk, the data block being written every time is regular length, it is corresponding, the mobile range of magnetic head is certain when writing data every time, therefore, when data are written, magnetic head is only needed according to the corresponding amplitude sequence of regular length to corresponding position, it is mobile to find the position of data write-in without carrying out repeatedly, the time is sought to greatly reduce disk, effectively increase disk performance.

Description

A kind of date storage method and device
Technical field
The present invention relates to technical field of data storage, more specifically to a kind of date storage method and device.
Background technology
The array that storage array, i.e. disk array are made of multiple disks makes multiple disks as single disk With, and then when carrying out data storage using disk array, often data are stored in segmented fashion in different disks.
General high performance disk array is all reached in the form of hardware, and traditional mechanical disk come It says, single dish capacity, rotating speed, tracking time are to determine most important three big factor of disk performance, wherein the tracking time is exactly magnetic head The average time of magnetic track where reaching target data, this time and magnetic head average latency time have codetermined magnetic head and have found number According to the time of position.Current general data processing method is to store number temporarily using cache (RAM or SSD) According to, then the data in cache are written in disk again, but inventor has found, since this mode will be in cache Data write-in disk when the tracking time used it is longer, therefore disk performance can be caused poor.
In conclusion to there is the tracking time when disk is written by cache in data longer and then lead to magnetic for the prior art The poor problem of disk performance.
Invention content
The object of the present invention is to provide a kind of date storage method and devices, when solving tracking existing in the prior art Between the longer and then problem that causes disk performance poor.
To achieve the goals above, the present invention provides the following technical solutions:
A kind of date storage method, including:
Judge whether the data in cache reach predetermined amount, if it is, the data in the cache are drawn It is divided into the data block of N number of regular length, and N number of data block is stored into corresponding N number of disk;Wherein, N number of data block and N A disk corresponds.
Preferably, further include:
When power down occurs, the function of powering for the cache is automatically turned on, and by the number in the cache According to being transferred in designated memory.
Preferably, by after in the data conversion storage to designated memory in the cache, further include:
Export prompt message, the prompt message include the designated memory location information and name information and by The data volume of the data in the designated memory is transferred in the cache.
Preferably, further include:
Data backup corresponding with the data in the cache is stored into designated memory.
Preferably, further include:
If the data in the cache are not up to predetermined amount, and after preset time period in the cache Data be still not up to predetermined amount, then the data in the cache are divided into the data block of M regular lengths, and M data block is stored into corresponding M disk, wherein M data block is corresponded with M disk;Wait for that the high speed is slow After the summation of the data deposited and the M data block reaches the predetermined amount, by the M data block by the M disk In be transferred in the cache.
A kind of data storage device, including:
Judgment module, for judging whether the data in cache reach predetermined amount;
First execution module, if the data in the cache reach predetermined amount, by the cache In data be divided into the data block of N number of regular length, and N number of data block is stored into corresponding N number of disk, wherein N number of Data block is corresponded with N number of disk.
Preferably, further include:
Power down process module automatically turns on the function of powering for the cache for when power down occurs, and by institute It states in the data conversion storage to designated memory in cache.
Preferably, further include:
Reminding module, for exporting prompt message, the prompt message include the designated memory location information and Name information and the data volume by being transferred to the data in the designated memory in the cache.
Preferably, further include:
Backup module, for storing data backup corresponding with the data in the cache to designated memory In.
Preferably, further include:
Second execution module if being not up to predetermined amount for the data in the cache, and passes through preset time Data after section in the cache are still not up to predetermined amount, then the data in the cache are divided into described in M The data block of regular length, and M data block is stored into corresponding M disk, wherein M data block and M disk one One corresponds to;After the summation of data and the M data block in the cache reaches the predetermined amount, by the M Data block in the M disk by being transferred in the cache.
The present invention provides a kind of date storage method and devices, wherein this method includes:Judge the number in cache According to whether reaching predetermined amount, if it is, the data in the cache are divided into the data block of N number of regular length, and N number of data block is stored into corresponding N number of disk;Wherein, N number of data block is corresponded with N number of disk.It is disclosed in the present application In technical solution, when data in the caches reach predetermined amount every time, it is divided into the data of N number of regular length Block, and be respectively written into corresponding N number of disk, for any disk, the data block being written every time is fixed length Degree, corresponding, the mobile range of magnetic head is certain when writing data every time, and therefore, when data are written, magnetic head only needs foundation The corresponding amplitude sequence of regular length is to corresponding position, without the multiple movement of progress to find the position of data write-in, from And the disk tracking time is greatly reduced, effectively increase disk performance.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of date storage method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of data storage device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, it illustrates a kind of flow chart of date storage method provided in an embodiment of the present invention, may include Following steps:
S11:Judge whether the data in cache reach predetermined amount, if so, S12 is thened follow the steps, if it is not, then Execute step S13.
Wherein, predetermined amount can be determined according to actual needs, it is generally the case that predetermined amount is with disk storage space It is corresponding, and memory space possessed by each disk is consistent in disk array under normal conditions, in disk array 20 disks are shared, the memory space of 1M can be each provided, therefore, it is 20M or 10M etc. that predetermined amount, which can be arranged, that is, logical In the case of often, the memory space that disk can be provided in disk array can be the integral multiple of predetermined amount.
S12:Data in cache are divided into the data block of N number of regular length, and N number of data block is stored to right In the N number of disk answered;Wherein, N number of data block is corresponded with N number of disk.
Wherein, regular length can be set according to actual needs, be it is corresponding with the predetermined amount that data reach, If shared 20 disks in disk array, the memory space of 1M can be each provided, when predetermined amount is 20M, regular length 1M, When predetermined amount is 10M, regular length 0.5M, and so on.In addition, N can be the integer more than 1.
S13:End operation.
In technical solution disclosed in the present application, when data in the caches reach predetermined amount every time, divided It for the data block of N number of regular length, and is respectively written into corresponding N number of disk, for any disk, writes every time The data block entered is regular length, and this guarantees the data blocks of each write-in disk to be sequentially written in, corresponding, often The mobile range of secondary magnetic head when writing data is certain, and therefore, when data are written, magnetic head only needs corresponding according to regular length Amplitude sequence is to corresponding position, without carrying out multiple movement to find the position of data write-in, to greatly reduce magnetic Disk seeks the time, effectively increases disk performance, can be suitable for any scene more demanding for disk performance.And works as and be somebody's turn to do Disk application when on product, can increase substantially product I OPS (Input/Output Operations Per Second, The number per second for being written and read operation).
In addition, in the prior art, not limited for the length of data block of disk is written, therefore, for any magnetic Disk, if necessary to delete the data block in disk, obtained idle storage space is corresponding with the data block, is being needed When using the idle storage space, it is necessary to searched in the caches to obtain the number with the idle storage space equal length According to block, it is seen then that be likely to occur the case where being wasted time due to the searching for data block in the prior art.And it is of the invention In a kind of date storage method that embodiment provides, since the length of the data block of write-in disk is fixed, for any magnetic Disk, if necessary to delete the data block in disk, obtained idle storage space is also regular length, therefore, is being needed When using the idle storage space, directly data block can be written, without finding data block, the time is saved, further carry High disk performance.
In a kind of date storage method that above-described embodiment provides, can also include:
When power down occurs, the function of powering for cache is automatically turned on, and extremely by the data conversion storage in cache In designated memory.
Wherein, designated memory is set by staff in advance, is automatically cache when power down occurs Power supply, and by the data conversion storage to designated memory in cache, can effectively avoid since data are lost caused by power down Lose, and then normally after the power is turned on, it is only necessary to will be can be completed in data conversion storage to cache again by designated memory it is follow-up will The operation of disk is written in data.
In addition, by after in the data conversion storage to designated memory in cache, can also include:
Prompt message is exported, prompt message includes the location information and name information and by cache of designated memory In be transferred to the data volumes of data in designated memory.
By prompting the location information and name information of designated memory, enable to staff after the power-up can be suitable Profit navigates to designated memory, and then smoothly obtains data therein, in addition, designation date amount, can make staff's root Judge whether this power down there are data not from being successfully transferred in designated memory and then lose in cache according to data volume Situation, and then it is able to carry out corresponding operation.
In a kind of date storage method that above-described embodiment provides, can also include:
Data backup corresponding with the data in cache is stored into designated memory.
By in real time backing up the data in cache, can break down in cache causes data to be lost When mistake, by restoring data in designated memory, to ensure that safety and the reliability of data, in addition, designated memory is It is preset by staff, it is generally the case that the designated memory utilized when designated memory herein and power down is simultaneously It is not same memory, " specified " two words therein, which are merely representative of, to be set by staff.
In a kind of date storage method that above-described embodiment provides, can also include:
If the data in cache are not up to predetermined amount, and the data after preset time period in cache are still Data in cache are then divided into the data block of M regular length, and M data block are stored by not up to predetermined amount To in corresponding M disk, wherein M data block is corresponded with M disk;Wait for the data in cache and M data After the summation of block reaches predetermined amount, by M data block by the supreme speed caching of unloading in M disk.
Wherein, preset time period can be determined according to actual needs, in simple terms, if the data in cache Not up to predetermined amount then waits for, if being also not up to predetermined amount after waiting for preset time period, which is divided into fixed length The data block of degree, i.e., N number of data block that the length of each data block is mentioned with above-described embodiment in the M data block divided herein In the length of each data block be identical, and then data block is stored respectively into corresponding M disk, is waited for until M is a When data block reaches predetermined amount with the aggregation of data in cache, then M data block is transferred in cache, at this point, Data reach predetermined amount in cache, then are operated according to step S12.Wherein, M disk belongs to N number of disk, and M can be with For the integer more than 1, it is less than N.
Corresponding with above method embodiment, the embodiment of the present invention additionally provides a kind of data storage device, such as Fig. 2 institutes Show, may include:
Judgment module 11, for judging whether the data in cache reach predetermined amount;
First execution module 12, if the data in cache reach predetermined amount, by the number in cache It is stored into corresponding N number of disk according to the data block for being divided into N number of regular length, and by N number of data block, wherein N number of data block It is corresponded with N number of disk.
In technical solution disclosed in the present application, when data in the caches reach predetermined amount every time, divided It for the data block of N number of regular length, and is respectively written into corresponding N number of disk, for any disk, writes every time The data block entered is regular length, and this guarantees the data blocks of each write-in disk to be sequentially written in, corresponding, often The mobile range of secondary magnetic head when writing data is certain, and therefore, when data are written, magnetic head only needs corresponding according to regular length Amplitude sequence is to corresponding position, without carrying out multiple movement to find the position of data write-in, to greatly reduce magnetic Disk seeks the time, effectively increases disk performance, can be suitable for any scene more demanding for disk performance.And works as and be somebody's turn to do Disk application when on product, can increase substantially product I OPS (Input/Output Operations Per Second, The number per second for being written and read operation).
Above-described embodiment provide a kind of data storage device, can also include:
Power down process module, for when power down occurs, automatically turning on the function of powering for cache, and high speed is slow In the data conversion storage to designated memory deposited.
Above-described embodiment provide a kind of data storage device, can also include:
Reminding module, for exporting prompt message, prompt message includes the location information and name information of designated memory And the data volume by being transferred to the data in designated memory in cache.
Above-described embodiment provide a kind of data storage device, can also include:
Backup module, for storing data backup corresponding with the data in cache into designated memory.
Above-described embodiment provide a kind of data storage device, can also include:
Second execution module, if it is not up to predetermined amount for the data in cache, and after preset time period Data in cache are still not up to predetermined amount, then the data in cache are divided into the data block of M regular length, And M data block is stored into corresponding M disk, wherein M data block is corresponded with M disk;Wait for cache In data and M data block summation reach predetermined amount after, M data block fast is cached by unloading in M disk is supreme.
The explanation of related content refers to the embodiment of the present invention in a kind of data storage device provided in an embodiment of the present invention Corresponding part illustrates in a kind of date storage method provided, and details are not described herein.
The foregoing description of the disclosed embodiments enables those skilled in the art to realize or use the present invention.To this A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest Range.

Claims (8)

1. a kind of date storage method, which is characterized in that including:
Judge whether the data in cache reach predetermined amount, if it is, the data in the cache are divided into N The data block of a regular length, and N number of data block is stored into corresponding N number of disk;Wherein, N number of data block and N number of disk It corresponds;
The method further includes:
If the data in the cache are not up to predetermined amount, and the number after preset time period in the cache According to predetermined amount is still not up to, then the data in the cache are divided into the data block of M regular lengths, and by M A data block is stored into corresponding M disk, wherein M data block is corresponded with M disk;Wait for the cache In data and the M data block summation reach the predetermined amount after, by the M data block by the M disk It is transferred in the cache.
2. according to the method described in claim 1, it is characterized in that, further including:
When power down occurs, the function of powering for the cache is automatically turned on, and the data in the cache are turned It deposits into designated memory.
3. according to the method described in claim 2, it is characterized in that, by the data conversion storage in the cache to specified storage After in device, further include:
Prompt message is exported, the prompt message includes the location information and name information and by described of the designated memory The data volume of the data in the designated memory is transferred in cache.
4. according to the method described in claim 1, it is characterized in that, further including:
Data backup corresponding with the data in the cache is stored into designated memory.
5. a kind of data storage device, which is characterized in that including:
Judgment module, for judging whether the data in cache reach predetermined amount;
First execution module will be in the cache if the data in the cache reach predetermined amount Data are divided into the data block of N number of regular length, and N number of data block is stored into corresponding N number of disk, wherein N number of data Block is corresponded with N number of disk;
Described device further includes:
Second execution module, if it is not up to predetermined amount for the data in the cache, and after preset time period Data in the cache are still not up to predetermined amount, then the data in the cache are divided into the M fixations The data block of length, and M data block is stored into corresponding M disk, wherein M data block and M disk one are a pair of It answers;After the summation of data and the M data block in the cache reaches the predetermined amount, by the M data Block in the M disk by being transferred in the cache.
6. device according to claim 5, which is characterized in that further include:
Power down process module automatically turns on the function of powering for the cache for when power down occurs, and by the height In data conversion storage to designated memory in speed caching.
7. device according to claim 6, which is characterized in that further include:
Reminding module, for exporting prompt message, the prompt message includes the location information and title of the designated memory Information and the data volume by being transferred to the data in the designated memory in the cache.
8. device according to claim 5, which is characterized in that further include:
Backup module, for storing data backup corresponding with the data in the cache into designated memory.
CN201510920688.XA 2015-12-11 2015-12-11 A kind of date storage method and device Active CN105573668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510920688.XA CN105573668B (en) 2015-12-11 2015-12-11 A kind of date storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510920688.XA CN105573668B (en) 2015-12-11 2015-12-11 A kind of date storage method and device

Publications (2)

Publication Number Publication Date
CN105573668A CN105573668A (en) 2016-05-11
CN105573668B true CN105573668B (en) 2018-10-12

Family

ID=55883862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510920688.XA Active CN105573668B (en) 2015-12-11 2015-12-11 A kind of date storage method and device

Country Status (1)

Country Link
CN (1) CN105573668B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018102967A1 (en) * 2016-12-05 2018-06-14 华为技术有限公司 Control method, storage device and system for data read/write command in nvme over fabric architecture
CN107168892A (en) 2017-03-29 2017-09-15 联想(北京)有限公司 The wiring method and device of a kind of data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854388A (en) * 2010-05-17 2010-10-06 浪潮(北京)电子信息产业有限公司 Method and system concurrently accessing a large amount of small documents in cluster storage
CN201788502U (en) * 2010-08-20 2011-04-06 北京联创信安科技有限公司 Magnetic-disc caching data backup and recovery device for accidental power outage
CN103729149A (en) * 2013-12-31 2014-04-16 创新科存储技术有限公司 Data storage method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854388A (en) * 2010-05-17 2010-10-06 浪潮(北京)电子信息产业有限公司 Method and system concurrently accessing a large amount of small documents in cluster storage
CN201788502U (en) * 2010-08-20 2011-04-06 北京联创信安科技有限公司 Magnetic-disc caching data backup and recovery device for accidental power outage
CN103729149A (en) * 2013-12-31 2014-04-16 创新科存储技术有限公司 Data storage method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
UItra 160 SCSI 磁盘阵列的分析与设计;冯冬明;《中国优秀所示学位论文全文数据库 信息科技辑》;20120515;第8页 *

Also Published As

Publication number Publication date
CN105573668A (en) 2016-05-11

Similar Documents

Publication Publication Date Title
US9021189B2 (en) System and method for performing efficient processing of data stored in a storage node
US9092321B2 (en) System and method for performing efficient searches and queries in a storage node
CN103246616B (en) A kind of globally shared buffer replacing method of access frequency within long and short cycle
CN102053923B (en) Storage method and storage device for logbook data
CN104516677B (en) Data in magnetic disk reading/writing method and disk storage device
US20150253992A1 (en) Memory system and control method
CN102831088A (en) Data migration method and device based on mixing memory
CN105183374B (en) A kind of data read-write method and mainboard
CN109814811B (en) Method for reducing influence of NVMe SSD response delay on write speed of high-speed data storage equipment
CN102982122A (en) Repeating data deleting method suitable for mass storage system
US20140075102A1 (en) Controller of a nonvolatile memory device and a command scheduling method thereof
US20120278544A1 (en) Flash memory controller
CN102541746B (en) Method and system for array data processing
CN103559145B (en) A kind of digital independent, wiring method and electronic equipment
CN101794259A (en) Data storage method and device
CN106681660B (en) IO scheduling method and IO scheduling device
CN106469123A (en) A kind of write buffer distribution based on NVDIMM, method for releasing and its device
CN109240939A (en) A kind of method of quick processing solid state hard disk TRIM
CN105573668B (en) A kind of date storage method and device
CN103455284A (en) Method and device for reading and writing data
CN101957729B (en) Logical block transformation method and method and device compatible with reading and writing of user based on same
CN105389268B (en) Data storage system and its operation method
US9928177B2 (en) Managing method for cache memory of solid state drive
US10169160B2 (en) Database batch update method, data redo/undo log producing method and memory storage apparatus
US9471227B2 (en) Implementing enhanced performance with read before write to phase change memory to avoid write cancellations

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant