CN106980471A - A kind of method and device for the hard disk write performance for improving smart machine - Google Patents
A kind of method and device for the hard disk write performance for improving smart machine Download PDFInfo
- Publication number
- CN106980471A CN106980471A CN201710188400.3A CN201710188400A CN106980471A CN 106980471 A CN106980471 A CN 106980471A CN 201710188400 A CN201710188400 A CN 201710188400A CN 106980471 A CN106980471 A CN 106980471A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- data block
- caching
- sector
- physical hard
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0622—Securing storage systems in relation to access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0667—Virtualisation aspects at data level, e.g. file, record or object virtualisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
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)
- Memory System Of A Hierarchy Structure (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of method for the hard disk write performance for improving smart machine, including:Generating storage in virtual hard disk, the virtual hard disk using the physical hard disk of Nonvolatile memory technology and the smart machine needs to write the data block of the physical hard disk;The data block is written on the corresponding caching of the physical hard disk;The positional information of the data stored according to the physical hard disk, the relevant information of the continuous free sector in the physical hard disk is obtained, and the data block order being temporarily stored in the caching is written in the continuous free sector according to the length of the relevant information and the data block.This method and corresponding device can effectively improve data and be continuously written into the probability of hard disk (physical hard disk), and reduce the random probability for writing data into hard disk, save the time that data write hard disk, improve hard disk write performance.
Description
Technical field
The present invention relates to smart machine field of storage, more particularly to a kind of side for the hard disk write performance for improving smart machine
Method and device.
Background technology
, it is necessary to store data in the hard disk of the smart machines such as computer during the use of the smart machines such as computer
In, carrying out needing to write data block in the corresponding sector of hard disk when data write the operation of hard disk, but at present in data
It is random writing during block write-in sector, especially the writing mode causes multiple data block scatter writes when to multiple data block operations
Enter in different sectors, the mode of complicated write-in can increase the write time, and cause the delay of data input and output, influence
Write performance.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method and device for the hard disk write performance for improving smart machine,
This method can increase the action of the hard disk progress sequential write of smart machine, improve the write efficiency of hard disk.
In order to solve the above-mentioned technical problem, embodiments of the invention employ following technical scheme:One kind improves intelligence and set
The method of standby hard disk write performance, including:
Virtual hard disk, the virtual hard disk are generated using the physical hard disk of Nonvolatile memory technology and the smart machine
Middle storage needs to write the data block of the physical hard disk;
The data block is written on the corresponding caching of the physical hard disk;
The positional information of the data stored according to the physical hard disk, obtains the continuous idle fan in the physical hard disk
The relevant information in area, and the data block order that will be temporarily stored according to the length of the relevant information and the data block in the caching
It is written in the continuous free sector.
Preferably, judging that the caching is before the data block is written on the corresponding caching of the physical hard disk
It is no to write full;
When the caching is fully written, judge whether the data block therein is written in the physical hard disk;
If do not write in the physical hard disk, the data block order in the caching is written to the physics hard
On the continuous free sector of disk and discharge the data block occupancy the caching additional space.
If preferably, the data block in the caching is had been written into the physical hard disk, judging the caching
Whether middle data block is changed, and additional space of the data block in the caching is discharged if not changing, if
During through changing, the data block order in the caching is written to the continuous free sector in the physical hard disk
On, and discharge the sector for the physical hard disk that the data block before change takes.
Write preferably, this method also includes storage data block in the buffer during the physical hard disk to institute
The free sector stated in physical hard disk carries out defragmentation.
Preferably, the step of defragmentation includes:
After the data block order in the caching is written to the sector of the continuous physical hard disk, to having been written into number
According to the sector of closing on of sector judged, if the data block is moved in sector in the sector of closing on for free sector
In position, described close on sector to merge.
The embodiment of the present invention additionally provides a kind of device for the hard disk write performance for improving smart machine, including is connected with each other
Processor and physical hard disk, the physical hard disk have caching, the computing device:
Using Nonvolatile memory technology and physical hard disk generation virtual hard disk, being stored in the virtual hard disk needs
Write the data block of the physical hard disk;
The data block is written on the corresponding caching of the physical hard disk;
The positional information of the data stored according to the physical hard disk, obtains the continuous idle fan in the physical hard disk
The relevant information in area, and the data block order that will be temporarily stored according to the length of the relevant information and the data block in the caching
It is written in the continuous free sector.
Preferably, the processor is further performed:
Judge whether the caching writes full before the data block is written on the corresponding caching of the physical hard disk;
When the caching is fully written, judge whether the data block therein is written in the physical hard disk;
If do not write in the physical hard disk, the data block order in the caching is written to the physics hard
On the continuous free sector of disk and discharge the data block occupancy the caching additional space.
If preferably, the data block in the caching is had been written into the physical hard disk, the processor is sentenced
Whether data block is changed in the disconnected caching, and corresponding sky of the data block in the caching is discharged if not changing
Between, if having occurred and that change, the data block order in the caching is written to the continuous institute in the physical hard disk
State on free sector, and discharge the sector for the physical hard disk that the data block before change takes.
Preferably, data block of the processor in storage in the buffer can during writing the physical hard disk
Defragmentation is carried out to the free sector in the physical hard disk.
Preferably, the processor is performed during defragmentation is carried out:
After the data block order in the caching is written to the sector of the continuous physical hard disk, to having been written into number
According to the sector of closing on of sector judged, if the data block is moved in sector in the sector of closing on for free sector
In position, described close on sector to merge.
The beneficial effect of the embodiment of the present invention is:This method and corresponding device can effectively improve data and be continuously written into
The probability of hard disk (physical hard disk), and reduce the random probability for writing data into hard disk, save data write-in hard disk when
Between, improve hard disk write performance.
Brief description of the drawings
Fig. 1 is the flow chart of the method for the hard disk write performance of the raising smart machine of the embodiment of the present invention;
Fig. 2 writes the first situation schematic diagram of physical hard disk for the data of the embodiment of the present invention;
Fig. 3 writes second of situation schematic diagram of physical hard disk for the data of the embodiment of the present invention;
Fig. 4 writes the third situation schematic diagram of physical hard disk for the data of the embodiment of the present invention;
Fig. 5 writes the 4th kind of situation schematic diagram of physical hard disk for the data of the embodiment of the present invention;
Fig. 6 writes the 5th kind of situation schematic diagram of physical hard disk for the data of the embodiment of the present invention;
Fig. 7 is the particular flow sheet of the method for the hard disk write performance of the raising smart machine of the embodiment of the present invention;
Fig. 8 is the structured flowchart of the device of the hard disk write performance of the raising smart machine of the embodiment of the present invention.
Description of reference numerals
1- processor 2- virtual hard disks 3- is cached
4- physical hard disks
Embodiment
The various schemes and feature of the present invention are described herein with reference to accompanying drawing.
It should be understood that can disclosed embodiments be made with various modifications.Therefore, description above should not be regarded
To limit, and only as the example of embodiment.Those skilled in the art will expect within the scope and spirit of
Other modifications.
Comprising in the description and constituting the accompanying drawing of a part of specification and show embodiments of the invention, and with it is upper
Substantially description and the detailed description given below to embodiment to the present invention that face is provided are used to explain the present invention together
Principle.
It is of the invention by description with reference to the accompanying drawings to the preferred form of the embodiment that is given as non-limiting examples
These and other characteristic will become apparent.
It is also understood that although with reference to some instantiations, invention has been described, people in the art
Member realize with can determine the present invention many other equivalents, they have feature as claimed in claim and therefore all
In the protection domain limited whereby.
When read in conjunction with the accompanying drawings, in view of described further below, in terms of above and other of the invention, feature and advantage will become
It is more readily apparent.
The specific embodiment of the present invention is described hereinafter with reference to accompanying drawing;It will be appreciated, however, that the disclosed embodiments are only
The example of the present invention, it can be implemented using various ways.The function and structure known and/or repeated is not described in detail to avoid
Unnecessary or unnecessary details make it that the present invention is smudgy.Therefore, specific structural and feature disclosed herein is thin
Section is not intended to restrictions, but as just the basis of claim and representative basis for instruct those skilled in the art with
Substantially any appropriate detailed construction is diversely using the present invention.
This specification can be used phrase " in one embodiment ", " in another embodiment ", " in another embodiment
In " or " in other embodiments ", it may refer to according to one or more of identical or different embodiment of the present invention.
A kind of method of the hard disk write performance of raising smart machine of the embodiment of the present invention, this method can be to computer
Hard disk (such as SMR hard disks) Deng smart machine is operated and improved the write performance of hard disk, it is to avoid as shown in Figure 1 non-occur
The situation of (such as random write) is continuously write, it is that the data in c1 are written to that such as discontinuous mode write, which will cache sector number in 3,
In the sector that the numbering of physical hard disk 4 is d1, the data that the data that the data in c2 are written in d4, c3 are written in d3, c4 are write
Enter to d8, the data that the data in c5 are written in d6, c6 are written to d7, and above-mentioned wiring method reduces the write-in of hard disk
Energy.And the method for combining the hard disk write performance of the raising smart machine of Fig. 7 embodiment of the present invention includes:
Virtual hard disk 2 is generated using the physical hard disk 4 of Nonvolatile memory technology (NVDIMM) and smart machine, it is virtual hard
Storage needs to write the data block of physical hard disk 4 in disk 2.Nonvolatile memory technology (NVDIMM) is to be integrated with dynamic in one kind
The technology of random access memory (DRAM) and Nonvolatile memory chip, can still be preserved fully powered-off when complete
Internal storage data, can use the technology in the present embodiment and combination physical hard disk 4 is generated and set in virtual hard disk 2, virtual hard disk 2
There is the data block that write-in physical hard disk 4 in need is stored at least one tactic sector, sector;
Data block is written on the corresponding caching 3 of physical hard disk 4, caching 3 also has continuous sector, can store number
According to block, and the writing mode can be diversified forms, for example can be by sequential write one by one of the data block according to the order of arrangement
Enter in caching 3, the write-in of data block at random can also be cached in 3, can also be by according in pre-defined rule write-in caching 3;
The positional information of the data stored according to physical hard disk 4, obtains the phase of the continuous free sector in physical hard disk 4
Information is closed, and is written to the data block order being temporarily stored in caching 3 continuously according to the length of the relevant information and data block
In free sector.When the data block cached in 3 is stored into physical hard disk 4 under normal circumstances, data block has certain length
Spend (such as each data block is respectively provided with certain length, is operated during storage to multiple continuous data blocks), certain length
Multiple data blocks, which are necessarily required to enough free sectors, to be stored, as preferably needing enough continuous free time
Sector is stored, and then ensures that data block can enter to physical hard disk 4 according to corresponding continuously write (sequential write) that put in order
In, and can detect the length of continuous free sector in the relevant information of the continuous free sector in obtaining physical hard disk 4
Degree, the relevant information such as position and numbering, so as to accurately search out the position of continuous free sector, and will have a fixed length
The data block of degree enters into these free sectors according to corresponding continuously write (sequential write) that put in order, in one embodiment such as
Shown in Fig. 3, the sector of physical hard disk 4 is free sector, then can be by the data cached in 3 according to the corresponding company that puts in order
Continue (sequential write) to enter into physical hard disk 4, the data block in the sector that numbering is c1 to c6 in caching 3 is continuously written into physics
In the contiguous sector of hard disk 4, and in data block write-in d1 in c1, in data block in c2 write-in d2, the data block in c3
Write in d3, in the data block write-in d4 in c4, in the data block write-in d5 in c5, in the data block write-in d6 in c6, wherein
D1 to d6 is continuous sector.The wiring method can effectively improve the write efficiency of hard disk, improve the overall performance of hard disk.
In one embodiment of the invention, judge slow before data block is written on the corresponding caching 3 of physical hard disk 4
Deposit whether 3 write full;When caching 3 is fully written, judge whether data block therein is written in physical hard disk 4;If do not write
Enter in physical hard disk 4, then the data block order cached in 3 is written on the continuous free sector of physical hard disk 4 and discharged
The additional space for the caching 3 that the data block takes.If caching 3 has been fully written data so again to when caching 3 write-in data
Original data cover can be fallen, then can cause original loss of data, therefore data block is being written to the correspondence of physical hard disk 4
Caching 3 on before judge to cache whether 3 write and can completely avoid maloperation from causing loss of data.If it is determined that caching 3 by
Write full data, also to determine whether whether the data block in caching 3 is written in physical hard disk 4, such as the caching 3 in Fig. 4
It has been be fully written that, and then judge that numbering is c2 in caching 3, whether c5, the data in c6 sector have been written to physical hard disk 4,
If do not write in physical hard disk 4, continuous free sector is found in material resources hard disk first, and ensure the continuous sky
Not busy sector disclosure satisfy that the data write-in in c2, c5, c6 sector, and obtaining numbering in physical hard disk 4 such as after searching is
D7, d8, d9 continuous free sector, by c2, c5, the data block in c6 is respectively written into d7, d8, d9, and discharges caching 3
Middle numbering is c2, c5, the space in c6 sector, so ensure the data in caching 3 will not be lost and cache 3 in also
Idle sector can be used.
Further, if the data block in caching 3 is had been written into physical hard disk 4, judge that data block is in caching 3
It is no to occur change (such as be written into new data block in caching 3 and then illustrate that data block has been modified), if do not changed
(data block for example cached in 3 is not updated, and now these data have been had been written into physical hard disk 4) then discharges
The data block is caching 3 additional space, so that the sector in caching 3 can be written into new data block.If it is determined that caching 3
Middle data block has occurred and that (is such as written into new data block) during change in caching 3, and the data block order cached in 3 is write
On continuous free sector into physical hard disk 4, and discharge the sector for the physical hard disk 4 that the data block before change takes.Knot
Fig. 5 is closed to be further described, if it is determined that the numbering in caching 3 is c1, c3, the data block in c4 sector is not by more
Newly, and now these data have been had been written into physical hard disk 4, then discharge c1, c3, c4 space;If it is determined that caching 3
In numbering be c1, c3, the data block in c4 sector is the data newly write, and the data block order cached in 3 is written to
Numbering in physical hard disk 4 is d7, d8, in d9 sector, and discharges c1, c3, the physical hard disk 4 that c4 data blocks take originally
Middle numbering is d1, d3, the data in d6 sector, to empty respective sectors, without causing data redundancy to physical hard disk 4.
One embodiment of the above method is further described with reference to Fig. 4, had in virtual hard disk 2 continuous
Multiple sectors, numbering is respectively to have continuous multiple sectors in m1 to mN, caching 3, and numbering is respectively c1 to c6, and physics is hard
There is hypographous sector representative in multiple continuous sector d1 to dN, figure to have data block to occupy corresponding fan in disk 4
Area, it is free sector that the sector of blank, which represents it, the m6 in virtual hard disk 2, the request of data write-in physical hard disk in m8 and m9
4, now m1, m3 and m4 have stored data into c1, c3 and c4 respectively, and c2, c5 and c6 are occupied in caching 3
But data block therein is not written in physical hard disk 4, search meets the free sector with sufficient length, finds d7,
By c2 after d8 and d9, original data block is written in d7, d8 and d9 in c5 and c6, then by m6, the data in m8 and m9
Write in c2, c5 and c6, the data returned in m6, m8 and m9 write successful information.
Another embodiment of the above method is further described with reference to Fig. 5, has in virtual hard disk 2 and connects
Continuous multiple sectors, numbering is respectively m1 to mN, has continuous multiple sectors in caching 3, and numbering is respectively c1 to c6, physics
There is hypographous sector representative in multiple continuous sector d1 to dN, figure to have data block to occupy accordingly in hard disk 4
, there is new data request write-in physical hard disk 4 sector, now m1, m3 and m4 have distinguished in virtual hard disk 2 in m6, m8 and m9
C1, c3 and c4 have been stored data into, and caching 3 is filled with, c1, and it is hard that the data in c3 and c4 can dump to physics
In disk 4, continuous sector d7, d8, d9 are searched in physical hard disk 4, by c1, data in c3 and c4 are respectively according to putting in order
Corresponding to be continuously written into sector d7, d8, d9 (write by the data in data the write-in d8, c4 in data write-in d7, c2 in such as c1
Enter d9), and discharge c1, c3, numbering is d1 in the physical hard disk 4 that c4 data blocks take originally, d3, the number in d6 sector
According to then by m6, m8 is corresponding with the data in m9 to be written in c1, c3 and c4, and the data returned in m6, m8 and m9 write successfully
Information.
In one embodiment of the invention, the method for the hard disk write performance of the raising smart machine also includes being stored in
Defragmentation is carried out to the free sector in physical hard disk 4 during data block write-in physical hard disk 4 in caching 3.Fragment
The free sector of diverse location can be will be dispersed in and be combined by arranging, so that these free sectors have enough space or length
Degree can store new data, and the data in caching 3 is entered according to corresponding continuously write (sequential write) that put in order
Into continuous multiple free sectors.
Furthermore, it is understood that the step of defragmentation includes:When the data block order in caching 3, to be written to continuous physics hard
Behind the sector of disk 4, judge having been written into the sector of closing on of sector of data, if closing on sector for free sector,
The position of mobile data block in a sector, sector is closed on to merge.What the sector of such as write-in data in physical hard disk 4 was closed on
The available free sector in the left and right sides, data block is moved to the left or to the right so that the available free sector in the left and right sides is merged into
Continuous free sector, to reach the purpose of defrag.It is further illustrated with reference to Fig. 6, in virtual hard disk 2
There is new data request write-in physical hard disk 4 in m6, m8 and m9, now m1, m3 and m4 have stored data into c1, c3 respectively
And c4, and cache and 3 be filled with, c1, d2, d3 and the d4 that the data in c3 and c4 can be dumped in physical hard disk 4 are (such as
The data write-in d4 in data the write-in d3, c4 in data write-in d2, c3 in c1), although the continuous sector of d2, d3 and d4,
But occurred in that in its both sides free sector d1 and d5, d1 and d5 due to length is small can not single data storage, adjustment mapping
Relation, will be originally used for m4 and is finally deposited into d4 to be adjusted to m4 being finally deposited into d1, according to new mapping relations by c1, c3
(sequential write) is continuously write with the former data in c4 to enter to d1, in d2 and d3, then by m6, m8 is corresponding with the data in m9 to be written to
In c1, c3 and c4, the data returned in m6, m8 and m9 write successful information.Can be to former d1 and d5 fragment since so
Carry out arrangement and form continuous free sector d4 and d5, in case the new data of storage.
Also a kind of device for the hard disk write performance for improving smart machine of the embodiment of the present invention, as shown in figure 8, including mutually
The processor 1 and physical hard disk 4 of connection, physical hard disk 4 have caching 3, are performed with reference to Fig. 7 processors 1:
Virtual hard disk 2 is generated using the physical hard disk 4 of Nonvolatile memory technology (NVDIMM) and smart machine, it is virtual hard
Storage needs to write the data block of physical hard disk 4 in disk 2.Nonvolatile memory technology (NVDIMM) is to be integrated with dynamic in one kind
The technology of random access memory (DRAM) and Nonvolatile memory chip, can still be preserved fully powered-off when complete
Internal storage data, can use the technology in the present embodiment and combination physical hard disk 4 is generated and set in virtual hard disk 2, virtual hard disk 2
There is the data block that write-in physical hard disk 4 in need is stored at least one tactic sector, sector;
Data block can be written on the corresponding caching 3 of physical hard disk 4 by processor 1, and caching 3 also has continuous sector,
Can data storage block, and the writing mode can be diversified forms, for example can by data block according to the order of arrangement by
One be sequentially written in caching 3, the write-in of data block at random can also be cached in 3, will can also be write according to pre-defined rule
In caching 3;
The positional information for the data that processor 1 can be stored according to physical hard disk 4, obtains the continuous sky in physical hard disk 4
The relevant information of not busy sector, and write the data block order being temporarily stored in caching 3 according to the length of the relevant information and data block
Enter into continuous free sector.When the data block cached in 3 is stored into physical hard disk 4 under normal circumstances, data block tool
There is certain length (such as each data block is respectively provided with certain length, is operated during storage to multiple continuous data blocks),
Multiple data blocks of certain length, which are necessarily required to enough free sectors, to be stored, enough as preferably needing
Continuous free sector is stored, so guarantee data block can according to put in order it is corresponding continuously write (sequential write) enter to
In physical hard disk 4, and the continuous free time can be detected in the relevant information of the continuous free sector in obtaining physical hard disk 4
The length of sector, the relevant information such as position and numbering, so as to accurately search out the position of continuous free sector, and will tool
The data block for having certain length enters into these free sectors according to corresponding continuously write (sequential write) that put in order, such as Fig. 3
Shown, the data block in the sector that numbering is c1 to c6 in caching 3 is continuously written into the contiguous sector of physical hard disk 4, and
In data block write-in d1 in c1, in the data block write-in d2 in c2, in the data block write-in d3 in c3, the data block in c4 is write
Enter in d4, in the data block write-in d5 in c5, in the data block write-in d6 in c6, wherein d1 to d6 is continuous sector.This is write
The write efficiency of hard disk can be effectively improved by entering method, improve the overall performance of hard disk.
In one embodiment of the invention, processor 1 is further performed:Data block is written to the correspondence of physical hard disk 4
Caching 3 on before judge caching 3 whether write expire;When caching 3 is fully written, judge whether data block therein is written to physics
In hard disk 4;If do not write in physical hard disk 4, the data block order cached in 3 is written to the continuous of physical hard disk 4
Free sector on and discharge the data block occupancy caching 3 additional space.If caching 3 has been fully written data so again
Original data cover can be fallen when writing data to caching 3, then can cause original loss of data, therefore write by data block
Judging whether caching 3 is write before entering onto the corresponding caching 3 of physical hard disk 4 can completely avoid maloperation from causing loss of data.Such as
Fruit judges that caching 3 has been fully written data, also to determine whether whether the data block in caching 3 is written in physical hard disk 4,
Such as caching 3 in Fig. 4 has been fully written, and then judges that numbering is c2 in caching 3, c5, the data in c6 sector whether by
Physical hard disk 4 is written with, if do not write in physical hard disk 4, continuous free sector is found in material resources hard disk first,
And ensure that the continuous free sector disclosure satisfy that the data write-in in c2, c5, c6 sector, it is hard in physics such as after searching
It is d7 that numbering is obtained in disk 4, d8, d9 continuous free sector, by c2, c5, and the data block in c6 is respectively written into d7, d8,
In d9, and it is c2 to discharge numbering in caching 3, c5, the space in c6 sector, so ensures that the data cached in 3 will not be lost
Losing and caching sector also available free in 3 to use.
Further, if the data block in caching 3 is had been written into physical hard disk 4, processor 1 is judged in caching 3
Whether data block occurs change (such as be written into new data block in caching 3 and then illustrate that data block has been modified), if not
Occurring change, (data block for example cached in 3 is not updated, and now these data have had been written into physical hard disk 4
In) additional space of the data block in caching 3 is then discharged, so that the sector in caching 3 can be written into new data block.If
Data block has occurred and that in the judgement of processor 1 caching 3 (is such as written into new data block) during change in caching 3, will cache in 3
Data block order be written on the continuous free sector in physical hard disk 4, and discharge change before data block take thing
Manage the sector of hard disk 4.It is further described with reference to Fig. 5, if the numbering in the judgement of processor 1 caching 3 is c1, c3, c4's
Data block in sector is not updated, and now these data have been had been written into physical hard disk 4, then discharge c1, c3,
C4 space;If the numbering in the judgement of processor 1 caching 3 is c1, c3, the data block in c4 sector is the number newly write
According to, it is d7 by the numbering that is written in physical hard disk 4 of data block order cached in 3, d8 in d9 sector, and discharges c1,
It is d1 to be numbered in the physical hard disk 4 that c3, c4 data block take originally, d3, the data in d6 sector, to empty respective sectors,
Without causing data redundancy to physical hard disk 4.
One embodiment of said apparatus is further described with reference to Fig. 4, had in virtual hard disk 2 continuous
Multiple sectors, numbering is respectively to have continuous multiple sectors in m1 to mN, caching 3, and numbering is respectively c1 to c6, and physics is hard
There is hypographous sector representative in multiple continuous sector d1 to dN, figure to have data block to occupy corresponding fan in disk 4
Area, it is free sector that the sector of blank, which represents it, and processor 1 requires the data write-in thing in the m6 in virtual hard disk 2, m8 and m9
Hard disk 4 is managed, now m1, m3 and m4 have stored data into c1, c3 and c4 respectively, and c2, c5 and c6 be in caching 3
Data block occupied but therein is not written in physical hard disk 4, and processor 1 searches for satisfaction in physical hard disk 4 to be had
The free sector of sufficient length, finds after d7, d8 and d9 and original data block in c2, c5 and c6 is written in d7, d8 and d9,
Then by m6, in data the write-in c2, c5 and c6 in m8 and m9, the data returned in m6, m8 and m9 write successful information.
Another embodiment of said apparatus is further described with reference to Fig. 5, has in virtual hard disk 2 and connects
Continuous multiple sectors, numbering is respectively m1 to mN, has continuous multiple sectors in caching 3, and numbering is respectively c1 to c6, physics
There is hypographous sector representative in multiple continuous sector d1 to dN, figure to have data block to occupy accordingly in hard disk 4
Sector, processor 1 requires the data write-in physical hard disk 4 in the m6 in virtual hard disk 2, m8 and m9, and now m1, m3 and m4 be
C1, c3 and c4 have been stored data into respectively, and caching 3 is filled with, c1, and the data in c3 and c4 can dump to thing
Manage in hard disk 4, processor 1 searches for continuous sector d7, d8, d9 in physical hard disk 4, by c1, the data difference in c3 and c4
According to put in order it is corresponding be continuously written into sector d7, d8, d9 (the data write-in d8 in data write-in d7, c2 in such as c1,
Data write-in d9 in c4), and discharge c1, c3, numbering is d1, d3 in the physical hard disk 4 that c4 data blocks take originally, d6's
Data in sector, then by m6, m8 is corresponding with the data in m9 to be written in c1, c3 and c4, returns to the number in m6, m8 and m9
According to the successful information of write-in.
In one embodiment of the invention, in the device of hard disk write performance of smart machine is improved, processor 1 exists
Also fragment is carried out to the free sector in physical hard disk 4 during the data block write-in physical hard disk 4 being stored in caching 3
Arrange.The free sector that defragmentation can will be dispersed in diverse location is combined, so that these free sectors have enough
Space or length can store new data, and data in caching 3 corresponding is continuously write according to putting in order
(sequential write) enters into continuous multiple free sectors.
Furthermore, it is understood that processor 1 is performed during defragmentation:When the data block order in caching 3 is written to
Behind the sector of continuous physical hard disk 4, judge having been written into the sector of closing on of sector of data, be if closing on sector
Free sector, then the position of mobile data block in a sector, sector is closed on to merge.Such as write-in data in physical hard disk 4
The available free sector in the left and right sides closed on of sector, processor 1 moves data block to the left or to the right so that left and right two
Continuous free sector is merged into the available free sector in side, to reach the purpose of defrag.Further carried out with reference to Fig. 6
Illustrate, processor 1 requires the data write-in physical hard disk 4 in the m6 in virtual hard disk 2, m8 and m9, and now m1, m3 and m4 be
C1, c3 and c4 are stored data into respectively, and have cached 3 and be filled with, processor 1 can be by c1, the number in c3 and c4
According to d2, d3 and the d4 (data that the data in such as c1 are write in data write-in d3, c4 in d2, c3 dumped in physical hard disk 4
Write d4), although the continuous sector of d2, d3 and d4, but occur in that free sector d1 and d5, d1 and d5 due to length in its both sides
Degree it is small can not single data storage, processor 1 adjusts mapping relations, will be originally used for m4 and be finally deposited into d4 to be adjusted to m4
Finally be deposited into d1, according to new mapping relations by c1, the former data in c3 and c4 are continuously write (sequential write) and entered to d1, d2 and
In d3, then by m6, m8 is corresponding with the data in m9 to be written in c1, c3 and c4, and the data returned in m6, m8 and m9 are written to
The information of work(.Arrangement can have been carried out to former d1 and d5 fragment since so and form continuous free sector d4 and d5, in case depositing
Chu Xin data.
Above example is only the exemplary embodiment of the present invention, is not used in the limitation present invention, protection scope of the present invention
It is defined by the claims.Those skilled in the art can make respectively in the essence and protection domain of the present invention to the present invention
Modification or equivalent substitution are planted, this modification or equivalent substitution also should be regarded as being within the scope of the present invention.
Claims (10)
1. a kind of method for the hard disk write performance for improving smart machine, including:
Generated and deposited in virtual hard disk, the virtual hard disk using the physical hard disk of Nonvolatile memory technology and the smart machine
Storage needs to write the data block of the physical hard disk;
The data block is written on the corresponding caching of the physical hard disk;
The positional information of the data stored according to the physical hard disk, obtains continuous free sector in the physical hard disk
Relevant information, and write the data block order being temporarily stored in the caching according to the length of the relevant information and the data block
Into the continuous free sector.
Before 2. according to the method described in claim 1, the data block is written on the corresponding caching of the physical hard disk
Judge whether the caching writes full;
When the caching is fully written, judge whether the data block therein is written in the physical hard disk;
If do not write in the physical hard disk, the data block order in the caching is written to the physical hard disk
On continuous free sector and discharge data block occupancy the caching additional space.
3. method according to claim 2, if the data block in the caching is had been written into the physical hard disk,
Judge whether data block is changed in the caching, the data block is discharged if not changing in the corresponding of the caching
Space, if having occurred and that change, the data block order in the caching is written to continuous in the physical hard disk
On the free sector, and discharge the sector for the physical hard disk that the data block before change takes.
4. the data block write-in physics that according to the method described in claim 1, this method also includes storing in the buffer is hard
Defragmentation is carried out to the free sector in the physical hard disk during disk.
5. the step of method according to claim 4, defragmentation, includes:
After the data block order in the caching is written to the sector of the continuous physical hard disk, to having been written into data
The sector of closing on of sector judged, if free sector is in the sector of closing on, and moves the data block in a sector
Position, described sector is closed on to merge.
6. a kind of device for the hard disk write performance for improving smart machine, includes the processor and physical hard disk of interconnection, institute
Stating physical hard disk has caching, the computing device:
Using Nonvolatile memory technology and physical hard disk generation virtual hard disk, storage needs write-in in the virtual hard disk
The data block of the physical hard disk;
The data block is written on the corresponding caching of the physical hard disk;
The positional information of the data stored according to the physical hard disk, obtains continuous free sector in the physical hard disk
Relevant information, and write the data block order being temporarily stored in the caching according to the length of the relevant information and the data block
Into the continuous free sector.
7. device according to claim 6, the processor is further performed:
Judge whether the caching writes full before the data block is written on the corresponding caching of the physical hard disk;
When the caching is fully written, judge whether the data block therein is written in the physical hard disk;
If do not write in the physical hard disk, the data block order in the caching is written to the physical hard disk
On continuous free sector and discharge data block occupancy the caching additional space.
8. device according to claim 7, wherein, if to have been written into the physics hard for the data block in the caching
In disk, the processor judges whether data block is changed in the caching, and the data block is discharged if change does not occur
In the additional space of the caching, if having occurred and that change, the data block order in the caching is written to the thing
Manage on the continuous free sector in hard disk, and discharge the fan for the physical hard disk that the data block before change takes
Area.
9. device according to claim 7, it is hard that data block of the processor in storage in the buffer writes the physics
During disk defragmentation can be carried out to the free sector in the physical hard disk.
10. device according to claim 7, the processor is performed during defragmentation is carried out:
After the data block order in the caching is written to the sector of the continuous physical hard disk, to having been written into data
The sector of closing on of sector judged, if free sector is in the sector of closing on, and moves the data block in a sector
Position, described sector is closed on to merge.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710188400.3A CN106980471B (en) | 2017-03-27 | 2017-03-27 | Method and device for improving hard disk writing performance of intelligent equipment |
PCT/CN2017/107005 WO2018176811A1 (en) | 2017-03-27 | 2017-10-20 | Hard disk write-in method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710188400.3A CN106980471B (en) | 2017-03-27 | 2017-03-27 | Method and device for improving hard disk writing performance of intelligent equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106980471A true CN106980471A (en) | 2017-07-25 |
CN106980471B CN106980471B (en) | 2020-08-25 |
Family
ID=59338981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710188400.3A Active CN106980471B (en) | 2017-03-27 | 2017-03-27 | Method and device for improving hard disk writing performance of intelligent equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106980471B (en) |
WO (1) | WO2018176811A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018176811A1 (en) * | 2017-03-27 | 2018-10-04 | 联想(北京)有限公司 | Hard disk write-in method and apparatus |
CN110968271A (en) * | 2019-11-25 | 2020-04-07 | 北京劲群科技有限公司 | High-performance data storage method, system and device |
CN113282582A (en) * | 2021-05-21 | 2021-08-20 | 海南超船电子商务有限公司 | Efficient storage method and system for ship position data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101398823A (en) * | 2007-09-26 | 2009-04-01 | 新奥特硅谷视频技术有限责任公司 | Method and system for implementing remote storage by virtual file systems technology |
CN102622412A (en) * | 2011-11-28 | 2012-08-01 | 中兴通讯股份有限公司 | Method and device of concurrent writes for distributed file system |
US20140280664A1 (en) * | 2013-03-14 | 2014-09-18 | Microsoft Corporation | Caching content addressable data chunks for storage virtualization |
CN105138286A (en) * | 2015-08-11 | 2015-12-09 | 智云创新(北京)科技有限公司 | Method for mixed utilization of SSD and SMR hard disks in disk file system |
CN105353985A (en) * | 2015-11-03 | 2016-02-24 | 国云科技股份有限公司 | Method for improving reading speed of virtual machine temporary file |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101539842A (en) * | 2009-04-27 | 2009-09-23 | 杭州华三通信技术有限公司 | Data wiring method of disk array system and disk array system |
CN102185929A (en) * | 2011-06-02 | 2011-09-14 | 杭州华三通信技术有限公司 | Storage area network (SAN)-resource-based video monitoring data storage method and device |
US9268709B2 (en) * | 2012-10-18 | 2016-02-23 | Marvell International Ltd. | Storage controllers and storage control methods |
CN105306865B (en) * | 2015-10-29 | 2019-05-17 | 四川奇迹云科技有限公司 | A kind of video monitoring data system |
CN106980471B (en) * | 2017-03-27 | 2020-08-25 | 联想(北京)有限公司 | Method and device for improving hard disk writing performance of intelligent equipment |
-
2017
- 2017-03-27 CN CN201710188400.3A patent/CN106980471B/en active Active
- 2017-10-20 WO PCT/CN2017/107005 patent/WO2018176811A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101398823A (en) * | 2007-09-26 | 2009-04-01 | 新奥特硅谷视频技术有限责任公司 | Method and system for implementing remote storage by virtual file systems technology |
CN102622412A (en) * | 2011-11-28 | 2012-08-01 | 中兴通讯股份有限公司 | Method and device of concurrent writes for distributed file system |
US20140280664A1 (en) * | 2013-03-14 | 2014-09-18 | Microsoft Corporation | Caching content addressable data chunks for storage virtualization |
CN105138286A (en) * | 2015-08-11 | 2015-12-09 | 智云创新(北京)科技有限公司 | Method for mixed utilization of SSD and SMR hard disks in disk file system |
CN105353985A (en) * | 2015-11-03 | 2016-02-24 | 国云科技股份有限公司 | Method for improving reading speed of virtual machine temporary file |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018176811A1 (en) * | 2017-03-27 | 2018-10-04 | 联想(北京)有限公司 | Hard disk write-in method and apparatus |
CN110968271A (en) * | 2019-11-25 | 2020-04-07 | 北京劲群科技有限公司 | High-performance data storage method, system and device |
CN110968271B (en) * | 2019-11-25 | 2024-02-20 | 北京劲群科技有限公司 | High-performance data storage method, system and device |
CN113282582A (en) * | 2021-05-21 | 2021-08-20 | 海南超船电子商务有限公司 | Efficient storage method and system for ship position data |
CN113282582B (en) * | 2021-05-21 | 2023-06-20 | 海南超船电子商务有限公司 | Efficient storage method and system for ship position data |
Also Published As
Publication number | Publication date |
---|---|
WO2018176811A1 (en) | 2018-10-04 |
CN106980471B (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230409473A1 (en) | Namespace change propagation in non-volatile memory devices | |
CN107066393B (en) | Method for improving mapping information density in address mapping table | |
CN105930282B (en) | A kind of data cache method for NAND FLASH | |
US6587915B1 (en) | Flash memory having data blocks, spare blocks, a map block and a header block and a method for controlling the same | |
JP4044067B2 (en) | Priority-based flash memory control device for XIP in serial flash memory, memory management method using the same, and flash memory chip using the same | |
US20170336983A1 (en) | Server device including cache memory and method of operating the same | |
CN109582593B (en) | FTL address mapping reading and writing method based on calculation | |
US20040085849A1 (en) | Flash memory, and flash memory access method and apparatus | |
CN109783398B (en) | Performance optimization method for FTL (fiber to the Home) solid state disk based on relevant perception page level | |
US20130227198A1 (en) | Flash memory device and electronic device employing thereof | |
JP2013137770A (en) | Lba bitmap usage | |
US11675709B2 (en) | Reading sequential data from memory using a pivot table | |
US7870122B2 (en) | Self-tuning index for flash-based databases | |
US20170160940A1 (en) | Data processing method and apparatus of solid state disk | |
CN110968269A (en) | SCM and SSD-based key value storage system and read-write request processing method | |
US8429339B2 (en) | Storage device utilizing free pages in compressed blocks | |
CN106980471A (en) | A kind of method and device for the hard disk write performance for improving smart machine | |
CN104298615B (en) | Method for equalizing swap partition loss of memory | |
CN108664217B (en) | Caching method and system for reducing jitter of writing performance of solid-state disk storage system | |
CN114185492A (en) | Solid state disk garbage recycling algorithm based on reinforcement learning | |
US20130262742A1 (en) | Method and apparatus for managing buffer cache to perform page replacement by using reference time information regarding time at which page is referred to | |
KR20180135390A (en) | Data journaling method for large solid state drive device | |
KR100533683B1 (en) | Data managing device and method for flash memory | |
Fisher et al. | A hybrid filesystem for hard disk drives in tandem with flash memory | |
US6324633B1 (en) | Division of memory into non-binary sized cache and non-cache areas |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |