CN109491592A - Store equipment and its method for writing data, storage device - Google Patents
Store equipment and its method for writing data, storage device Download PDFInfo
- Publication number
- CN109491592A CN109491592A CN201811099881.1A CN201811099881A CN109491592A CN 109491592 A CN109491592 A CN 109491592A CN 201811099881 A CN201811099881 A CN 201811099881A CN 109491592 A CN109491592 A CN 109491592A
- Authority
- CN
- China
- Prior art keywords
- written
- mode
- data
- writing
- write
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0634—Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses a kind of storage equipment and its method for writing data, storage device, which includes the writing commands for receiving data to be written;Judge whether the first mode of the storage equipment is opened;If first mode is opened, data to be written are received, the data to be written are written using the first mode;Conversely, then judging whether data to be written are setting write-in type;If data to be written are setting write-in type, the data to be written are written using first mode;Conversely, data to be written then are written using second mode.By first judging whether no write de-lay mode opens, determine data write mode, it can accelerate the writing speed of data under the premise of not influencing to store equipment amount of storage, improve the burst write performance of storage equipment, and facilitate transplanting, practicability is wide, and the storage equipment of the storage performance of low performance can be made to obtain preferable burst write performance index, improve user experience.
Description
Technical field
This application involves technical field of memory, fill more particularly to a kind of storage equipment and its method for writing data, storage
It sets.
Background technique
With the continuous development of memory technology, people are while pursuing larger capacity, to other performances of storage equipment
Index is also increasingly paid close attention to.For example, the burst performance of storage equipment is always to be absorbed in by people in recent years.
For by taking flash memory NAND Flash as an example, there are two types of write mode, single layer cell SLC high by NAND Flash
The low-speed writing modes such as fast write mode and multilevel-cell MLC/ three-layer unit TLC, both different data write modes
Corresponding write-in reading performance and storage density are all different.It is write for example, carrying out data by no write de-lay SLC write mode
Fashionable, the processing speed of data is 5~10 times of MLC/TLC mode of operation.
Since the storage density under no write de-lay SLC operation mode can decline, for example, completely using SLC operation mode into
When row data store, storage density is equivalent to 1/2 of storage density under MLC operation mode, or is equivalent under TLC operation mode
The 2/3 of storage density.Therefore, this operation mode by trading space for time of SLC is also not suitble to any occasion.
Summary of the invention
The application provides a kind of storage equipment and its method for writing data, storage device, can be current according to storage equipment
Storage condition select suitable data writing mode, accelerate the write-in of data under the premise of not influencing to store equipment amount of storage
Speed.
In order to solve the above technical problems, the first technical solution provided by the present application is to provide a kind of method for writing data,
It is characterised by comprising:
S101 receives the writing commands of data to be written;
S102, judges whether the first mode of the storage equipment is opened;
S103 receives data to be written if the first mode is opened, and is written using the first mode described to be written
Enter data;Conversely, then judging whether the data to be written are setting write-in type;
S104 is written described to be written if the data to be written are setting write-in type using the first mode
Data;Conversely, the data to be written then are written using second mode.
In order to solve the above technical problems, second of technical solution of the offer of the application is to provide a kind of storage equipment, institute
State storage equipment include memory, with the memory communication connection processor, the memory is stored with can be at the place
The computer program run on reason device, which is characterized in that the processor is realized any of the above-described when executing the computer program
Described in embodiment the step of method for writing data.
In order to solve the above technical problems, the third technical solution provided by the present application is to provide a kind of storage device, thereon
The step of being stored with computer program, above-mentioned method for writing data realized when computer program is executed by processor.
It is different from the prior art, the storage equipment of present embodiment is sentenced first after idle state receives writing commands
Whether the no write de-lay mode of disconnected storage equipment opens, and no write de-lay mode data to be written is used if on, conversely, then
Data to be written are written using low-speed writing mode.By first judging whether no write de-lay mode opens, determine that mould is written in data
Formula can accelerate the writing speed of data under the premise of not influencing to store equipment amount of storage, improve the burst of storage equipment
Write performance, and facilitate transplanting, practicability is wide, and the storage equipment of the storage performance of low performance can be made to obtain preferable burst and write
Enter performance indicator, improves user experience.
Detailed description of the invention
Fig. 1 is the flow diagram of the first embodiment of the application method for writing data;
Fig. 2 is the flow diagram of the second embodiment of the application method for writing data;
Fig. 3 is the flow diagram of the third embodiment of the application method for writing data;
Fig. 4 is the structural schematic diagram that the application stores one embodiment of equipment;
Fig. 5 is the structural schematic diagram of one embodiment of the application storage device.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that the described embodiments are only a part but not all of the embodiments of the present application.Based on this
Embodiment in application, every other reality obtained by those of ordinary skill in the art without making creative efforts
Example is applied, the range of the application protection is belonged to.
With the continuous development of memory technology, storing equipment becomes essential life and work use in people's daily life
Product.And be a kind of based non-volatile random access medium using flash memory NAND Flash as the solid-state hard disk SSD of storage medium,
Have the characteristics that data do not disappear, capacity is big, read or write speed is fast and suitable mass data storage after power-off, even more gradually at
Form is stored for mainstream.Compared to performance the leaping of having had matter next of the hard disk drive of conventional magnetic media.
The storage equipment of the application includes USB flash drive (USB flash disk), SD card (secure data card, Secure
Digital Memory Card), SSD (solid state hard disk, Solid State Drives), EMMC (embedded storage card,
Embedded Multi Media Card) and EMCP (embedded multi-die package, embedded Multi Chip
Package), CF card (Compact Flash) and other servers and processor etc. with storage equipment.
Under the premise of guaranteeing memory space, accelerate writing speed, present embodiment proposes following method for writing data,
As shown in Figure 1.Fig. 1 is the application method for writing data, is included the following steps:
S101: the writing commands of data to be written are received.
Store equipment when not carrying out reading and writing data or after completing reading and writing data, do not receive new write instruction it
Before, it can be in idle condition.In the idle state, storage equipment executes idle task, and in the implementation procedure of idle task
In, new writing commands are judged whether there is at predetermined time intervals.
Wherein, which is generally several milliseconds, can also adjust the predetermined time according to different demands.
If receiving new writing commands, data to be written are obtained from the writing commands.
Wherein, above-mentioned idle task includes data transfer, further includes carrying out idle scan to storage equipment, clearing and retrieving is write
Enter the operation tasks such as the rubbish that data to be written generate.
When storage equipment is in idle condition, when host host issues the writing commands of data to be written, it is desirable that storage
When data are written in equipment, correspondingly, storage equipment receives the writing commands.The writing commands include data to be written length,
The logical address of data to be written, the write-in type of data to be written such as random address are written.
S102: judge whether the first mode of the storage equipment is opened.
The first mode is no write de-lay mode, i.e. SLC (single layer cell, Single-Level Cell) write mode, the
One mode Writing condition is no write de-lay condition.
Since the writing speed of no write de-lay mode is substantially better than other write modes, the storage of present embodiment
Equipment first determines whether first mode i.e. no write de-lay mode opens after the write instruction for receiving data to be written.
S103: if the first mode is opened, receiving data to be written, is written using the first mode described to be written
Enter data;Conversely, then judging whether the data to be written are setting write-in type.
If the first mode for storing equipment is opened, data to be written are received, and directly adopt the i.e. fast literary sketch of first mode
Enter mode and the data to be written are written.If the first mode of storage equipment is not opened, storage equipment further judges to be written
Enter whether data are setting write-in type.
Wherein, this sets write-in type and is written as random address.
S104: if the data to be written are setting write-in type, the data to be written are written using first mode;
Conversely, the data to be written then are written using second mode.
Specifically, in solid state hard disk reading data or writing process, the speed of random address write-in is that measurement solid-state is hard
One important indicator of disk processing capacity, and the number per second being written and read, i.e. IOPS performance are to measure storage equipment
One Xiang Zhibiao of random address writing speed.IOPS index is higher under normal conditions, illustrates the data processing energy of solid-state hard disk SSD
Power is stronger.IOPS performance is thus improved, can be improved random address writing speed.And use first mode, that is, no write de-lay mode
Above-mentioned data to be written are written, can be improved the number of write operation per second to improve IOPS index, further increase storage equipment
Writing speed.Therefore, it if the write-in type of data to be written is that random address is written, directlys adopt no write de-lay mode and writes
Enter data to be written.
If first mode is not opened, and the write-in type of data to be written is the write-in of nonrandom address, then uses second
The data to be written are written in mode.
Wherein, the second mode be MLC (multilevel-cell, Multi-Level Cell) write mode, TLC (three-layer unit,
Trinary-Level Cell) any one of write mode or QLC (four layer units, Quad-Level Cell) write mode.
In the above method, by first judging whether no write de-lay mode opens, data write mode is determined, it can be not
The writing speed for accelerating data under the premise of storage equipment amount of storage is influenced, the burst write performance of storage equipment is improved, and
Facilitating transplanting, practicability is wide, and the storage equipment of the storage performance of low performance can be made to obtain preferable burst write performance index,
Improve user experience.
In another embodiment, as shown in Fig. 2, Fig. 2 is the process of the second embodiment of the application wiring method
Schematic diagram.Storage equipment is in idle condition, and before the write instruction for receiving data to be written, storage sets first standby judge whether completely
Sufficient first mode unlocking condition, i.e. no write de-lay mode unlocking condition.First mode is opened if meeting, opens above-mentioned the
One mode, if conditions are not met, then opening above-mentioned second mode.Specifically comprise the following steps:
S201: judging whether the storage equipment meets, and a) idle capacity of the storage equipment is greater than first threshold;Or
B) free time of the storage equipment is greater than second threshold, while the idle capacity is greater than the first threshold.
S202: if meet it is above-mentioned a) or b) when, open first mode.Conversely, opening second mode.
Wherein, which is no write de-lay mode, i.e. mould is written in SLC (single layer cell, Single-Level Cell)
Formula, first mode unlocking condition are no write de-lay unlocking condition.
The second mode be MLC (multilevel-cell, Multi-Level Cell) write mode, TLC (three-layer unit,
Trinary-Level Cell) any one of write mode or QLC (four layer units, Quad-Level Cell) write mode.
In conjunction with S201 and S202, specifically, since no write de-lay SLC write mode is to sacrifice memory space and exchange write-in for
Speed, in order to guarantee memory space and write-in space combine, and be non-fully written using SLC no write de-lay mode to
Data are written.Therefore, a first threshold is arranged to the idle capacity of storage equipment, for example, when memory space is 100G, by this
One threshold value is set as 70G.When idle capacity is greater than the first threshold, first mode is opened.It should if idle capacity is not more than
First threshold opens second mode.
In addition, can be carried out to the data of its inside since storage equipment is not when being in idle condition has reading and writing data
It arranges.Such as data transfer, garbage reclamation, idle scan, if processing idle task with by no write de-lay data simultaneously into
If row, the writing speed of data can be seriously affected.Therefore, in order to avoid temporal conflict in present embodiment, to the free time
The duration of time is limited.Second threshold is such as set as 1 minute or 30 seconds.If the free time of storage equipment is less than
Second threshold opens second mode.If the free time for storing equipment is greater than the second threshold, in order to guarantee no write de-lay
Exploitativeness, need to further judge store equipment idle capacity whether be greater than first threshold, if idle capacity be greater than this first
Threshold value then opens first mode.If free time be greater than the second threshold, and idle capacity be not more than first threshold when, open
Open second mode.
S203: the writing commands of data to be written are received.
When storage equipment is in idle condition, when host host issues the writing commands of data to be written, it is desirable that storage
When data are written in equipment, correspondingly, storage equipment receives the writing commands.The writing commands include the length of data to be written,
Type such as random address is written to be written.
S204: judge whether the first mode of the storage equipment is opened.
Since the writing speed of no write de-lay mode is substantially better than other write modes, the storage of present embodiment
Equipment first determines whether first mode i.e. no write de-lay mode opens after the write instruction for receiving data to be written.
If first mode is opened, S205 is executed.If first mode is not turned on, S206 is executed.
S205: the data to be written are written using the first mode.
Data to be written are received, data are written using no write de-lay mode, the speed that the data to be written are written can be accelerated
Rate effectively improves the write performance of storage equipment.
S206: judge whether the data to be written are setting write-in type.
Wherein, this sets write-in type and is written as random address.
Specifically, in solid state hard disk reading data or writing process, the speed of random address write-in is that measurement solid-state is hard
One important indicator of disk processing capacity, and the number per second being written and read, i.e. IOPS performance are to measure storage equipment
One Xiang Zhibiao of random address writing speed.IOPS index is higher under normal conditions, illustrates the data processing energy of solid-state hard disk SSD
Power is stronger.IOPS performance is thus improved, can be improved random address writing speed.And use first mode, that is, no write de-lay mode
Above-mentioned data to be written are written, can be improved the number of write operation per second to improve IOPS index, further increase storage equipment
Writing speed.Therefore, it if the write-in type of data to be written is that random address is written, directlys adopt no write de-lay mode and writes
Enter data to be written.
Type is written if it is setting, executes S205.If data to be written are not setting write-in types, S207 is executed.
S207: the data to be written are written using second mode.
In the above method, by first judging whether no write de-lay mode opens, data write mode is determined, it can be not
The writing speed for accelerating data under the premise of storage equipment amount of storage is influenced, the burst write performance of storage equipment is improved, and
Facilitate transplanting, practicability is wide, and the storage equipment of the storage performance of low end performance can be made to obtain preferable burst write performance and referred to
Mark improves user experience.
In any of the above-described embodiment, since data storage is a lasting dynamic process, and it is not limited to certain
One judgement.Such as storage equipment receives write instruction in idle state and passes through the second mould since first mode is not opened
Data to be written are written in formula, are not meant to that entire writing process requires to be written using second mode.Alternatively, due to fast literary sketch
Entering is to obtain writing speed with space to read, and first mode is opened and data to be written are written by first mode, is also not intended to
Entire writing process meet first mode Writing condition.Therefore, enter after host writes data mode in storage equipment, into one
Step ground persistently judges to store whether equipment meets first mode Writing condition.As shown in figure 3, Fig. 3 is the application data write-in side
The flow diagram of the third embodiment of method.Include the following steps:
S301: the writing commands of data to be written are received.
S302: judge whether the first mode of the storage equipment is opened.
S303: if the first mode is opened, receiving data to be written, is written using the first mode described to be written
Enter data;Conversely, then judging whether the data to be written are setting write-in type.
S304: it if the data to be written are setting write-in type, is written using the first mode described to be written
Data;Conversely, the data to be written then are written using second mode.
Wherein, S301~S304 is identical as S101~S104, please specifically participate in S101~S104 and its related text description,
Details are not described herein.
S305: judge whether the storage equipment meets first mode Writing condition.
Wherein, it is setting write-in type which, which is data to be written,;Or data to be written are non-set
Surely type is written, but the idle capacity for storing equipment is greater than first threshold;Or data to be written are that type is written in non-setting, but deposits
The free time for storing up equipment is greater than second threshold, while idle capacity is greater than first threshold.
Wherein, this sets write-in type and is written as random address.
Storage equipment first determines whether the write-in type of data to be written is random address write-in, the data symbols to be written
Close no write de-lay condition.Specifically, in solid state hard disk reading data or writing process, the speed of random address write-in is to measure
One important indicator of solid state hard disk processing capacity, and the number per second being written and read, i.e. IOPS performance are that measurement is deposited
Store up a Xiang Zhibiao of the performance of equipment random address write-in.IOPS index is higher under normal conditions, illustrates the number of solid-state hard disk SSD
It is stronger according to processing capacity.IOPS performance is thus improved, can be improved random address writing speed.And use first mode, that is, quick
Above-mentioned data to be written are written in write mode, can be improved the number of write operation per second to improve IOPS index, further increase
Store the writing speed of equipment.Therefore, if the write-in type of data to be written is that random address is written, the number to be written is determined
According to meeting no write de-lay condition.
If the write-in type of data to be written is that type, idle the holding of storage equipment judgement storage equipment is written in non-setting
Whether amount is greater than first threshold.If idle capacity is greater than first threshold, which is written item
Part, that is, no write de-lay condition.Specifically, since no write de-lay SLC write mode is to sacrifice memory space and exchange writing speed for
, in order to guarantee that memory space and write-in space combine, and non-fully write using first mode SLC no write de-lay mode
Enter data to be written.Therefore, a first threshold is arranged to the idle capacity of storage equipment, for example, when memory space is 100G, it will
The first threshold is set as 70G.When idle capacity is greater than the first threshold, above-mentioned data fit no write de-lay item to be written
Part.Such as idle capacity be greater than 70G when, meet no write de-lay condition.
If the write-in type of data to be written is that type is written in non-setting, judge whether the free time for storing equipment is big
In second threshold.If free time is greater than second threshold, judge whether the idle capacity is greater than first threshold.If storage
The idle capacity of equipment is greater than first threshold, then the data fit no write de-lay condition to be written.Specifically, due to storing equipment
When being in idle condition does not have reading and writing data, the data of its inside can be arranged, such as garbage reclamation, idle scan,
Freed data blocks will be written using second mode using the data reproduction of the data block of first mode write-in, after writing, erasing is adopted
With the data etc. for the data block that first mode is written, if processing idle task is simultaneously carried out with by no write de-lay data
Words, can seriously affect the writing speed of data.Therefore, in order to avoid temporal conflict in present embodiment, to free time
Duration limited.Second threshold is such as set as 1 minute or 30 seconds.If the free time for storing equipment be greater than this
Two threshold values need to further judge whether the idle capacity for storing equipment is greater than first to guarantee the exploitativeness of no write de-lay
Threshold value, if idle capacity is greater than the first threshold, the data fit no write de-lay condition to be written
If meeting first mode Writing condition, S306 is executed, if not meeting the first model Writing condition, is executed
S308。
S306: the data to be written are written using first mode.
S307: whether judgement currently still conforms to first mode Writing condition.
In writing process, whether still storage equipment further judge current first mode write-in unlocking condition, such as sentences
Whether the idle capacity of disconnected current storage devices is greater than first threshold.S306 is executed if meeting, if do not met, is executed
S308。
S308: data to be written are written using second mode.
S309: new writing commands are judged whether there is.
Equipment is stored after writing current data to be written, further determines whether to receive new writing commands, such as
Fruit receives new writing commands, executes step S302.If not receiving new writing commands, S310 is executed.
S310: entering idle state, executes idle task, and judge whether there is new writing commands.
Wherein, which includes data transfer, is specifically included the data for the data block being written using first mode,
Again freed data blocks are written using second mode;After the completion of write-in, the data for the data block that erasing is written using first mode.
Idle task further includes that idle scan is carried out to storage equipment, and clearing and retrieving is written the operations such as the rubbish that data to be written generate and appoints
Business.
Further, storage equipment judges whether idle task executes completion, if completion is not carried out, in idle task
In implementation procedure, new order write-in is judged whether there is at predetermined time intervals.
Wherein, which is generally several milliseconds, can also adjust the predetermined time according to different demands.
If the storage equipment receives new writing commands during executing idle task, S302 is executed.In circulation
State writing process.If not receiving new writing commands during executing idle task, S311 is executed.
S311: storage equipment enters dormant state.
Equipment is stored after entering dormant state, Host next time is waited to wake up.
It is different from the prior art, the storage equipment of present embodiment is sentenced first after idle state receives writing commands
Whether the no write de-lay mode of disconnected storage equipment opens, and no write de-lay mode data to be written is used if on, conversely, then
Data to be written are written using low-speed writing mode.By first judging whether no write de-lay mode opens, determine that mould is written in data
Formula can accelerate the writing speed of data under the premise of not influencing to store equipment amount of storage, improve the burst of storage equipment
Write performance, and facilitate transplanting, practicability is wide, and the storage equipment of the storage performance of low performance can be made to obtain preferable burst and write
Enter performance indicator, improves user experience.
In terms of hardware structure, present applicant proposes storage equipment, referring to Fig. 4, the storage equipment packet of present embodiment
Memory 41 is included, the processor 42 communicated to connect with memory 41.Be stored in memory 41 to run on the processor
Computer program, processor 42 can be realized above-mentioned FIG. 1 to FIG. 3 any embodiment data when executing computer program and writes
Enter method.
Memory 41 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey
Sequence, non-volatile computer executable program and module, such as the corresponding program of method for writing data in the embodiment of the present invention
Instruction/module.Non-volatile software program, instruction and the module that processor 42 is stored in memory 42 by operation, from
And the various function application and data processing of execute server, the i.e. method of realization above method embodiment data write-in.
Memory 41 may include storing program area and storage data area, wherein storing program area can storage program area,
Application program required at least one function;Storage data area can be stored to be created according to using for the device of garbage reclamation
Data etc..
One or more of modules are stored in the memory 41, when by one or more of processors 42
When execution, method for writing data in above-mentioned any means embodiment is executed.
Specifically, processor 42 receives the writing commands of data to be written.
When storage equipment is in idle condition, when host host issues the writing commands of data to be written, it is desirable that storage
When data are written in equipment, correspondingly, processor 42 receives the writing commands.The writing commands include data to be written length,
The logical address of data to be written, the write-in type of data to be written such as random address are written.
Processor 42 further judges whether the first mode for storing equipment is opened.
Wherein, which is no write de-lay mode, i.e. mould is written in SLC (single layer cell, Single-Level Cell)
Formula, first mode Writing condition are no write de-lay condition.
If the first mode is opened, the data to be written are written using the first mode in processor 42;Conversely, then
The data to be written are written using second mode in processor 42.
Wherein, the second mode be MLC (multilevel-cell, Multi-Level Cell) write mode, TLC (three-layer unit,
Trinary-Level Cell) any one of write mode or QLC (four layer units, Quad-Level Cell) write mode.
In another embodiment, storage equipment is in idle condition, and processor 42 receives the write-in of data to be written
Before instruction, storage sets elder generation for judging whether to meet first mode unlocking condition, i.e. no write de-lay mode unlocking condition.If full
It is sufficient then open first mode, then above-mentioned first mode is opened, if conditions are not met, then opening above-mentioned second mode.
Processor 42 is specifically used for executing following steps: judging whether the storage equipment meets, a) the storage equipment
Idle capacity be greater than first threshold;Or b) free time of the storage equipment is greater than second threshold, while the idle appearance
Amount is greater than the first threshold.If meet it is above-mentioned a) or b) when, open first mode.Conversely, opening second mode.
Since no write de-lay SLC write mode is to sacrifice memory space and exchange writing speed for, in order to guarantee that storage is empty
Between and write-in space combine, and data to be written are non-fully written using SLC no write de-lay mode.Therefore, to storage
A first threshold is arranged in the idle capacity of equipment, for example, setting 70G for the first threshold when memory space is 100G.In sky
When not busy capacity is greater than the first threshold, processor 42 opens first mode.If idle capacity is not more than the first threshold, open
Second mode.
In addition, can be carried out to the data of its inside since storage equipment is not when being in idle condition has reading and writing data
It arranges.Such as data transfer, garbage reclamation, idle scan, if processing idle task with by no write de-lay data simultaneously into
If row, the writing speed of data can be seriously affected.Therefore, in order to avoid temporal conflict, processor in present embodiment
The duration of 42 pairs of free times limits.Second threshold is such as set as 1 minute or 30 seconds.If storing the free time of equipment
Time is less than second threshold, opens second mode.It is fast in order to guarantee if the free time for storing equipment is greater than the second threshold
The exploitativeness that literary sketch enters, processor 42 need to further judge whether the idle capacity for storing equipment is greater than first threshold, if empty
Not busy capacity is greater than the first threshold, then opens first mode.If free time is greater than the second threshold, and idle capacity is little
When first threshold, second mode is opened.
In any of the above-described embodiment, since data storage is a lasting dynamic process, and it is not limited to certain
One judgement.Such as storage equipment receives write instruction in idle state and passes through the second mould since first mode is not opened
Data to be written are written in formula, are not meant to that entire writing process requires to be written using second mode.Alternatively, due to fast literary sketch
Entering is to obtain writing speed with space to read, and first mode is opened and data to be written are written by first mode, is also not intended to
Entire writing process meet first mode Writing condition.Therefore, enter processing after host writes data mode in storage equipment
Device 42 further persistently judges to store whether equipment meets first mode Writing condition.
It specifically includes processor 42 and judges whether the storage equipment meets first mode Writing condition.Wherein, this first
Mode Writing condition is that data to be written are setting write-in type;Or data to be written are that type is written in non-setting, but storage is set
Standby idle capacity is greater than first threshold;Or data to be written are that type is written in non-setting, but the free time for storing equipment is big
In second threshold, while idle capacity is greater than first threshold.Wherein, this sets write-in type and is written as random address.
If meeting first mode Writing condition, the data to be written are written using first mode in processor 42.If
The first model Writing condition is not met, data to be written are written using second mode in processor 42.And it is write meeting first mode
After entering condition, whether judgement currently still conforms to first mode Writing condition.If met, continue that institute is written using first mode
Data to be written are stated, anyway, remaining data is written using second mode.
Processor 42 further determines whether to receive new writing commands, such as after writing current data to be written
Fruit receives new writing commands, continues to execute and the step of whether first mode is opened judged.If not receiving new write-in
Order executes idle task into idle state, and judges whether there is new writing commands.
Wherein, which includes data transfer, is specifically included the data for the data block being written using first mode,
Again freed data blocks are written using second mode;After the completion of write-in, the data for the data block that erasing is written using first mode.
Idle task further includes that idle scan is carried out to storage equipment, and clearing and retrieving is written the operations such as the rubbish that data to be written generate and appoints
Business.
Further, processor 42 judges whether idle task executes completion, if completion is not carried out, in idle task
In implementation procedure, new order write-in is judged whether there is at predetermined time intervals.
Wherein, which is generally several milliseconds, can also adjust the predetermined time according to different demands.
If the processor 42 receives new writing commands during executing idle task, judgement first mode is executed
The process whether opened.If processor 42 does not receive new writing commands during executing idle task, storage equipment into
Enter dormant state.
Equipment is stored after entering dormant state, Host next time is waited to wake up.
It is different from the prior art, the processor 42 of present embodiment is sentenced first after idle state receives writing commands
Whether the no write de-lay mode of disconnected storage equipment opens, and no write de-lay mode data to be written is used if on, conversely, then
Data to be written are written using low-speed writing mode.By first judging whether no write de-lay mode opens, determine that mould is written in data
Formula can accelerate the writing speed of data under the premise of not influencing to store equipment amount of storage, improve the burst of storage equipment
Write performance, and facilitate transplanting, practicability is wide, and the storage equipment of the storage performance of low end performance can be made to obtain preferable burst
Write performance index improves user experience.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of one embodiment of the application storage device, the present embodiment storage device 50
In be stored with computer program 51, computer program 51 realizes above-mentioned method for writing data when being executed by processor.
The storage device 50 be specifically as follows USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), magnetic or disk etc. can store computer program 51
Medium, or may be to be stored with the server of the computer program 51, which can be by the computer program of storage
51 are sent to other equipment operation, or can also be with the computer program 51 of the self-operating storage.The storage device 50 is from physics
It can be the combination of multiple entities from the point of view of physically, such as multiple servers, server add memory or memory to add movement
The multiple combinations mode such as hard disk.
The above is only presently filed embodiments, are not intended to limit the scope of the patents of the application, all to utilize the application
Equivalent structure or equivalent flow shift made by specification and accompanying drawing content is applied directly or indirectly in other relevant technologies
Field similarly includes in the scope of patent protection of the application.
Claims (15)
1. a kind of method for writing data for storing equipment characterized by comprising
S101 receives the writing commands of data to be written;
S102, judges whether the first mode of the storage equipment is opened;
S103 receives data to be written if the first mode is opened, and the number to be written is written using the first mode
According to;Conversely, then judging whether the data to be written are setting write-in type;
The data to be written are written using the first mode if the data to be written are setting write-in type in S104;
Conversely, the data to be written then are written using second mode.
2. method for writing data according to claim 1, which is characterized in that before receiving writing commands, the method is also
Including judging whether the storage equipment meets, a) idle capacity of the storage equipment is greater than first threshold;Or it b) described deposits
The free time for storing up equipment is greater than second threshold, while the idle capacity is greater than the first threshold;If meeting a) or b),
Open first mode;It is on the contrary then open second mode.
3. method for writing data according to claim 1, which is characterized in that the method for writing data further includes,
Judge whether the storage equipment meets first mode Writing condition;
If the storage equipment meets the first mode Writing condition, the data to be written are written using first mode;
Conversely, the data to be written then are written using second mode.
4. method for writing data according to claim 3, which is characterized in that described to judge whether the storage equipment meets
First mode Writing condition, specifically includes:
Judge whether the data to be written are setting write-in type, and type is written if setting, then meets the first Writing condition.
5. method for writing data according to claim 4, which is characterized in that described to judge whether the storage equipment meets
First mode Writing condition, specifically further include:
If the data to be written are that type is written in non-setting, judge whether the idle capacity of the storage equipment is greater than first
Threshold value;If the idle capacity is greater than first threshold, meet the first Writing condition.
6. method for writing data according to claim 4, which is characterized in that described to judge whether the storage equipment meets
First mode Writing condition, specifically further include:
If the data to be written are that type is written in non-setting, judge whether the free time is greater than second threshold;If institute
Free time is stated greater than second threshold, then judges whether the idle capacity is greater than first threshold;If the idle capacity is greater than
First threshold then meets the first Writing condition.
7. method for writing data according to claim 3, which is characterized in that if the storage equipment meets described
Then the data to be written are written using first mode in one mode Writing condition;Conversely, then using second mode write-in it is described to
Data are written, specifically:
If the storage equipment meets the first mode Writing condition, first mode is opened, institute is written using first mode
State data to be written;Conversely, then switching to second mode, the data to be written are written using second mode.
8. method for writing data according to claim 1, which is characterized in that the first mode is no write de-lay mode,
The second mode is low-speed writing mode.
9. method for writing data according to claim 8, which is characterized in that
The no write de-lay mode is SLC write mode;The low-speed writing mode be MLC write mode, TLC write mode,
Or QLC write mode.
10. method for writing data according to claim 1, which is characterized in that
The method for writing data further include:
Judge whether there is new writing commands;
If there are new writing commands, S101 is executed;
Conversely, then entering idle state, idle task is executed.
11. method for writing data according to claim 10, which is characterized in that the method for writing data further include:
Judge whether the idle task executes completion;
If being not carried out completion, new writing commands are judged whether there is at predetermined time intervals;
If executing completion, enter dormant state.
12. method for writing data described in 0 or 11 according to claim 1, which is characterized in that the idle task includes:
By using the data of the data block of first mode write-in, freed data blocks are written using second mode again;Write-in is completed
Afterwards, the data for the data block that erasing is written using first mode.
13. method for writing data according to claim 12, which is characterized in that the method for writing data further include: place
When dormant state, if there are new writing commands, the storage equipment is waken up.
14. a kind of storage equipment, which is characterized in that the storage equipment includes that memory and the memory communicate to connect
Processor, the memory are stored with the computer program that can be run on the processor, which is characterized in that the processor
The step of realizing method for writing data described in any one of claim 1~13 when executing the computer program.
15. a kind of storage device, is stored thereon with computer program, which is characterized in that the computer program is held by processor
The step of any one of claim 1~13 method for writing data is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811099881.1A CN109491592B (en) | 2018-09-20 | 2018-09-20 | Storage device, data writing method thereof and storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811099881.1A CN109491592B (en) | 2018-09-20 | 2018-09-20 | Storage device, data writing method thereof and storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109491592A true CN109491592A (en) | 2019-03-19 |
CN109491592B CN109491592B (en) | 2022-11-15 |
Family
ID=65690695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811099881.1A Active CN109491592B (en) | 2018-09-20 | 2018-09-20 | Storage device, data writing method thereof and storage device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491592B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112558865A (en) * | 2020-12-02 | 2021-03-26 | 成都佰维存储科技有限公司 | Burst data reading and writing method and device, readable storage medium and electronic equipment |
WO2021196956A1 (en) * | 2020-03-30 | 2021-10-07 | 华为技术有限公司 | Solid-state drive management method and solid-state drive |
CN113867624A (en) * | 2021-08-26 | 2021-12-31 | 深圳佰维存储科技股份有限公司 | Data writing method and device, readable storage medium and electronic equipment |
CN114564151A (en) * | 2022-02-28 | 2022-05-31 | 深圳忆联信息系统有限公司 | Method and device for improving SSD data retention, computer equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101266835A (en) * | 2007-01-17 | 2008-09-17 | 三星电子株式会社 | Non-volatile memory apparatus comprising multi-user selectable programming mode and the related method |
CN101361135A (en) * | 2005-12-09 | 2009-02-04 | 美光科技公司 | Single level cell programming in a multiple level cell non-volatile memory device |
CN102521160A (en) * | 2011-12-22 | 2012-06-27 | 上海交通大学 | Write buffer detector, addressing method of written data and parallel channel write method |
CN103955431A (en) * | 2014-04-11 | 2014-07-30 | 深圳市江波龙电子有限公司 | Data management method and apparatus in flash memory storage device |
CN104091617A (en) * | 2014-06-17 | 2014-10-08 | 深圳市江波龙电子有限公司 | Flash memory equipment detection method and apparatus thereof |
CN104919431A (en) * | 2013-01-14 | 2015-09-16 | 西部数据技术公司 | Systems and methods of configuring a mode of operation in a solid-state memory |
CN106951186A (en) * | 2017-03-07 | 2017-07-14 | 合肥兆芯电子有限公司 | Data programming method, memory storage apparatus and memorizer control circuit unit |
CN107291626A (en) * | 2017-06-19 | 2017-10-24 | 北京小米移动软件有限公司 | Date storage method and device |
CN108228478A (en) * | 2018-01-05 | 2018-06-29 | 湖南国科微电子股份有限公司 | A kind of raising method and device of SSD write performances |
-
2018
- 2018-09-20 CN CN201811099881.1A patent/CN109491592B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101361135A (en) * | 2005-12-09 | 2009-02-04 | 美光科技公司 | Single level cell programming in a multiple level cell non-volatile memory device |
CN101266835A (en) * | 2007-01-17 | 2008-09-17 | 三星电子株式会社 | Non-volatile memory apparatus comprising multi-user selectable programming mode and the related method |
CN102521160A (en) * | 2011-12-22 | 2012-06-27 | 上海交通大学 | Write buffer detector, addressing method of written data and parallel channel write method |
CN104919431A (en) * | 2013-01-14 | 2015-09-16 | 西部数据技术公司 | Systems and methods of configuring a mode of operation in a solid-state memory |
CN103955431A (en) * | 2014-04-11 | 2014-07-30 | 深圳市江波龙电子有限公司 | Data management method and apparatus in flash memory storage device |
CN104091617A (en) * | 2014-06-17 | 2014-10-08 | 深圳市江波龙电子有限公司 | Flash memory equipment detection method and apparatus thereof |
CN106951186A (en) * | 2017-03-07 | 2017-07-14 | 合肥兆芯电子有限公司 | Data programming method, memory storage apparatus and memorizer control circuit unit |
CN107291626A (en) * | 2017-06-19 | 2017-10-24 | 北京小米移动软件有限公司 | Date storage method and device |
CN108228478A (en) * | 2018-01-05 | 2018-06-29 | 湖南国科微电子股份有限公司 | A kind of raising method and device of SSD write performances |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021196956A1 (en) * | 2020-03-30 | 2021-10-07 | 华为技术有限公司 | Solid-state drive management method and solid-state drive |
CN112558865A (en) * | 2020-12-02 | 2021-03-26 | 成都佰维存储科技有限公司 | Burst data reading and writing method and device, readable storage medium and electronic equipment |
CN113867624A (en) * | 2021-08-26 | 2021-12-31 | 深圳佰维存储科技股份有限公司 | Data writing method and device, readable storage medium and electronic equipment |
CN114564151A (en) * | 2022-02-28 | 2022-05-31 | 深圳忆联信息系统有限公司 | Method and device for improving SSD data retention, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109491592B (en) | 2022-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109491592A (en) | Store equipment and its method for writing data, storage device | |
US8195971B2 (en) | Solid state disk and method of managing power supply thereof and terminal including the same | |
US7318118B2 (en) | System and method for selective write to flash memory in HDD | |
CN105843749B (en) | A kind of NAND Flash fault-tolerance approach based on FPGA | |
CN105630700B (en) | A kind of storage system and reading/writing method with secondary cache structure | |
CN105653202A (en) | Multi-tier scheme for logical storage management | |
US8606970B2 (en) | Data writing method for non-volatile memory, and controller and storage system using the same | |
CN103559146B (en) | A kind of method improving NAND flash controller read or write speed | |
CN101819509A (en) | Solid state disk read-write method | |
CN109814811A (en) | A method of reducing NVMe SSD operating lag influences high-speed data storage apparatus writing speed | |
CN103593324A (en) | Quick-start and low-power-consumption computer system-on-chip with self-learning function | |
CN110377224A (en) | The mass-memory unit refreshed with host-initiated buffer area | |
US20120210076A1 (en) | User device performing data retention operation, storage device and data retention method | |
CN105867834A (en) | Data arrangement method of storage device | |
CN109473138A (en) | Storage device and its method for refreshing | |
CN108959589A (en) | Accelerate the method for solid-state memory journal file saving/restoring based on STT-MRAM | |
CN105474182A (en) | Storage device supporting periodic writes while in a low power mode for an electronic device | |
CN109976673A (en) | A kind of method for writing data and device | |
CN108021471A (en) | The method of data storage device, data handling system and manufaturing data storage device | |
CN102520885B (en) | Data management system for hybrid hard disk | |
CN109491925A (en) | Store equipment and its method for writing data, storage device | |
CN105630699B (en) | A kind of solid state hard disk and read-write cache management method using MRAM | |
US20140223076A1 (en) | Controlling method, connector, and memory storage device | |
CN104115116B (en) | Systems and methods for managing data in a device for hibernation states | |
CN105205015B (en) | A kind of date storage method and storage equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |