CN102981979B - A kind of method improving memory system data access speed - Google Patents

A kind of method improving memory system data access speed Download PDF

Info

Publication number
CN102981979B
CN102981979B CN201210460982.3A CN201210460982A CN102981979B CN 102981979 B CN102981979 B CN 102981979B CN 201210460982 A CN201210460982 A CN 201210460982A CN 102981979 B CN102981979 B CN 102981979B
Authority
CN
China
Prior art keywords
medium
buffer memory
data
mapping
page
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.)
Expired - Fee Related
Application number
CN201210460982.3A
Other languages
Chinese (zh)
Other versions
CN102981979A (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.)
Shanghai Eisoo Information Technology Co Ltd
Original Assignee
Shanghai Eisoo Software 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 Shanghai Eisoo Software Co Ltd filed Critical Shanghai Eisoo Software Co Ltd
Priority to CN201210460982.3A priority Critical patent/CN102981979B/en
Publication of CN102981979A publication Critical patent/CN102981979A/en
Application granted granted Critical
Publication of CN102981979B publication Critical patent/CN102981979B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses a kind of method improving memory system data access speed, by catching all input output requests of initiating to low speed storage medium, and be redirected on high speed storing medium according to access situation by these input output requests, and then reach the object improving memory system data access speed.

Description

A kind of method improving memory system data access speed
Technical field
The application relates to technical field of computer data storage, particularly relates to a kind of method improving memory system data access speed.
Background technology
Since invention on computer, obtained develop rapidly between decades, its computing power is that geometry level increases.Along with the development of computing power, no matter memory technology is at capacity or in speed, have also been obtained unprecedented progress, and storage medium develops into mechanical hard disk and solid state hard disc from tape, floppy disk.The main flow medium of current mass data storage or mechanical hard disk, but mechanical disk always has the physics limit that it is difficult to break through, and user not only in the face of the problem of mass data storage, will ensure that the access of data is timely and effective simultaneously again.Therefore user usually faces the choice between speed and capacity.
Computer organization, logically distance CPU is far away in the position that data store, and data access speed is slower.And the gap of the access speed of the equipment between not at the same level can reach the difference of several order of magnitude.The access speed of internal memory is nanosecond, and disk access speeds is then Millisecond.Therefore, between internal memory and disk, huge performance boost space is also had.Store production firm also in the rotating speed improving constantly mechanical disk and storage density to improve the access performance of data while adding large data capacity.
Improve the access speed of data storage medium, multiple way can be had.Such as, more high-end storage medium can be used, as replaced slow-revving mechanical hard disk with high-revolving mechanical disk or solid magnetic disc (SSD); Or, increase the amount of ram of system, accelerated the access of data by the disk buffering technology of operating system self.All data being stored in such high-speed Medium, is no doubt a directly effective scheme solving data access speed.But when the total amount of data volume is very large, adopt high-end disk completely, its cost increased will there will be several times, or even the growth of tens times.Unless to some crucial application, otherwise its cost performance of such storage scheme loses more than gain, when limited budget, user also cannot bear such cost pressure.
Summary of the invention
This application provides a kind of method improving memory system data access speed, under the prerequisite that can rise not significantly at wananty costs, make storage system have higher data throughout.
A kind of method improving memory system data access speed that the embodiment of the present application provides, comprising:
A, source medium and buffer memory medium are logically divided into respectively the storage space of identical equal portions, every a storage space is called a mapping page; In internal memory, set up one for recording the re-direction table of the storage mapping relations of data between the mapping page of source medium and the mapping page of buffer memory medium, this re-direction table is initially sky; The access speed of described buffer memory medium is greater than the access speed of source medium;
B, all requests file system being submitted to source medium are monitored, and are judged that to the request of source medium be read request or write request, if read request, perform step C; If write request, perform step F;
C, from read request, extract the position of reading, calculate the numbering of the mapping page that it falls into according to this position data, and use this numbering to carry out inquiring about in re-direction table and whether have corresponding mapping item to exist, if existence, perform step D, otherwise perform step e;
D, according to re-direction table, this read request to be directed in the mapping page of buffer memory medium, after completing this read operation, to return step B;
E, the data of mapping page read request fallen into read from source medium and are written to buffer memory medium, and set up corresponding mapping item and be inserted in re-direction table, re-direction table is made to reflect the storage mapping relations of the data of current source medium and buffer memory medium, and by the data backspace file system required by read request; Then step B is returned;
F, write data into the corresponding position of source medium according to write request, and return step B.
Preferably, the size of each mapping page on source medium and buffer memory medium is all equal.
Preferably, mapping page size is the power square cards for learning characters joint of 2, and minimum is 16KB, is 2048KB to the maximum.
Preferably, the amount of capacity of buffer memory medium is the 5-20% of source dielectric capacity size.
Preferably, steps A comprises further: the critical value of the residue free space of named cache medium;
Comprise further after step e:
Judge whether the residue free space in buffer memory medium is less than critical value, if so, start-up space removal process, make to reclaim space and be greater than 2 times of described critical values with the summation of residue free space, otherwise directly return step B.
Preferably, step D comprises further: the frequency of utilization of the mapping page of described buffer memory medium is added 1;
Set up corresponding mapping item described in step e and be inserted into re-direction table and comprise: the frequency of utilization of this newly assigned mapping page is set to 1, reduce the free space of a caching of page medium;
Described space reclamation process comprises:
E1, obtain frequency of utilization and be worth minimum mapping page, and mapping page is deleted from re-direction table, increase the free space of 1 caching of page medium, increase simultaneously 1 page this altogether reclaim space;
E2, judgement are altogether reclaimed space and whether are more than or equal to recovery desired value, if then complete space reclamation process, otherwise return step e 1.
Preferably, 2 times that desired value is set to critical value are reclaimed.
Preferably, described critical value is the 1%-5% of buffer memory medium storage capacity.
As can be seen from the above technical solutions, by catching all input output requests of initiating to low speed storage medium, and be redirected on high speed storing medium according to access situation by these input output requests, and then reach the object improving memory system data access speed.
Accompanying drawing explanation
The method flow diagram of the raising memory system data access speed that Fig. 1 provides for the application;
The process flow diagram that storage system is accelerated that Fig. 2 provides for the embodiment of the present application;
The method flow diagram of the raising memory system data access speed that Fig. 3 provides for the embodiment of the present application.
Embodiment
For all data be kept in storage medium, according to data locality principle, not all data are all identical by the frequency that uses and possibility.As the data in internal memory relative to cpu cache, by CPU mono-L2 cache, frequently-used data is stored in the caches, calculated performance is largely increased.Within the storage system, situation and the internal memory of reality are similar, also be that a part of data are used to obtain very frequent (we claim the data of this part to be dsc data), and another part data make to be used less or even to access once just no longer to be used (we claim these part data to be cold data).And according to the principle of locality in computer science, the possibility that accessed data and neighbouring data thereof are accessed in the future is higher than the data of other positions.Particularly from the design of file system, the realization of file system is all tended to spatially carry out continuous dispensing and is stored data in these continuous print spaces.In mechanical disk, the maximum a part of time loss of data access is in the middle of addressing data process.Benefit from the continuity that data locality principle and file system data arrange, if be placed on by dsc data on high speed storing medium, cold data are placed on low speed storage medium, as long as so a little cost drops into the obvious lifting that just can obtain in memory property.
The application provides a kind of method improving memory system data access speed, by catching all input output requests of initiating to low speed storage medium, and be redirected on high speed storing medium according to access situation by these input output requests, and then reach the object improving memory system data access speed.Below accelerated low speed storage medium is called source medium, and high speed storing medium is called buffer memory medium.The capacity of high speed storing medium will be far little the capacity of source medium, generally select its capacity to be between the 5-20% of source dielectric capacity size.
The flow process of the method as shown in Figure 1, comprises the steps:
Step 101: storage space source medium and buffer memory medium being logically divided into respectively identical equal portions, every a storage space is called mapping page; The size of each mapping page on source medium and buffer memory medium is all equal.In internal memory, set up one for recording the re-direction table of the storage mapping relations of data between source medium and buffer memory medium, this re-direction table is initially sky.
The large I of mapping page is set to power side's byte-sized of 2, and minimum is 16KB, is 2048KB to the maximum, and the multiple that adjacent page size is 2 increases progressively, namely be respectively 16KB, 32KB, 64KB, 128KB, 256KB, 512KB, 1024KB, 2048KB, mapping page, once fixing, must not change.Mapping page is all be numbered from the starting position of medium by natural number order.
In computer systems, which, the data unit once read and write generally is 4KB to the maximum, therefore the processing mode of paging, the scope pre-read can be expanded, thus reduce the number of times of Data Migration between source medium and buffer memory medium, namely decrease the number of times of read-write operation, therefore this can cause the hit rate equal proportion of re-direction table to improve, and because IO number tails off, the time read and write data accordingly is just few, improves the overall performance of storage system.
Step 102: all requests file system being submitted to source medium are monitored.
Step 103: what judgement monitored is read request or write request to the request of source medium, if read request, performs step 104, if write request, performs step 107.
First time for data accesses, and no matter be read or write, so these data are then very likely accessed in the near future again.For the data access mode that input and output two kinds are dissimilar, need to adopt different implementation strategy.
Step 104: the position of extracting reading from read request, and the numbering of the mapping page that it falls into is calculated according to this position data, and use this numbering to carry out inquiring about in re-direction table and whether have corresponding mapping item to exist, if, perform step 105, otherwise perform step 106.
Step 105: this read request be directed in buffer memory medium according to re-direction table, returns step 102 after completing this read operation.
Step 106: the data of mapping page read request fallen into read from source medium and are written to buffer memory medium, and set up corresponding mapping item, be inserted in re-direction table, re-direction table is made to reflect the storage mapping relations of the data of current source medium and buffer memory medium, and by the data backspace file system required by read request.Then step 102 is returned.
Step 107: the relevant position writing data into source medium according to write request, and return step 102.
For making the know-why of technical scheme, feature and technique effect clearly, below in conjunction with specific embodiment, technical scheme is described in detail.
The initial setting up accelerated storage system that the embodiment of the present application provides as shown in Figure 2, comprising:
Step 201: additional one piece of hyperdisk is as buffer memory medium within the storage system.
Step 202: send ST_BINDING order to supervisory system, and source medium and buffer memory media identification are passed to monitoring module, completed establishment and the initialization thereof of binding relationship between source medium and buffer memory medium by monitoring module.
Step 203: the re-direction table that generation one is empty in internal memory associates with this binding relationship.
Step 204: the critical value of the residue free space of named cache medium.
The existence of critical value, is in order to when the residue free space of buffer memory medium is not enough, provides between a buffer zone, with start-up space reclaimer, makes the summation reclaiming space and residue free space be greater than described critical value and then terminates this space reclamation program.If do not have between this buffer zone, when inadequate buffer space, in order to vacate free space, need the access freezing source medium.This performance for system is a kind of injury.Preferably, critical value is taken as 1%-5%.
After above-mentioned initial setting up, the method flow of raising memory system data access speed as shown in Figure 3 can be performed:
Step 301: monitoring is sent to the input output request of source medium.
Step 302: judge whether the current request monitored is write request, if so, perform step 310, otherwise perform step 303.
Step 303: the position of extracting the data of write request, and calculate the numbering of the mapping page that it falls into, and utilize this numbering in re-direction table, search this mapping page.
Step 304: judge whether there is corresponding mapping page in re-direction table, if so, performs step 305, otherwise performs step 306.
Step 305: according to the target designation in this mapping page, is redirected to request in the mapping page of buffer memory medium, and the frequency of utilization of this mapping page is added 1, then return step 301.
Step 306: perform and arrive this, illustrate that data do not exist in buffer memory medium.First according to mapping page numbering by the digital independent of this mapping page in the medium of source out, the data required for read request are returned to file system.
Step 307: distribute a mapping page in buffer memory medium, and in the middle of newly assigned mapping page in the page data write buffer memory medium that reads out from source medium, then in re-direction table, these mapping relations list item is increased, and the frequency of utilization of this newly assigned mapping page is set to 1, reduce the free space of a caching of page medium.
Step 308: judge whether the residue free space in buffer memory medium is less than critical value, if perform step 309, otherwise directly returns step 301.
Step 309: start-up space removal process, comprising:
Step 309-a, obtain frequency of utilization and be worth minimum mapping page, and mapping page is deleted from re-direction table.
Step 309-b, increase the free space of 1 caching of page medium, increase simultaneously 1 page this altogether reclaim space.
Step 309-c, judgement are altogether reclaimed space and are more than or equal to recovery desired value, then complete space reclamation process, otherwise return step 309a continuation recovery.Wherein, 2 times that desired value can be set to critical value are reclaimed.
Step 310: directly make request mail to source medium, then return step 301.
By the method that the application provides, following effect can be reached:
1. shorten the read operation time of storage system, namely accelerate access speed.Because dsc data directly reads from buffer memory medium, the data be so accessed frequently, its performance boost is just obvious.
2. because the capacity of buffer memory medium is much smaller than source medium, so when a small amount of increase equipment cost, just storage medium access speed can be significantly improved, thus can meet the requirement of the application of more high-performance and handling capacity.
3., when processing read-write operation, owing to being the mode process of various pagings adopted, so different mapping page sizes can be selected according to different system to the processing mode of data, can optimally configure.As increased the size of mapping page, then generation IO number can be made to reduce, and increase the hit rate of re-direction table, thus improve the performance of storage system on the whole, make acceleration more effective.
4., because the redirected of read-write operation of data automatically occurs, the program for original use source medium does not affect, and does not therefore need to do to these programs the technology that any variation just can apply the application.
The foregoing is only the preferred embodiment of the application; not in order to limit the protection domain of the application; within all spirit in technical scheme and principle, any amendment made, equivalent replacements, improvement etc., all should be included within scope that the application protects.

Claims (8)

1. improve a method for memory system data access speed, it is characterized in that, comprising:
A, source medium and buffer memory medium are logically divided into respectively the storage space of identical equal portions, every a storage space is called a mapping page, in internal memory, set up one for recording the re-direction table of the storage mapping relations of data between the mapping page of source medium and the mapping page of buffer memory medium, this re-direction table is initially sky; The access speed of described buffer memory medium is greater than the access speed of source medium;
B, all requests file system being submitted to source medium are monitored, and are judged that to the request of source medium be read request or write request, if read request, perform step C; If write request, perform step F;
C, from read request, extract the position of reading, calculate the numbering of the mapping page that it falls into according to this position data, and use this numbering to carry out inquiring about in re-direction table and whether have corresponding mapping item to exist, if existence, perform step D, otherwise perform step e;
D, according to re-direction table, this read request to be directed in the mapping page of buffer memory medium, after completing this read operation, to return step B;
E, the data of mapping page read request fallen into read from source medium and are written to buffer memory medium, and set up corresponding mapping item and be inserted in re-direction table, re-direction table is made to reflect the storage mapping relations of the data of current source medium and buffer memory medium, and by the data backspace file system required by read request; Then step B is returned;
F, write data into the corresponding position of source medium according to write request, and return step B.
2. method according to claim 1, is characterized in that, the size of each mapping page on source medium and buffer memory medium is all equal.
3. method according to claim 1, is characterized in that, mapping page size is the power square cards for learning characters joint of 2, and minimum is 16KB, is 2048KB to the maximum.
4. method according to claim 1, is characterized in that, the amount of capacity of buffer memory medium is the 5-20% of source dielectric capacity size.
5. method according to claim 1, is characterized in that, steps A comprises further: the critical value of the residue free space of named cache medium;
Comprise further after step e:
Judge whether the residue free space in buffer memory medium is less than critical value, if so, start-up space removal process, make to reclaim space and be greater than recovery desired value with the summation of residue free space, otherwise directly return step B.
6. method according to claim 5, is characterized in that,
Step D comprises further: the frequency of utilization of the mapping page of described buffer memory medium is added 1;
Set up corresponding mapping item described in step e and be inserted into re-direction table and comprise: the frequency of utilization of newly assigned mapping page is set to 1, reduce the free space of a caching of page medium;
Described space reclamation process comprises:
E1, obtain frequency of utilization and be worth minimum mapping page, and mapping page is deleted from re-direction table, increase the free space of 1 caching of page medium, increase simultaneously 1 page this altogether reclaim space;
E2, judgement are altogether reclaimed space and whether are more than or equal to recovery desired value, if then complete space reclamation process, otherwise return step e 1.
7. method according to claim 6, is characterized in that, reclaims 2 times that desired value is set to critical value.
8. the method according to any one of claim 5 to 7, is characterized in that, described critical value is the 1%-5% of buffer memory medium storage capacity.
CN201210460982.3A 2012-11-15 2012-11-15 A kind of method improving memory system data access speed Expired - Fee Related CN102981979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210460982.3A CN102981979B (en) 2012-11-15 2012-11-15 A kind of method improving memory system data access speed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210460982.3A CN102981979B (en) 2012-11-15 2012-11-15 A kind of method improving memory system data access speed

