The content of the invention
A kind of write request processing method is the embodiment of the invention provides, the purpose of network storage write delay is reduced to reach,The method includes:
In response to write request, the data that the write request asks write-in are obtained;
The data of the caching request write-in;
Sent to the transmitting terminal of the write request and ask to complete instruction, and the data of the request write-in that will be cached writeIn the network memory of rear end.
Further, the data of the request write-in are cached, including:
The data of the request write-in are cached by cache device.
Further, the cache device is arranged on the network link of IP storages.
Further, the cache device is arranged on the network link that IP is stored by way of bypass.
Further, during the transmitting terminal request to the write request completes instruction, methods described also includes:WillThe state of the data of the request write-in is set to not complete;
Accordingly, after the data of the request write-in that will be cached are write in the network memory of rear end, the sideMethod also includes:
Determine whether that the request that the network memory for receiving the rear end is returned completes instruction;
If received, the state of the data of the request write-in is set to complete.
The embodiment of the present invention additionally provides a kind of read request processing method, and the mesh of network storage read latency is reduced to reach, the method includes:
In response to read request, determine whether be cached with the data that the read request asks to read in buffer memory device;
If it has, then sending request to the transmitting terminal of the read request completes instruction, and the data is activation that will be cached to instituteState the transmitting terminal of read request.
In the network memory of the data write-in rear end of the request write-in.
Further, determine whether be cached with the data that the read request asks to read in buffer memory device, including:
Determine whether be cached with the data that the read request asks to read in cache device.
Further, the cache device is arranged on the network link of IP storages.
Further, the cache device is arranged on the network link that IP is stored by way of bypass.
Further, whether the read request is cached with buffer memory device in response to read request, is determined to ask to readData after, also include:
If it is not, obtaining the data that the read request is asked from the network memory of rear end;
The data and request that will be obtained complete instruction, send to the transmitting terminal of the read request.
The embodiment of the present invention additionally provides a kind of write request processing unit, and the mesh of network storage read latency is reduced to reach, the device includes:
Acquisition module, in response to write request, obtaining the data that the write request asks write-in;
Cache module, the data for caching the request write-in;
Sending module, instruction, and the request that will be cached are completed for sending request to the transmitting terminal of the write requestIn the network memory of the data write-in rear end of write-in.
The embodiment of the present invention additionally provides a kind of read request processing unit, and the mesh of network storage read latency is reduced to reach, the method includes:
Determining module, in response to read request, determining that whether the read request is cached with buffer memory device is asked to readThe data for taking;
Sending module, in the case of it is determined that having, sending request to the transmitting terminal of the read request and completing instruction, andWill cache data is activation to the read request transmitting terminal.
In embodiments of the present invention, by way of introducing caching so that the data of write request can first be write into caching,The data of read request are obtained from caching, and when write-in is cached or read from caching, are just sent instruction and is completed to instruct,Effectively reduce the purpose that read-write postpones so as to reach.
Specific embodiment
Further illustrate technical scheme below in conjunction with the accompanying drawings and by specific embodiment.
A kind of write request processing method is the embodiment of the invention provides, as shown in figure 1, may comprise steps of:
Step 101:In response to write request, the data that the write request asks write-in are obtained;
Step 102:The data of the caching request write-in;
In order that it is more rapid to cache speed, to reduce write delay, can by cache device cache it is described pleaseSeek the data of write-in.
That is, it is not that the network for directly writing data into rear end is deposited after the data that write-in is asked in capturing write requestIn reservoir, but first by the cache device of data buffer storage to connection.
The cache device can be arranged on the network link of IP storages, specifically, can be near the network storageUse end network on set up a speed buffering equipment, can be by the equipment with access link in the form of bypassing.
Step 103:Request is sent to the transmitting terminal of the write request to complete to instruct, and the request write-in that will be cachedIn the network memory of data write-in rear end.
That is, the storage service request on link is listened to, when a write request is received, the number of Direct Acquisition write requestAccording to, and be stored in cache, and the reply of IO completions is write in forgery one, and the reply is sent to write request transmitting terminal, togetherWhen be by data setting:Do not complete.After network memory only in rear end completes data write-in, and receive real rear endThe write request of return is successfully replied, then the data that will be cached are set to:Complete.
Specifically, during the transmitting terminal request to the write request completes instruction, the above method can also include:The state of the data of the request write-in is set to not complete;Accordingly, write by the data of the request for caching write-inAfter entering in the network memory of rear end, the above method can also include:Determine whether to receive the network storage of the rear endThe request that device is returned completes instruction;If received, the state of the data of the request write-in is set to complete.
The embodiment of the present invention additionally provides a kind of read request processing method, as shown in Fig. 2 may comprise steps of:
Step 201:In response to read request, determine whether be cached with the number that the read request asks to read in buffer memory deviceAccording to;
In order that it is more rapid to cache speed, and to reduce read latency, can be data cached by cache device.That is, it is not that the data to be read directly are obtained from the network memory of rear end when read request is received, but first in bufferingThe data to be read are searched whether in equipment.
The cache device can be arranged on the network link of IP storages, specifically, can be near the network storageUse end network on set up a speed buffering equipment, can be by the equipment with access link in the form of bypassing.
Step 202:If it has, then sending request to the transmitting terminal of the read request completes instruction, and the data that will be cachedSend to the transmitting terminal of the read request.
Further, whether the read request is cached with buffer memory device in response to read request, is determined to ask to readData after, can also include:If it is not, obtaining the number that the read request is asked from the network memory of rear endAccording to;The data and request that will be obtained complete instruction, send to the transmitting terminal of the read request.
Above-mentioned write request processing method and read request processing method are illustrated with reference to a specific embodiment, butIt is worth noting that, the specific embodiment merely to the present invention is better described, does not constitute inappropriate limitation of the present invention.
The existing universal performance of the network storage is not high, and read-write delay is larger, to be written and read acceleration for the network storage.UnderWrite request is accelerated respectively for face and read request accelerates explanation:
1) write request accelerates:
As shown in figure 3, can include:
S1:A speed buffering equipment is set up on the network near the use end of the network storage, and by the equipment with sideThe form on road is linked into link.
S2:Buffer device intercepts the storage service request on link, when a write request is received, Direct Acquisition write requestData, and write data into the cache of oneself.
S3:After the completion of caching, forge one and write the reply of IO completions, and this reply is sent to user, while willThe data setting for being cached is:Do not complete.
S4:If the write request for capturing real rear end return is successfully replied, the data that will be cached are set to:Complete.
Above-mentioned buffer device can be connected in the network of user and service end using the mode of concatenation, this whenThe role of agency is taken in storage, data cached when the I/O Request of user is received, and forges and replys, and I/O Request is turnedBack-end storage device is dealt into, is to have completed by data setting after the completion of back-end storage device.
2) read request accelerates:
As shown in figure 4, can include:
S1:A speed buffering equipment is placed on the network link of IP storages;
S2:The buffer device is linked into link with the equipment for bypassing, and eavesdrops the network message of all of IP storages
S3:If capture one read request, search it is locally buffered in whether have the data, have, forge one ask intoThe reply of work(, and send data to request end.
That is, the acceleration of the network storage is realized by way of adding speed buffering equipment on storage link, so that plusThe IO performances of the fast network storage.
A kind of write request processing unit is additionally provided based on same inventive concept, in the embodiment of the present invention, such as following realityApply described in example.Because the principle of write request processing unit solve problem is similar to write request processing method, therefore write request is processedThe implementation of device may refer to the implementation of write request processing method, repeats part and repeats no more.Used below, term is " singleUnit " or " module " can realize the combination of the software and/or hardware of predetermined function.Although the device described by following examplesPreferably realized with software, but hardware, or the realization of the combination of software and hardware is also that may and be contemplated.Fig. 5It is a kind of structured flowchart of the write request processing unit of the embodiment of the present invention, as shown in figure 5, can include:Acquisition module 501,Cache module 502 and sending module 503, illustrate to the structure below.
Acquisition module 501, in response to write request, obtaining the data that the write request asks write-in;
Cache module 502, the data for caching the request write-in;
Sending module 503, completes instruction, and will be asked described in caching for the transmitting terminal transmission request to the write requestAsk write-in data write rear end network memory in.
In one embodiment, cache module 502 by cache device specifically for caching the request write-inData.
In one embodiment, the cache device is arranged on the network link of IP storages.
In one embodiment, above-mentioned write request processing unit is additionally operable to asked to the transmitting terminal of the write requestDuring instruction, the state of the data of the request write-in is set to not complete;Accordingly, be additionally operable to by cacheAfter in the network memory of the data write-in rear end of the request write-in, it is determined whether receive the network storage of the rear endThe request that device is returned completes instruction;If received, the state of the data of the request write-in is set to complete.
A kind of read request processing unit is additionally provided based on same inventive concept, in the embodiment of the present invention, such as following realityApply described in example.Because the principle of read request processing unit solve problem is similar to read request processing method, therefore read request is processedThe implementation of device may refer to the implementation of read request processing method, repeats part and repeats no more.Used below, term is " singleUnit " or " module " can realize the combination of the software and/or hardware of predetermined function.Although the device described by following examplesPreferably realized with software, but hardware, or the realization of the combination of software and hardware is also that may and be contemplated.Fig. 6It is a kind of structured flowchart of the read request processing unit of the embodiment of the present invention, as shown in fig. 6, can include:The He of determining module 601Sending module 602, illustrates to the structure below.
Determining module 601, in response to read request, determining that whether being cached with the read request in buffer memory device is askedThe data of reading;
Sending module 602, in the case of it is determined that having, sending request completion to the transmitting terminal of the read request and referring toOrder, and will cache data is activation to the read request transmitting terminal.
In one embodiment, whether determining module 601 can specifically determine to be cached with cache device describedRead request asks the data for reading.
In one embodiment, aforementioned cache equipment can be arranged on the network link of IP storages.
In one embodiment, above-mentioned read request processing unit can also be in response to read request, it is determined that caching setsWhether it is cached with standby after the data that the read request asks reading, if it is not, from the network memory of rear endObtain the data that the read request is asked;The data and request that will be obtained complete instruction, send to the transmission of the read requestEnd.
In another embodiment, a kind of software is additionally provided, the software is used to perform above-described embodiment and preferred realityApply the technical scheme described in mode.
In another embodiment, a kind of storage medium is additionally provided, be stored with above-mentioned software in the storage medium, shouldStorage medium is included but is not limited to:CD, floppy disk, hard disk, scratch pad memory etc..
As can be seen from the above description, the embodiment of the present invention realizes following technique effect:By introducing cachingMode so that the data of write request can first be write caching, the data of read request are obtained from caching, and cached in write-inOr when being read from caching, just send instruction and complete instruction, effectively reduce the purpose that read-write postpones so as to reach.
Obviously, those skilled in the art should be understood that each module or each step of the above-mentioned embodiment of the present invention can be withRealized with general computing device, they can be concentrated on single computing device, or be distributed in multiple computing devicesOn the network for being constituted, alternatively, the program code that they can be can perform with computing device be realized, it is thus possible to by itStore and performed by computing device in the storage device, and in some cases, can be held with different from order hereinThe shown or described step of row, or they are fabricated to each integrated circuit modules respectively, or by the multiple in themModule or step are fabricated to single integrated circuit module to realize.So, the embodiment of the present invention is not restricted to any specific hardPart and software are combined.
The preferred embodiments of the present invention are the foregoing is only, is not intended to limit the invention, for the skill of this areaFor art personnel, the embodiment of the present invention can have various modifications and variations.It is all within the spirit and principles in the present invention, madeAny modification, equivalent substitution and improvements etc., should be included within the scope of the present invention.