CN106681668A - Hybrid storage system and storage method based on solid state disk caching - Google Patents

Hybrid storage system and storage method based on solid state disk caching Download PDF

Info

Publication number
CN106681668A
CN106681668A CN201710021507.9A CN201710021507A CN106681668A CN 106681668 A CN106681668 A CN 106681668A CN 201710021507 A CN201710021507 A CN 201710021507A CN 106681668 A CN106681668 A CN 106681668A
Authority
CN
China
Prior art keywords
request
solid
segmentation
write
state disk
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.)
Pending
Application number
CN201710021507.9A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710021507.9A priority Critical patent/CN106681668A/en
Publication of CN106681668A publication Critical patent/CN106681668A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/068Hybrid storage device

Abstract

The invention discloses a hybrid storage system and a storage method based on solid state disk caching. The system comprises a mechanical magnetic disk, wherein storage space is divided into a solid state disk of multiple cache blocks as well as a request classification module, a request assignment device and a cache management device; and the cache management device comprises a request management unit. According to the invention, the most suitable request is selectively cached on the solid state disk; the solid state disk is used to enhance overall performance of the system; the service life of the solid state disk is prolonged; and a compromise balance point is selected between the performance and the service life. In comparison with the solid state disk, the system performance can be enhanced, and the size of write data reaching the mechanical disk can be reduced greatly, so that the service life of the solid state disk can be increased.

Description

A kind of hybrid storage system cached based on solid-state disk and storage method
Technical field
The present invention relates to storage system field, and in particular to a kind of hybrid solid-state disk(SSD)And mechanical disk(HDD)Carry out The storage system and storage method of optimization storage.
Background technology
By mechanical disk(HDD)The I/O efficiency of the storage system of composition is all the bottle of computer system performance all the time Under the background that neck, especially current demand and computing capability are improved constantly so that between storage system and calculating, the gap of performance is got over Come bigger, the problem of I/O bottlenecks is also increasingly severe.The reason for causing I/O bottlenecks essentially consists in the physical access of mechanical disk Feature.In recent years, solid-state disk(SSD)Technology is achieved and is developed on a large scale very much, and its cost is substantially reduced, and cost performance has also been close to machinery magnetic Disk, therefore be gradually widely adopted within the storage system.
Different from mechanical disk, solid-state disk is made up of semiconductor chip, with can random access, high reliability, high-performance, The features such as low-power consumption.Although but solid-state disk has obviously performance advantage, wherein due to constituting the basic of solid-state disk Part is a kind of erasable programmable read-only memory(EEPROM)Chip so that the memory chip of solid-state disk carries out original place overriding (in-place update)Cost it is very high, and only with limited number of time erasable life.So research is in modern storage Solid-state disk how is maximally utilised in system, its latent defect is simultaneously avoided, with important research meaning.
The content of the invention
The present invention utilizes solid-state disk and mechanical disk to there is the excellent of complementation to lack at aspects such as performance, capacity, cost, life-spans Point, storage system and storage method that a kind of solid-state disk of proposition is mixed with mechanical disk.
The technical scheme is that:A kind of hybrid storage system cached based on solid-state disk, it is characterised in that bag Include:Mechanical disk, memory space are divided into the solid-state disk of some cache blocks, and requests classification module, request allocator, slow Deposit manager;The cache manager includes write request administrative unit;
The requests classification module:For judging the type of reached request, if the request for being reached is write request, system Carry out write operation;If the request for being reached is read request, system carries out read operation;
The request allocator:For when the request for being reached is write request, judging that reached write request is previous adjacent with which Whether the reference address of the history write request for reaching is continuous, if continuously, the write request is continuous request, if discontinuous, should Write request is segmentation request;When reached write request is asked for segmentation, judge that the segmentation is asked and upper one splits request Between continuous request number, if the number of continuous request is more than default high threshold, the segmentation is asked and a upper segmentation please The big request is write mechanical disk, if continuously by the continuous request and upper one big request of segmentation request composition between asking The number of request less than or equal to default high threshold, then the segmentation ask and the continuous request between upper segmentation request and on One segmentation request is asked in constituting one, and middle request is sent to solid-state disk;
The write request administrative unit:For when write request reaches solid-state disk, finding the free buffer block of solid-state disk, if solid-state There is free buffer block in disk, then by the write request write free buffer block for reaching;If releasing without free buffer block in solid-state disk Put the cache blocks of solid-state disk, and the cache blocks that the write request write of arrival is discharged.
Further, the cache manager also includes read request administrative unit,
The read request administrative unit:For when the request for being reached is read request, searching the cache blocks in solid-state disk, if life In, then access solid-state disk and perform read operation;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs Read operation, and judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold, if should The miss number of times of data block exceedes default highest subthreshold, then the data block is added to the first migration list.
Further, in solid-state disk, the cache blocks of predetermined number are combined into a caching group, if all cache blocks are divided into Dry caching group;
Write request administrative unit:It is additionally operable to when write request reaches solid-state disk, Hash calculation is pressed in the address accessed according to the write request Method searches the corresponding caching group of the write request, and finds the free buffer block in the caching group, if existing in the caching group idle Cache blocks, then by the write request write free buffer block for reaching;If discharging the caching group without free buffer block in the caching group Interior cache blocks, and the cache blocks that the write request write of arrival is discharged;
Read request administrative unit:It is additionally operable to, when the request for being reached is read request, be pressed according to the address that the read request is accessed and breathed out Uncommon algorithm searches the corresponding caching group of the read request, in the caching group searches cache blocks, if hit, accesses solid-state disk and performs Read operation;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs read operation.
Further, the system also includes:Cache cleaner module;
The cache cleaner module:For the state of the cache blocks of periodic scan solid-state disk, cache blocks to be migrated are selected, And cache blocks to be migrated are added to into the second migration list.
Further, the system also includes:Data Migration module;
The Data Migration module:List and the second migration list are migrated for scanning first, and first is migrated in list Data block migration migrates the cache blocks in list by second and writes back mechanical disk to solid-state disk.
Further, ask allocator:Be additionally operable to when reached write request for segmentation request when, if the segmentation ask and on One number for splitting the continuous request between request less than default Low threshold, then ask and upper one splits request by the segmentation Between continuous request and upper segmentation request one little request of composition, this little is asked to write the log region of mechanical disk; If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is less than or equal to default high threshold and is more than or equal to Default Low threshold, the then segmentation are asked and the continuous request between upper segmentation request and upper segmentation request composition one Middle request is sent to solid-state disk by individual middle request.
A kind of hybrid storage method cached based on solid-state disk, including:Mechanical disk, solid-state disk;The solid-state disk Memory space is divided into some cache blocks, and the cache blocks of predetermined number are combined into a caching group, if all cache blocks are divided into Dry caching group;
It is further comprising the steps of:
S1:Judge the type of reached request, if reached request is read request, into step S6, if reached request is Write request, then into step S2;
S2:Judge whether reached write request is continuous with the reference address of its adjacent history write request for reaching previous, if continuously, Then the write request is continuous request, if discontinuous, the write request is segmentation request;When reached write request is segmentation request When, judge the number of the continuous request between the segmentation is asked and a upper segmentation is asked;
S3:If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is more than default high threshold, this point Cut request and a upper continuous request split between request and upper segmentation request composition one is asked greatly, this greatly please Ask and write mechanical disk;If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is less than default low threshold Value, the then segmentation are asked and the continuous request between upper segmentation request and upper segmentation request one little request of composition, By the little log region for asking to write mechanical disk;If the continuous request between the segmentation is asked and a upper segmentation is asked Number less than or equal to default high threshold, then ask and the continuous request between upper segmentation request and upper point by the segmentation Ask in cutting request composition one, middle request is sent to into solid-state disk, and enters step S4;
S4:The corresponding caching group of the write request is searched in solid-state disk by hash algorithm according to the address that reached write request is accessed, And find the free buffer block in the caching group;
S5:If there is free buffer block in the caching group, by the write request write free buffer block for reaching;If in the caching group Without free buffer block, then the cache blocks in the caching group, and the cache blocks that the write request write of arrival is discharged are discharged;
S6:The corresponding caching group of the read request is searched in solid-state disk by hash algorithm according to the address that reached read request is accessed, Cache blocks are searched in the caching group;
S7:If hit, access solid-state disk and perform read operation;If miss, access mechanical disk or access mechanical disk Log region performs read operation, and enters step S8;
S8:Judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold;
S9:If the miss number of times of the data block exceedes default highest subthreshold, the data block is added to into the first migration row Table.
Further, it is further comprising the steps of:
S10:The state of the cache blocks of periodic scan solid-state disk, selects cache blocks to be migrated, and by caching to be migrated Block is added to the second migration list.
Further, it is further comprising the steps of:
S11:Scanning first migrates list and the second migration list, by the data block migration in the first migration list to solid-state disk, The cache blocks in list are migrated by second and writes back mechanical disk.
The hybrid storage system cached based on solid-state disk and storage method that the present invention is provided, optionally will be most suitable Request be buffered on solid-state disk, both using solid-state disk come lift system overall performance, at the same extend solid-state disk use time, A compromise Tradeoff point is selected between performance and life-span.Solid-state disk is compared, systematic function can be improved, can be reduced in large quantities again The writing data quantity of mechanical disk is reached, so as to improve the service life of solid-state disk.
Description of the drawings
Fig. 1 is specific embodiment of the invention principle schematic.
Fig. 2 is specific embodiment of the invention system architecture schematic diagram.
Specific embodiment
The present invention will be described in detail below in conjunction with the accompanying drawings and by specific embodiment, and following examples are to the present invention Explanation, and the invention is not limited in implementation below.
The hybrid storage system of the present invention sets up the device map in linux(Device-mapper, hereinafter referred to as DM)On manufacturing basis, solid-state disk and mechanical disk are abstracted into into a unified logical device, user can use what DM was provided Management tool dmsetup easily creates this kind equipment, the DM target device classes being made up of solid-state disk and the mixing of mechanical type disk Type flashcache and realize.Inside flashcache, solid-state disk is operated on mechanical disk in the form of cache layer Layer(It is found in Fig. 1), and Bian corresponding Request Distribution Policy and buffer storage managing algorithm, will it is most friendly, with the close phase of performance The data block of pass is placed in solid-state disk caching, and which aims at high-performance both using solid-state disk, while and avoiding it too fast Ground abrasion, extends its service life.The target of this kind of hybrid storage system is to obtain solid-state disk with the cost of mechanical type disk The performance of level, finds an optimum equilibrium point between performance and cost, provides the user transparent high-performance, a great Rong Amount, the block level equipment of low-power consumption.
The hybrid storage system cached based on solid-state disk that the present invention is provided, including mechanical disk and solid-state disk, solid-state The memory space of disk and mechanical disk is all divided into fixed block size, and in units of block is cached and replaced.Block is big Little value is the parameter that a user can configure, and passes to target device, typically 4KB by user when target device is created. Specifically, the memory space of solid-state disk is divided into some cache blocks.
As shown in Fig. 2 in the present embodiment, hybrid storage system mainly is cooperated to realize by five software modules Unified management to solid-state disk and mechanical disk.It is requests classification module, request allocator respectively(request dispatcher), cache manager(cache manager), cache cleaner module(cache cleaner)With Data Migration mould Block(data migrator).
(1)Requests classification module:For judging the type of reached request, if the request for being reached is write request, System carries out write operation;If the request for being reached is read request, system carries out read operation.
(2)Request allocator:For when the request for being reached is write request, judging reached write request and its phase previous Whether the reference address of the history write request that neighbour reaches is continuous, if continuously, the write request is continuous request, if discontinuous, The write request is segmentation request;When reached write request is asked for segmentation, judge that the segmentation is asked and upper segmentation request Between continuous request number, if the number of continuous request is more than default high threshold, the segmentation is asked and a upper segmentation The big request is write mechanical disk, if even by the continuous request and upper one big request of segmentation request composition between request The number of continuous request less than or equal to default high threshold, then the segmentation ask and the continuous request between upper segmentation request and Ask in upper segmentation request composition one, middle request is sent to into solid-state disk.
Further, if the segmentation is asked and upper segmentation request between when reached write request is segmentation request The number of continuous request less than default Low threshold, then the segmentation ask and the continuous request between upper segmentation request and on One segmentation request one little request of composition, by the little log region for asking to write mechanical disk;If the segmentation ask and on The number of the continuous request between one segmentation request is less than or equal to default high threshold and is more than or equal to default Low threshold, then this point Ask in cutting the continuous request between request and upper segmentation request and upper segmentation request composition one, by middle request It is sent to solid-state disk.
Request allocator determines it is to transmit the request to solid-state disk cache layer or be written directly to disk using " dual threshold " method On, or temporarily write in the log region of disk.The operation principle of " dual threshold " method is one Low threshold of setting(Preset low Threshold value)With a high threshold(High threshold is preset), the write request of arrival is divided into into " big to ask ", " middle request ", " little request " Three types.When request allocator judges write request for big request, middle request or little request, the certain amount of saving over is continuous The access record of request, then judges the current write request for the reaching whether access with the historical requests of adjacent arrival before it Whether location is continuous, and this is similar to internal memory ghost cachings in principle." divide with asking discontinuous new arrival request to be called before Cut request ".When system runs into " segmentation request " every time, all request history is reset, and be starting point to rear with " the segmentation request " The continuous seriality for reaching request is judged.After such as continuously asking 3 times, the 4th time with first three it is secondary be not it is continuous, then before The request that face is continuous three times is request in.For " big to ask ", directly it is written on mechanical disk, on the one hand can be with profit With the good sequential access performance of mechanical disk, the valid cache space of solid-state disk on the other hand can be increased.For " in please Ask ", then send it on solid-state disk and cached, prevent from the rapid decrease of solid-state disk performance and extend which using the longevity Life.For " little request ", then first it is buffered in the log region being associated with disk, is grasped with the random access for avoiding disk Make." little request " in log region is waited and is written on disk in both cases with the order sequence of reference address, The first situation is called " seize the opportunity and write ", i.e., when having " big to ask " to write disk every time, systems inspection whether there is in log region " the little request " being contiguous therewith, if exist will " little request " merge with " greatly request " together with write disk.Second situation " compeling to write ", i.e., when minimum of the remaining free space in log space less than setting, log region is emptied by system, by institute " the little request " for having caching all writes back to disk.
(3)Cache manager includes write request administrative unit and read request administrative unit.
Write request administrative unit:For when write request reaches solid-state disk, finding the free buffer block of solid-state disk, if solid-state There is free buffer block in disk, then by the write request write free buffer block for reaching;If releasing without free buffer block in solid-state disk Put the cache blocks of solid-state disk, and the cache blocks that the write request write of arrival is discharged.
Read request administrative unit:For when the request for being reached is read request, searching the cache blocks in solid-state disk, if life In, then access solid-state disk and perform read operation;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs Read operation, and judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold, if should The miss number of times of data block exceedes default highest subthreshold, then the data block is added to the first migration list.
In the present embodiment, in order to improve the buffer efficiency of solid-state disk, flashcache is using the cache management plan being layered Slightly, by certain amount(Such as 512)Block be combined into a group, all of cache blocks are divided into into several groups.When request is reached, First its corresponding group is found by hash algorithm according to its address for being accessed, then its corresponding piece is searched in the group again.I/O Corresponding group is asked to be connected strategy using group, block Bian complete association strategies in group.
Specifically, in solid-state disk, the cache blocks of predetermined number are combined into a caching group, if all cache blocks are divided into Dry caching group.
When write request reaches solid-state disk, Hash calculation is pressed in the address for first being accessed according to the write request to write request administrative unit Method searches the corresponding caching group of the write request, and finds the free buffer block in the caching group, if existing in the caching group idle Cache blocks, then by the write request write free buffer block for reaching;If discharging the caching group without free buffer block in the caching group Interior cache blocks, and the cache blocks that the write request write of arrival is discharged.Write request administrative unit is according to fifo algorithm (FIFO)And LRU(LRU)Release cache blocks, fifo algorithm(FIFO)And LRU (LRU)Algorithm is replaced all referring to the block in same group, they refer to Management is with the cache blocks in group.
When the request for being reached is read request, Hash calculation is pressed in the address accessed according to the read request to read request administrative unit Method searches the corresponding caching group of the read request, in the caching group searches cache blocks, if hit, accesses solid-state disk and performs and read behaviour Make;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs read operation.
(4)Cache cleaner module:For the state of the cache blocks of periodic scan solid-state disk, caching to be migrated is selected Block, and cache blocks to be migrated are added to into the second migration list.Clearing function can be run when system is idle, reduced The synchronization caching block written-back operation that write request causes due to not having free buffer block when reaching.Cache cleaner module is selected to be needed After cache blocks to be write back, by them by being inserted in the list of migration after mechanical disk address sort.
(5)Data Migration module:List and the second migration list are migrated for scanning first, and first is migrated in list Data block migration to solid-state disk, migrate the cache blocks in list by second and write back mechanical disk.As it was previously stated, cache manager The data block accessed by the read request that monitoring is miss, if the miss number of times of data block has exceeded the threshold value for arranging, illustrates The requirements for access of the data block is very high, therefore which is moved in solid-state disk cache layer from disk.Data Migration module Data migration operation is carried out between solid-state disk cache layer and disk according to the real-time characteristic of load, it is ensured that solid-state disk caching Data block is optimum, thus improves overall system performance.
In the present embodiment, for being cached to the middle request of solid-state disk and be cached to the little request of mechanical disk log region Three kinds of cache modes are provided, are " writing back ", " write through " and " write and bypass " respectively.
Write back pattern:" writing back " pattern is fastest cache mode, while it is also most unsafe." writing back " Under pattern, all of write operation only needs to write on solid-state disk caching, then by the dirty mark in cache blocks corresponding metadata Position position represents that the cache blocks are inconsistent with the state on disk, that is, report that write operation is completed.Data block what when in caching Time write back to disk depending on institute Bian cache replacement algorithm, application access module and strategy is periodically flushed.Its shortcoming It is that data and data in magnetic disk in solid-state disk caching has cache blocks metadata information in inconsistent hidden danger, and " writing back " pattern Required internal memory is also most.
Write through pattern:" " pattern is safest pattern in these three patterns to write through." under write through pattern, often One write operation is only successfully written on solid-state disk and disk simultaneously and just completes to upper strata report request, therefore it is also speed The most slow pattern of degree.Under this pattern, the state between cache layer and disk is always consistent.
Write the pattern of bypassing:" write and bypass " pattern is between both the above pattern." writing under the pattern of bypassing, each is write Operation all bypasses solid-state disk caching and is written directly on disk, and caching is only just written to after data block is accessed for the first time In.Under this pattern, Buffer Utilization is highest.
The hybrid storage method cached based on solid-state disk that the present invention is provided, is comprised the following steps:
S9:If the miss number of times of the data block exceedes default highest subthreshold, the data block is added to into the first migration row Table.
S8:Judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold;
S7:If hit, access solid-state disk and perform read operation;If miss, access mechanical disk or access mechanical disk Log region performs read operation, and enters step S8;
S6:The corresponding caching group of the read request is searched in solid-state disk by hash algorithm according to the address that reached read request is accessed, Cache blocks are searched in the caching group;
S5:If there is free buffer block in the caching group, by the write request write free buffer block for reaching;If in the caching group Without free buffer block, then the cache blocks in the caching group, and the cache blocks that the write request write of arrival is discharged are discharged;
S4:The corresponding caching group of the write request is searched in solid-state disk by hash algorithm according to the address that reached write request is accessed, And find the free buffer block in the caching group;
S3:If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is more than default high threshold, this point Cut request and a upper continuous request split between request and upper segmentation request composition one is asked greatly, this greatly please Ask and write mechanical disk;If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is less than default low threshold Value, the then segmentation are asked and the continuous request between upper segmentation request and upper segmentation request one little request of composition, By the little log region for asking to write mechanical disk;If the continuous request between the segmentation is asked and a upper segmentation is asked Number less than or equal to default high threshold, then ask and the continuous request between upper segmentation request and upper point by the segmentation Ask in cutting request composition one, middle request is sent to into solid-state disk, and enters step S4;
S2:Judge whether reached write request is continuous with the reference address of its adjacent history write request for reaching previous, if continuously, Then the write request is continuous request, if discontinuous, the write request is segmentation request;When reached write request is segmentation request When, judge the number of the continuous request between the segmentation is asked and a upper segmentation is asked;
S1:Judge the type of reached request, if reached request is read request, into step S6, if reached request is Write request, then into step S2;
S10:The state of the cache blocks of periodic scan solid-state disk, selects cache blocks to be migrated, and will be to be migrated Cache blocks are added to the second migration list.
S11:Scanning first migrates list and the second migration list, by the data block migration in the first migration list to solid-state Disk, migrates the cache blocks in list by second and writes back mechanical disk.
Disclosed above is only the preferred embodiment of the present invention, but the present invention is not limited to this, any this area What technical staff can think does not have a creative change, and some improvement made without departing from the principles of the present invention and Retouching, should all be within the scope of the present invention.

Claims (9)

1. it is a kind of based on solid-state disk cache hybrid storage system, it is characterised in that include:Mechanical disk, memory space quilt It is divided into the solid-state disk of some cache blocks, and requests classification module, request allocator, cache manager;The cache management Device includes write request administrative unit;
The requests classification module:For judging the type of reached request, if the request for being reached is write request, system Carry out write operation;If the request for being reached is read request, system carries out read operation;
The request allocator:For when the request for being reached is write request, judging that reached write request is previous adjacent with which Whether the reference address of the history write request for reaching is continuous, if continuously, the write request is continuous request, if discontinuous, should Write request is segmentation request;When reached write request is asked for segmentation, judge that the segmentation is asked and upper one splits request Between continuous request number, if the number of continuous request is more than default high threshold, the segmentation is asked and a upper segmentation please The big request is write mechanical disk, if continuously by the continuous request and upper one big request of segmentation request composition between asking The number of request less than or equal to default high threshold, then the segmentation ask and the continuous request between upper segmentation request and on One segmentation request is asked in constituting one, and middle request is sent to solid-state disk;
The write request administrative unit:For when write request reaches solid-state disk, finding the free buffer block of solid-state disk, if solid-state There is free buffer block in disk, then by the write request write free buffer block for reaching;If releasing without free buffer block in solid-state disk Put the cache blocks of solid-state disk, and the cache blocks that the write request write of arrival is discharged.
2. it is according to claim 1 based on solid-state disk cache hybrid storage system, it is characterised in that the caching pipe Reason device also includes read request administrative unit,
The read request administrative unit:For when the request for being reached is read request, searching the cache blocks in solid-state disk, if life In, then access solid-state disk and perform read operation;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs Read operation, and judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold, if should The miss number of times of data block exceedes default highest subthreshold, then the data block is added to the first migration list.
3. the hybrid storage system cached based on solid-state disk according to claim 2, it is characterised in that pre- in solid-state disk If the cache blocks of quantity are combined into a caching group, all cache blocks are divided into some caching groups;
Write request administrative unit:It is additionally operable to when write request reaches solid-state disk, Hash calculation is pressed in the address accessed according to the write request Method searches the corresponding caching group of the write request, and finds the free buffer block in the caching group, if existing in the caching group idle Cache blocks, then by the write request write free buffer block for reaching;If discharging the caching group without free buffer block in the caching group Interior cache blocks, and the cache blocks that the write request write of arrival is discharged;
Read request administrative unit:It is additionally operable to, when the request for being reached is read request, be pressed according to the address that the read request is accessed and breathed out Uncommon algorithm searches the corresponding caching group of the read request, in the caching group searches cache blocks, if hit, accesses solid-state disk and performs Read operation;If miss, the log region for accessing mechanical disk or accessing mechanical disk performs read operation.
4. it is according to claim 2 based on solid-state disk cache hybrid storage system, it is characterised in that the system is also wrapped Include:Cache cleaner module;
The cache cleaner module:For the state of the cache blocks of periodic scan solid-state disk, cache blocks to be migrated are selected, And cache blocks to be migrated are added to into the second migration list.
5. it is according to claim 4 based on solid-state disk cache hybrid storage system, it is characterised in that the system is also wrapped Include:Data Migration module;
The Data Migration module:List and the second migration list are migrated for scanning first, and first is migrated in list Data block migration migrates the cache blocks in list by second and writes back mechanical disk to solid-state disk.
6. according to any one of claim 1-5 based on solid-state disk cache hybrid storage system, it is characterised in that please Seek allocator:It is additionally operable to when reached write request is asked for segmentation, if the segmentation is asked and upper segmentation request between The number of continuous request less than default Low threshold, then the segmentation ask and the continuous request between upper segmentation request and on One segmentation request one little request of composition, by the little log region for asking to write mechanical disk;If the segmentation ask and on The number of the continuous request between one segmentation request is less than or equal to default high threshold and is more than or equal to default Low threshold, then this point Ask in cutting the continuous request between request and upper segmentation request and upper segmentation request composition one, by middle request It is sent to solid-state disk.
7. it is a kind of based on solid-state disk cache hybrid storage method, it is characterised in that include:Mechanical disk, solid-state disk;It is described The memory space of solid-state disk is divided into some cache blocks, and the cache blocks of predetermined number are combined into a caching group, all cache blocks It is divided into some caching groups;
It is further comprising the steps of:
S1:Judge the type of reached request, if reached request is read request, into step S6, if reached request is Write request, then into step S2;
S2:Judge whether reached write request is continuous with the reference address of its adjacent history write request for reaching previous, if continuously, Then the write request is continuous request, if discontinuous, the write request is segmentation request;When reached write request is segmentation request When, judge the number of the continuous request between the segmentation is asked and a upper segmentation is asked;
S3:If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is more than default high threshold, this point Cut request and a upper continuous request split between request and upper segmentation request composition one is asked greatly, this greatly please Ask and write mechanical disk;If the number of the continuous request between the segmentation is asked and a upper segmentation is asked is less than default low threshold Value, the then segmentation are asked and the continuous request between upper segmentation request and upper segmentation request one little request of composition, By the little log region for asking to write mechanical disk;If the continuous request between the segmentation is asked and a upper segmentation is asked Number less than or equal to default high threshold, then ask and the continuous request between upper segmentation request and upper point by the segmentation Ask in cutting request composition one, middle request is sent to into solid-state disk, and enters step S4;
S4:The corresponding caching group of the write request is searched in solid-state disk by hash algorithm according to the address that reached write request is accessed, And find the free buffer block in the caching group;
S5:If there is free buffer block in the caching group, by the write request write free buffer block for reaching;If in the caching group Without free buffer block, then the cache blocks in the caching group, and the cache blocks that the write request write of arrival is discharged are discharged;
S6:The corresponding caching group of the read request is searched in solid-state disk by hash algorithm according to the address that reached read request is accessed, Cache blocks are searched in the caching group;
S7:If hit, access solid-state disk and perform read operation;If miss, access mechanical disk or access mechanical disk Log region performs read operation, and enters step S8;
S8:Judge whether the miss number of times of data block corresponding to reached read request exceedes default highest subthreshold;
S9:If the miss number of times of the data block exceedes default highest subthreshold, the data block is added to into the first migration row Table.
8. it is according to claim 7 based on solid-state disk cache hybrid storage method, it is characterised in that also including following Step:
S10:The state of the cache blocks of periodic scan solid-state disk, selects cache blocks to be migrated, and by caching to be migrated Block is added to the second migration list.
9. it is according to claim 8 based on solid-state disk cache hybrid storage method, it is characterised in that also including following Step:
S11:Scanning first migrates list and the second migration list, by the data block migration in the first migration list to solid-state disk, The cache blocks in list are migrated by second and writes back mechanical disk.
CN201710021507.9A 2017-01-12 2017-01-12 Hybrid storage system and storage method based on solid state disk caching Pending CN106681668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710021507.9A CN106681668A (en) 2017-01-12 2017-01-12 Hybrid storage system and storage method based on solid state disk caching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710021507.9A CN106681668A (en) 2017-01-12 2017-01-12 Hybrid storage system and storage method based on solid state disk caching