Publications (2)

Publication Number Publication Date
CN102981979A CN102981979A (en) 2013-03-20
CN102981979B true CN102981979B (en) 2015-12-23

Family

ID=47856031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210460982.3A Expired - Fee Related CN102981979B (en) 2012-11-15 2012-11-15 A kind of method improving memory system data access speed

Country Status (1)

Country Link
CN (1) CN102981979B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338016B (en) 2014-06-27 2019-08-23 国际商业机器公司 Data high-speed caching method and device and resource request response method and device
KR20160058458A (en) * 2014-11-17 2016-05-25 에스케이하이닉스 주식회사 Memory system and operating method of memory system
CN106055487B (en) * 2016-05-31 2019-03-22 上海爱数信息技术股份有限公司 A kind of zoned coloration realizes the method and system of storage system acceleration
CN108537719B (en) * 2018-03-26 2021-10-19 上海交通大学 System and method for improving performance of general graphic processor
CN110865792B (en) * 2018-08-28 2021-03-19 中科寒武纪科技股份有限公司 Data preprocessing method and device, computer equipment and storage medium
CN110442533A (en) * 2019-07-18 2019-11-12 合肥杰发科技有限公司 A kind of method, equipment and storage medium improving access performance
CN110750505A (en) * 2019-08-31 2020-02-04 苏州浪潮智能科技有限公司 Large file reading optimization method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043593A (en) * 2010-12-17 2011-05-04 天津曙光计算机产业有限公司 Region-based management method for external cache of disk
CN102279809A (en) * 2011-08-10 2011-12-14 郏惠忠 Method for redirecting write in and garbage recycling in solid hard disk

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7639819B2 (en) * 2005-06-16 2009-12-29 Oracle International Corporation Method and apparatus for using an external security device to secure data in a database

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043593A (en) * 2010-12-17 2011-05-04 天津曙光计算机产业有限公司 Region-based management method for external cache of disk
CN102279809A (en) * 2011-08-10 2011-12-14 郏惠忠 Method for redirecting write in and garbage recycling in solid hard disk

Also Published As

Publication number Publication date
CN102981979A (en) 2013-03-20

Similar Documents

Publication Publication Date Title
CN102981979B (en) A kind of method improving memory system data access speed
CN104572478B (en) Data access method and data access device
CN103080910B (en) Storage system
US8595451B2 (en) Managing a storage cache utilizing externally assigned cache priority tags
CN106527969B (en) A kind of Nand Flash memorizer reading/writing method in a balanced way of life-span
CN107656875B (en) Method and system for shortening power-on time of solid state disk serving as system disk
CN103049349B (en) Based on Snapshot Method and the system of Bedding storage
CN101645043B (en) Methods for reading and writing data and memory device
CN102511044A (en) Method for deleting the data and device thereof
CN102609360A (en) Data processing method, data processing device and data processing system
CN1938670A (en) Dual media storage device
KR20100132244A (en) Memory system and method of managing memory system
CN103049224B (en) By the methods, devices and systems of data importing physical tape
KR20100065786A (en) Cache synchronization method and system for fast power-off
CN105608016B (en) Solid state hard disk of the DRAM in conjunction with MRAM and the storage card using MRAM
CN108182154A (en) A kind of reading/writing method and solid state disk of the journal file based on solid state disk
SG193114A1 (en) Data storage device and method of managing a cache in a data storage device
CN105630701B (en) Data storage device and the reading/writing method for using unavailable page table or unavailable piece of table
CN103942161A (en) Redundancy elimination system and method for read-only cache and redundancy elimination method for cache
CN103198021B (en) A kind of method improving solid state disk data transmission efficiency
CN105607862A (en) Solid state disk capable of combining DRAM (Dynamic Random Access Memory) with MRAM (Magnetic Random Access Memory) and being provided with backup power
US9785552B2 (en) Computer system including virtual memory or cache
CN104462388A (en) Redundant data cleaning method based on cascade storage media
CN103019963B (en) The mapping method of a kind of high-speed cache and storage device
CN105138277A (en) Cache management method for solid-state disc array

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
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: 201112 Shanghai, Minhang District, United Airlines route 1188, building second layer A-1 unit 8

Patentee after: SHANGHAI EISOO INFORMATION TECHNOLOGY CO., LTD.

Address before: 200072 room 3, building 840, No. 101 Middle Luochuan Road, Shanghai, Zhabei District

Patentee before: Shanghai Eisoo Software Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151223

Termination date: 20191115