Publications (1)

Publication Number Publication Date
CN106681668A true CN106681668A (en) 2017-05-17

Family

ID=58849618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710021507.9A Pending CN106681668A (en) 2017-01-12 2017-01-12 Hybrid storage system and storage method based on solid state disk caching

Country Status (1)

Country Link
CN (1) CN106681668A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368364A (en) * 2017-07-24 2017-11-21 郑州云海信息技术有限公司 Reading/writing method and device based on Linux noop dispatching algorithms
CN107491272A (en) * 2017-09-29 2017-12-19 郑州云海信息技术有限公司 A kind of method, apparatus of Data Migration, equipment and storage medium
CN107797771A (en) * 2017-11-16 2018-03-13 郑州云海信息技术有限公司 A kind of multipath storage optimization method and device
CN108108130A (en) * 2017-12-22 2018-06-01 深圳忆联信息系统有限公司 A kind of method and solid state disk for promoting solid state disk read-write performance
CN108762664A (en) * 2018-02-05 2018-11-06 杭州电子科技大学 A kind of solid state disk page grade buffer queue management method
CN109375868A (en) * 2018-09-14 2019-02-22 网宿科技股份有限公司 A kind of date storage method, dispatching device, system, equipment and storage medium
CN109542348A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 Brush method and device under a kind of data
CN109656487A (en) * 2018-12-24 2019-04-19 平安科技(深圳)有限公司 A kind of data processing method, device, equipment and storage medium
CN117407324A (en) * 2023-12-12 2024-01-16 深圳市银闪科技有限公司 Data storage method and device based on solid state disk and solid state disk controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061331A1 (en) * 2001-09-27 2003-03-27 Yasuaki Nakamura Data storage system and control method thereof
CN102364474A (en) * 2011-11-17 2012-02-29 中国科学院计算技术研究所 Metadata storage system for cluster file system and metadata management method
CN103678169A (en) * 2013-11-11 2014-03-26 华中科技大学 Method and system for efficiently utilizing solid-state disk for caching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061331A1 (en) * 2001-09-27 2003-03-27 Yasuaki Nakamura Data storage system and control method thereof
CN102364474A (en) * 2011-11-17 2012-02-29 中国科学院计算技术研究所 Metadata storage system for cluster file system and metadata management method
CN103678169A (en) * 2013-11-11 2014-03-26 华中科技大学 Method and system for efficiently utilizing solid-state disk for caching

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄平: "基于固态盘特征的存储优化研究", 《中国博士学位论文全文数据库信息科技辑》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368364A (en) * 2017-07-24 2017-11-21 郑州云海信息技术有限公司 Reading/writing method and device based on Linux noop dispatching algorithms
CN107491272B (en) * 2017-09-29 2020-03-06 苏州浪潮智能科技有限公司 Data migration method, device, equipment and storage medium
CN107491272A (en) * 2017-09-29 2017-12-19 郑州云海信息技术有限公司 A kind of method, apparatus of Data Migration, equipment and storage medium
CN107797771A (en) * 2017-11-16 2018-03-13 郑州云海信息技术有限公司 A kind of multipath storage optimization method and device
CN108108130A (en) * 2017-12-22 2018-06-01 深圳忆联信息系统有限公司 A kind of method and solid state disk for promoting solid state disk read-write performance
CN108762664B (en) * 2018-02-05 2021-03-16 杭州电子科技大学 Solid state disk page-level cache region management method
CN108762664A (en) * 2018-02-05 2018-11-06 杭州电子科技大学 A kind of solid state disk page grade buffer queue management method
CN109375868A (en) * 2018-09-14 2019-02-22 网宿科技股份有限公司 A kind of date storage method, dispatching device, system, equipment and storage medium
CN109375868B (en) * 2018-09-14 2022-07-08 深圳爱捷云科技有限公司 Data storage method, scheduling device, system, equipment and storage medium
CN109542348A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 Brush method and device under a kind of data
CN109656487A (en) * 2018-12-24 2019-04-19 平安科技(深圳)有限公司 A kind of data processing method, device, equipment and storage medium
CN109656487B (en) * 2018-12-24 2023-04-28 平安科技(深圳)有限公司 Data processing method, device, equipment and storage medium
CN117407324A (en) * 2023-12-12 2024-01-16 深圳市银闪科技有限公司 Data storage method and device based on solid state disk and solid state disk controller
CN117407324B (en) * 2023-12-12 2024-03-15 深圳市银闪科技有限公司 Data storage method and device based on solid state disk and solid state disk controller

Similar Documents

Publication Publication Date Title
CN106681668A (en) Hybrid storage system and storage method based on solid state disk caching
US11347638B1 (en) Nonvolatile memory controller with data relocation and host-triggered erase
CN103777905B (en) Software-defined fusion storage method for solid-state disc
CN107844269B (en) Hierarchical hybrid storage system based on consistent hash
US8909887B1 (en) Selective defragmentation based on IO hot spots
CN104298610B (en) Data storage system and its management method
KR101717644B1 (en) Apparatus, system, and method for caching data on a solid-state storage device
CN103186350B (en) The moving method of mixing storage system and hot spot data block
US11188262B2 (en) Memory system including a nonvolatile memory and a volatile memory, and processing method using the memory system
US11797436B2 (en) Memory system and method for controlling nonvolatile memory
CN110058822B (en) Transverse expansion method for disk array
WO2012116369A2 (en) Apparatus, system, and method for managing contents of a cache
CN107423229B (en) Buffer area improvement method for page-level FTL
JP5716537B2 (en) Storage medium control device, storage device, storage medium control method, and program
CN110321301A (en) A kind of method and device of data processing
CN109446117A (en) A kind of solid state hard disk page grade flash translation layer (FTL) design method
CN105718206A (en) Flash translation layer capable of perceiving RAID (Redundant Array of Independent Disks) and implementation method thereof
CN107615254A (en) The cache memory architectures and algorithm of blending objects storage device
CN110968269A (en) SCM and SSD-based key value storage system and read-write request processing method
CN107817945A (en) A kind of method for reading data and system for mixing internal storage structure
CN105376269A (en) Virtual machine storage system, virtual machine storage system realizing method and virtual machine storage system realizing device
CN106155919B (en) A kind of control method and control system of 3D flash memory
CN104598166B (en) Method for managing system and device
Lv et al. Zonedstore: A concurrent zns-aware cache system for cloud data storage
CN107885667A (en) Reduce the method and apparatus of read command processing delay

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170517