WO2015096002A1 - 分配存储空间的方法、装置和控制器 - Google Patents

分配存储空间的方法、装置和控制器 Download PDF

Info

Publication number
WO2015096002A1
WO2015096002A1 PCT/CN2013/090227 CN2013090227W WO2015096002A1 WO 2015096002 A1 WO2015096002 A1 WO 2015096002A1 CN 2013090227 W CN2013090227 W CN 2013090227W WO 2015096002 A1 WO2015096002 A1 WO 2015096002A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage space
cache
allocated
business data
space
Prior art date
Application number
PCT/CN2013/090227
Other languages
English (en)
French (fr)
Inventor
吴丹
陆丞
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/090227 priority Critical patent/WO2015096002A1/zh
Priority to CN201380002762.9A priority patent/CN105264866B/zh
Publication of WO2015096002A1 publication Critical patent/WO2015096002A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • 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/0608Saving storage space on storage systems
    • 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/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • 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/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • 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/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present invention relates to the field of computers, and more particularly to a method, apparatus and controller for allocating storage space in the field of computers. Background technique
  • a SAN Storage Area Network
  • a SAN is a storage network that connects storage arrays and hosts through a network. When users have access requirements, data can be transferred between the host and the storage array at high speed through the storage network.
  • a storage array or storage system can be composed of a controller and a disk system to provide functions such as storage access, data storage, backup, and snapshot.
  • a storage array or a storage system uses a logical unit (a logical unit called a "LU") to store data for a logical storage unit.
  • an LU can also be called a logical unit number LUN (a logical unit number called a "LUN”).
  • LUN logical unit number
  • the Thin Logical Unit Number is a type of LUN. Its characteristic is that its hard disk space allocation is allocated at the time of writing. The so-called "write-time allocation” means that when creating a Thin LUN of a specified capacity, only a virtual capacity is pre-allocated, and there is no actual physical hard disk space.
  • the physical hard disk space is allocated to the Thin. LUN.
  • the benefit of this distribution technology is that we can easily create Thin LUNs that exceed the physical hard disk space without having to "pay" for the amount of data that can be reached in the future, thus saving storage space.
  • the technical solution for allocating hard disk space to the created Thin LUN is that the service data of the host is first written to the cache of the storage array or the controller of the storage system, and the cache is the space requested by the storage array or the storage system from the memory. To reduce the delay of host writes.
  • the controller triggers the allocation of hard disk space when the free space of the cache is tight.
  • a thin LUN is characterized by the ability to create a large-capacity LUN, and the capacity of the LUN does not need to be actually allocated at the time of creation. Since the space of the Thin LUN is allocated at the time of writing, it is possible that the Thin LUN is not filled up for a long period of time, but the newly cached business data of the host needs to allocate hard disk space.
  • the storage system caches the service data, it does not trigger the allocation of the data on the physical hard disk. Only when the free space of the cache is tight, the hard disk space is allocated to write the service data in the cache to the allocated physical hard disk, thereby The business data is concentrated on the allocation of hard disk space when the cache's free space is tight. This method of hard disk allocation is bound to cause competition for various resources of the system, thereby reducing the efficiency of the storage system and seriously affecting the performance of the storage system. Summary of the invention
  • Embodiments of the present invention provide a method, an apparatus, and a controller for allocating storage space, which can avoid contention for storage system resources when allocating storage space, and can improve efficiency and performance of the storage system.
  • a first aspect provides a method for allocating storage space, the method comprising: receiving service data of a fine logical unit number sent by a host; storing the service data in a cache of the storage system; periodically determining the cache Whether there is service data without allocation of storage space; when it is determined that there is no service data allocated to the storage space in the cache, the storage space is allocated for the service data to which the storage space is not allocated.
  • the periodically determining whether the service data of the storage space is not allocated in the cache includes: setting a timer having a periodic timing duration; When the timer reaches the timing, it is determined whether there is service data in the cache where no storage space is allocated.
  • determining whether the cache has a service that does not allocate storage space includes: determining whether the storage space is currently allocated when the timer reaches the timing; determining whether there is service data with no storage space allocated in the cache when it is determined that the storage space is not currently allocated.
  • determining whether there is any service in the cache that does not allocate storage space includes: when determining that the storage space is currently allocated, when the timer reaches the next timing duration, determining whether there is service data in the cache that does not allocate storage space.
  • the periodically determining Determining, in the cache, whether the service data of the location is not occupied, and determining whether the storage space corresponding to the location information is occupied according to the metadata of the storage system; When there is a case where the storage space corresponding to the location information is not occupied, it is determined that there is service data in the cache where no storage space is allocated.
  • the method further includes: determining Whether the cached free space is less than or equal to the cache space threshold; when it is determined that the cached free space is less than or equal to the cache space threshold, the service data of the allocated storage space in the cache is written into the allocated storage space .
  • an apparatus for allocating a storage space comprising: a receiving unit, configured to receive service data of a fine logical unit number sent by a host; and a storage unit, configured to receive the service data by the receiving unit Storing in a cache of the storage system; a first determining unit, configured to periodically determine whether there is service data in the cache that has no allocated storage space; and an allocating unit, configured to determine, in the first determining unit, that there is no allocation in the cache When the business data of the space is stored, the storage space is allocated for the business data to which the storage space is not allocated.
  • the first determining unit includes: a setting module, configured to set a timer with a periodic timing duration; a first determining module, configured to When the timer reaches the timing, it is determined whether there is service data in the cache where no storage space is allocated.
  • the first determining module includes: a first determining submodule, configured to: when the timer reaches the timing When the storage space is currently allocated, the second determining sub-module is configured to determine whether there is service data in the cache that does not allocate storage space when determining that the storage space is not currently allocated.
  • the first determining module includes: a third determining submodule, configured to determine when the storage space is currently being allocated When the timer reaches the next timing, it is determined whether there is service data in the cache where no storage space is allocated.
  • the first determining unit includes a second determining module, configured to determine location information of the service data in the cache; a determining module, configured to periodically determine, according to metadata of the storage system, whether a storage space corresponding to the location information is occupied; and a fourth determining module, configured to: when the storage space corresponding to the location information is not occupied , to determine that there is business data in the cache that has no allocated storage space.
  • the device further includes: a determining unit, configured to determine whether the cached free space is less than or equal to a cache space threshold; and a writing unit, configured to: when the second determining unit determines that the cached free space is less than or equal to the cache space threshold The business data in which the storage space has been allocated is written to the allocated storage space.
  • a controller comprising a processor, a cache, a bus, and a transceiver, wherein the processor, the buffer and the transceiver are communicatively connected by the bus, wherein the transceiver is configured to receive The service data of the fine logical unit number sent by the host; the cache is used to store the service data; the processor is configured to periodically determine whether there is service data in the cache that has no allocated storage space; and determining that there is no allocation in the cache When storing the business data of the space, the processor is further configured to allocate storage space for the business data that has no allocated storage space.
  • the processor is configured to periodically determine whether the service data of the storage space is not allocated in the cache, including: setting a periodic duration with a periodicity a timer; when the timer reaches the timing, determining whether there is service data in the cache where no storage space is allocated.
  • the processor determines, when the timer reaches the timing duration, whether there is no allocated storage space in the cache.
  • the service data includes: determining whether the storage space is currently allocated when the timer reaches the timing; determining whether there is no service space for allocating the storage space in the cache when it is determined that the storage space is not currently allocated.
  • the processor determines, when the timer reaches the timing duration, whether there is no allocated storage space in the cache.
  • the service data includes: when determining that the storage space is currently allocated, when the timer reaches the next timing duration, determining whether there is service data in the cache that does not allocate storage space.
  • the processor is used Periodically determining whether the service data of the storage space is not allocated in the cache, including: determining location information of the service data in the cache; and periodically determining, according to the metadata, whether the storage space corresponding to the location information is occupied; When the storage space corresponding to the location information is not occupied, it is determined that there is service data in the cache where no storage space is allocated.
  • the processor is further used to Determining whether the cached free space is less than or equal to a cache space threshold; the transceiver is further configured to: when the processor determines that the cached free space is less than or equal to the cache space threshold, the storage space has been allocated in the cache Business data is sent to the allocated storage space.
  • the method, device, and controller for allocating a storage space in the embodiment of the present invention periodically determine whether there is service data in the cache of the storage system that is not allocated storage space, and determine that there is no allocation in the cache.
  • the storage space is allocated for the service data without the allocated storage space, and the allocation of the storage space can be dispersed throughout the running period of the storage system, thereby avoiding centralized storage of the storage space in the storage system, thereby avoiding storage.
  • the competition for system resources can improve the efficiency and performance of the storage system and improve the read and write performance of the host.
  • FIG. 1 is a schematic flowchart of a method of allocating a storage space according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for periodically determining whether there is service data for which no storage space is allocated in a cache according to an embodiment of the present invention.
  • FIG. 3 is another schematic flowchart of a method for periodically determining whether there is service data for which no storage space is allocated in a cache according to an embodiment of the present invention.
  • FIG. 4 is still another schematic flowchart of a method for periodically determining whether there is service data for which no storage space is allocated in a cache according to an embodiment of the present invention.
  • FIG. 5 is another schematic flowchart of a method for allocating storage space according to an embodiment of the present invention.
  • FIG. 6 is still another schematic flowchart of a method for allocating storage space according to an embodiment of the present invention.
  • FIG. 7 is a schematic block diagram of an apparatus for allocating storage space according to an embodiment of the present invention.
  • FIG. 8 is a schematic block diagram of a first determining unit according to an embodiment of the present invention.
  • FIG. 9 is a schematic block diagram of a first determining module in accordance with an embodiment of the present invention.
  • FIG. 10 is another schematic block diagram of a first determining unit according to an embodiment of the present invention.
  • FIG. 11 is another schematic block diagram of an apparatus for allocating storage space according to an embodiment of the present invention.
  • Figure 12 is a schematic block diagram of a controller in accordance with an embodiment of the present invention. detailed description
  • FIG. 1 shows a schematic flow diagram of a method 100 of allocating storage space, which may be performed by a device that allocates storage space, such as a storage system or a storage array, for example, A controller in a storage system or storage array.
  • the method 100 includes:
  • S130 Periodically determine whether there is service data in the cache that is not allocated storage space.
  • S140 When it is determined that the service data of the storage space is not allocated in the cache, allocate storage space for the service data that does not allocate the storage space.
  • the storage system receives the service data of the fine logical unit number Thin LUN sent by the host, and may first store the service data in the storage.
  • the cache of the system which can reduce the delay of host writes.
  • the service data may be any type of data that the user wishes to store or write to the physical storage space, such as a video file, a text file, a database file, etc., but the embodiment of the present invention is not limited thereto.
  • the storage system can periodically detect the cache to determine whether there is service data in the cache that has no allocated storage space. For example, the storage system may determine, according to information such as metadata recorded in the storage system, whether the service data with no storage space is allocated in the cache.
  • the metadata includes, for example, location information of a storage space allocated for business data, and the like. The storage system is in the cache When there is no service data to which the storage space is allocated, the storage space is allocated for the business data to which the storage space is not allocated.
  • the storage system periodically detects the cache, and when it is determined that there is no service data allocated in the storage system, the storage space is not allocated.
  • Business data allocation storage space The timing of the allocation of the storage space is not necessarily related to whether the free space of the cache is insufficient, so that the service data of the host can be cached in parallel and the storage space of the service data can be allocated.
  • the allocation of storage space for Thin Lun is dispersed throughout the operation of Thin Lun, especially during the period of sufficient free space of the cache, so that the system resources are abundant and the response is faster when the storage space is allocated; and the storage system is When the business data in the cache is written to the storage space, the system write efficiency and performance can be improved because the storage space has been allocated.
  • the storage system determines that the free space of the cache is insufficient, the storage system allocates the storage space, and writes the service data written by the host into the cache to the hard disk. That is, the cache of the service data of the host and the allocation of the storage space of the service data are serially performed, and the storage system allocates the storage space at a time when the free space of the cache is insufficient, thereby causing a large amount of time during the time.
  • the business data allocates storage space, which causes competition for system resources and slows down the response of the allocated storage space.
  • the slower allocation of the storage space causes the cache to fail to quickly transfer the service data to the hard disk.
  • the cache space that cannot be released in time can carry the service data received by the host, which ultimately results in a decrease in the write performance of the host.
  • the method for allocating storage space in the embodiment of the present invention periodically determines whether there is service data in the cache of the storage system that is not allocated storage space, and when it is determined that there is service data in which no storage space is allocated in the cache,
  • the service data allocation storage space without the allocated storage space that is, the parallel processing of the service data cache and the storage of the service data storage space, can distribute the storage space allocation throughout the entire operation period of the storage system, and avoid insufficient insufficient free space in the cache.
  • the competition for the storage system resources can be avoided, thereby making the utilization of the storage system resources more timely in time, improving the efficiency and performance of the storage system, and improving the read and write performance of the host.
  • the method for allocating storage space in the embodiment of the present invention realizes that the determination and allocation of the thin LUN storage space are effective, and the overhead of the system is not increased.
  • the method of allocating storage space according to an embodiment of the present invention may be performed by a device that allocates a storage space, such as a storage system or a storage array, which is, for example, a storage system.
  • a device that allocates a storage space such as a storage system or a storage array, which is, for example, a storage system.
  • the controller in the storage array is described by taking the device as a storage system as an example in the context of the embodiment of the present invention, but the present invention is not limited thereto.
  • the storage system includes a controller and a physical memory
  • the controller may further include a cache for providing functions such as storage access, data storage, backup, snapshot, and the like.
  • the storage system may periodically detect the cache to determine whether there is service data in the cache that is not allocated storage space, but the embodiment of the present invention is not limited thereto.
  • the storage system may also detect the cache according to a predetermined detection time, and allocate storage space for the service data without the allocated storage space when determining that the service data of the storage space is not allocated in the cache, and the solution is also
  • the cache of business data and the allocation of the storage space of the business data can be processed in parallel, so that the allocation of the storage space can be dispersed throughout the entire operation of the storage system, thereby improving the efficiency and performance of the storage system, and improving the reading and writing of the host. performance.
  • the storage space allocated by the storage system for the service data or the Thin LUN may be a physical hard disk, or may be a solid state disk (Solid State Disk, called "SSD"), erasable.
  • SSD Solid State Disk
  • the periodically determining, in the cache, whether there is service data that does not allocate storage space includes:
  • the storage system may set a timer for periodic reminding, and the timer has a periodic timing duration. When the timer reaches the timing, the storage system may determine whether there is no allocated storage space in the cache. The service data, and the storage system determines that the service data has no storage space allocated in the cache, and allocates storage space for the service data that is not allocated storage space, that is, allocates physical storage space for the Thin LUN.
  • the storage system may set a timer when the Thin LUN is created, or set a timer when receiving the service data sent by the host, but the embodiment of the present invention is not limited thereto.
  • the periodic timing of the timer is T.
  • the timer reminds the storage system to detect the cache every time period T to determine whether there is service data in the cache where no storage space is allocated.
  • the timing duration T may be a fixed value, or may be changed according to information such as resources of the system, but the embodiment of the present invention is not limited thereto.
  • the timing duration may be T1, ⁇ 2, or ⁇ 3, etc., where ⁇ , Tl, ⁇ 2, and ⁇ 3 are positive numbers.
  • the storage system may set a reasonable timing duration according to actual requirements. For example, the storage system may determine the periodicity of the timer based on parameters such as a service data transmission rate, a buffer size, and a service data amount. The timing is long, but the embodiment of the present invention is not limited thereto.
  • the storage system may further determine, in combination with other parameters, whether to detect the cache to determine whether there is service data in the cache that does not allocate storage space.
  • determining whether the service data of the storage space is not allocated in the cache includes:
  • the storage system may first determine whether the storage space is currently allocated, that is, the storage system may first determine whether the last storage space allocation is ended, or determine whether the current storage space allocation is performed for the first time. If the storage system determines that there is no storage space currently allocated, that is, the last storage space allocation has ended, or the current storage space is allocated for the first storage space allocation, at this time, the storage system can determine whether there is no allocation in the cache.
  • the service data of the storage space and the storage system may allocate storage space for the service data without the allocated storage space when determining that the service data has no storage space allocated in the cache, thereby processing the cache of the service data and the storage of the service data in parallel. The allocation of space.
  • determining whether the service data of the storage space is not allocated in the cache includes:
  • the storage system determines that the storage space is currently being allocated, that is, when the last storage space allocation is not completed, the storage system does not need to detect the cache at this time, and saves The storage system may detect the cache when the timer passes the next timing to determine whether there is service data in the cache that has no allocated storage space. It should be understood that the storage system may determine whether the last storage space allocation is ended according to information such as metadata. The storage system may also determine whether the storage space is currently allocated based on other identification information, but the embodiment of the present invention is not limited thereto.
  • determining, periodically, whether the service data of the storage space is not allocated in the cache includes:
  • the storage system may determine the location information of the service data in the cache according to the metadata of the storage system, and periodically determine whether the storage space corresponding to the location information is occupied; if the storage space corresponding to the location information is not In the case of the occupation, it may be determined that there is no service data allocated in the cache, and if the storage space corresponding to the location information is all occupied, there is no case that the storage space is not occupied, then it may be determined that the cache does not exist.
  • the business data of the storage space is allocated, that is, the business data in the cache has been allocated storage space. Therefore, the method according to the embodiment of the present invention can process the cache of the service data and the allocation of the storage space of the service data in parallel, thereby improving the efficiency and performance of the storage system, and improving the read/write performance of the host.
  • the storage system determines that there is no service data allocated in the cache, the storage space is allocated for the service data without the allocated storage space. For example, the storage system can check the business data in the cache which is overwriting the write data, that is, the storage space where the data is located has been allocated, and which is the new write data, that is, the storage space where the data is located is not allocated. The storage system can then send the location information of the newly written data to the volume, and the volume can apply to the storage pool to allocate storage space, and after the storage space is successfully allocated, the metadata can be modified, and the metadata modification is cured. Go to the hard disk to complete the allocation of storage space. When the free space of the subsequent cache is tight, it is only necessary to write the business data to the allocated storage space.
  • the method 100 further includes:
  • S150 Determine whether the cached free space is less than or equal to a cache space threshold.
  • S160 When it is determined that the free space of the cache is less than or equal to the cache space threshold, the service data of the allocated storage space in the cache is written into the allocated storage space.
  • the storage system can determine whether to write the service data in the cache to the allocated storage space according to the size relationship between the cached free space and the cache space threshold.
  • the buffer space threshold is 10% or 15% of the capacity of the cache, etc., but the embodiment of the present invention is not limited thereto.
  • the method for allocating storage space in the embodiment of the present invention periodically determines whether there is service data in the cache of the storage system that is not allocated storage space, and when it is determined that there is service data in which no storage space is allocated in the cache,
  • the service data allocation storage space without the allocated storage space that is, the parallel processing of the service data cache and the storage of the service data storage space, can distribute the storage space allocation throughout the entire operation period of the storage system, and avoid insufficient insufficient free space in the cache.
  • the competition for the storage system resources can be avoided, thereby making the utilization of the storage system resources more timely in time, improving the efficiency and performance of the storage system, and improving the read and write performance of the host.
  • the storage system receives the service data of the Thin LUN sent by the host, and can store the service data in a cache of the storage system.
  • the storage system determines whether the timing allocation time is reached, and the timing allocation time may be a non-periodic predetermined time point or a periodic time point. If the timing allocation time is reached, the flow proceeds to S330; otherwise, the flow proceeds to S310.
  • the storage system determines whether the last allocation was over. If the last allocation has ended, the flow proceeds to S340; otherwise, the flow proceeds to S320.
  • the storage system determines the arrival timing allocation time, and determines that the last allocation has ended, triggering the data allocation storage space in the cache without the storage space allocated, that is, the storage system can determine whether there is no allocated storage space in the cache.
  • the service data and when it is determined that there is no service data allocated in the cache, the storage space is allocated for the service data without the allocated storage space.
  • the storage system determines whether the cache free space is insufficient. For example, the storage system can determine whether the cached free space is less than or equal to the cache space threshold to determine if the cached free space is insufficient. If it is determined that the free space of the cache is insufficient, the flow proceeds to S360; otherwise, the flow proceeds to S310.
  • S360 when the storage system determines that the free space of the cache is insufficient, the service data of the allocated storage space in the cache is written into the allocated storage space. For example, when the storage system determines that the free space of the cache is less than or equal to the cache space threshold, it is determined that the cached free space is insufficient, so that the service data can be written into the allocated storage space.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the method for allocating storage space in the embodiment of the present invention periodically determines whether there is service data in the cache of the storage system that is not allocated storage space, and when it is determined that there is service data in which no storage space is allocated in the cache,
  • the service data allocation storage space without the allocated storage space that is, the parallel processing of the service data cache and the storage of the service data storage space, can distribute the storage space allocation throughout the entire operation period of the storage system, and avoid insufficient insufficient free space in the cache.
  • the competition for the storage system resources can be avoided, thereby making the utilization of the storage system resources more timely in time, improving the efficiency and performance of the storage system, and improving the read and write performance of the host.
  • FIG. 7 shows a schematic block diagram of an apparatus 500 for allocating storage space in accordance with an embodiment of the present invention.
  • the apparatus 500 includes:
  • the receiving unit 510 is configured to receive the service data of the fine logical unit number sent by the host, and the storage unit 520 is configured to store the service data received by the receiving unit 510 in a cache of the storage system;
  • the first determining unit 530 is configured to periodically determine whether there is service data in the cache that is not allocated storage space;
  • the allocating unit 540 is configured to allocate, when the first determining unit 530 determines that the service data of the storage space is not allocated in the cache, allocate a storage space for the service data that does not allocate the storage space.
  • the apparatus for allocating a storage space in the embodiment of the present invention periodically determines whether there is service data in the cache of the storage system that is not allocated storage space, and when it is determined that there is service data in which no storage space is allocated in the cache,
  • the service data allocation storage space without the allocated storage space that is, the parallel processing of the service data cache and the distribution of the service data storage space, Distributing the allocation of storage space during the entire operation of the storage system, avoiding centralized allocation of storage space when the free space of the cache is insufficient, thereby avoiding contention for storage system resources, thereby making the utilization of storage system resources distributed in time. More reasonable, it can improve the efficiency and performance of the storage system, and can improve the read and write performance of the host.
  • the device 500 for allocating the storage space may be a storage system, or may be a controller in the storage system, or may be another entity.
  • the examples are described, but the present invention is not limited thereto.
  • the first determining unit 530 includes: a setting module 531, configured to set a timer with a periodic timing duration;
  • the first determining module 532 is configured to determine, when the timer reaches the timing duration, whether the service data with no storage space is allocated in the cache.
  • the first determining module 532 includes: a first determining submodule 533, configured to determine, when the timer reaches the timing duration, whether the storage is currently allocated.
  • the second determining submodule 534 is configured to determine, when determining that the storage space is not currently allocated, whether the service data with no allocated storage space exists in the cache.
  • the first determining module 532 includes: a third determining submodule 535, configured to: when determining that the storage space is currently allocated, the timer reaches the next When the time is long, it is determined whether there is service data in the cache where no storage space is allocated.
  • the first determining unit 530 includes: a second determining module 536, configured to determine location information of the service data in the cache; and a third determining module 537, And determining, according to the metadata of the storage system, periodically whether the storage space corresponding to the location information is occupied;
  • the fourth determining module 538 is configured to determine, when the storage space corresponding to the location information is not occupied, the service data in the cache that is not allocated storage space.
  • the apparatus 500 further includes: a second determining unit 550, configured to determine whether the buffered free space is less than or equal to a cache space threshold;
  • the writing unit 560 is configured to: when the second determining unit 550 determines that the cached free space is less than or equal to the cache space threshold, write the service data of the cache that has been allocated to the storage space to Allocated in this storage space.
  • apparatus 500 for allocating storage space may correspond to the execution body of the method of allocating storage space in the embodiment of the present invention, and the above and other operations and/or functions of the respective modules in the apparatus 500 are respectively In order to implement the corresponding processes of the respective methods in FIG. 1 to FIG. 6, for the sake of cleaning, no further details are provided herein.
  • the apparatus for allocating a storage space in the embodiment of the present invention periodically determines whether there is service data in the cache of the storage system that is not allocated storage space, and when it is determined that there is service data in which no storage space is allocated in the cache,
  • the service data allocation storage space without the allocated storage space that is, the parallel processing of the service data cache and the storage of the service data storage space, can distribute the storage space allocation throughout the entire operation period of the storage system, and avoid insufficient insufficient free space in the cache.
  • the competition for the storage system resources can be avoided, thereby making the utilization of the storage system resources more timely in time, improving the efficiency and performance of the storage system, and improving the read and write performance of the host.
  • system and “network” are often used interchangeably herein.
  • the term “and/or” in this context is merely an association describing the associated object, indicating that there can be three relationships, for example, A and / or B, which can mean: A exists separately, and both A and B exist, exist alone B these three situations.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • B corresponding to A means that B is associated with A, and can be determined according to A.
  • determining B according to A does not mean that B is determined only according to A, and Determine according to A and / or other information ⁇
  • an embodiment of the present invention further provides a controller 710, which includes a processor 711, a cache 712, a bus 713, and a transceiver 714, wherein the processor 711, the cache 712, and the The transceiver 714 is communicatively coupled through the bus 713, wherein the transceiver 714 is configured to receive service data of a fine logical unit number sent by the host; the cache 712 is configured to store the service data; and the processor 711 is configured to periodically Determining, in the cache 712, the service data that is not allocated the storage space; when determining that the service data of the storage space is not allocated in the cache 712, the processor 711 is further configured to allocate a storage space for the service data that does not allocate the storage space. .
  • the controller of the embodiment of the present invention by periodically determining whether there is service data in the cache of the controller that does not allocate storage space, and determining that there is no service data allocated in the cache, is not allocated.
  • Storage space business data allocation storage space that is, parallel
  • the processing of the cache of the service data and the allocation of the storage space of the service data can distribute the allocation of the storage space throughout the entire operation of the storage system, and avoid the centralized allocation of the storage space when the free space of the cache is insufficient, thereby avoiding the storage system resources. Competing for this makes the utilization of storage system resources more reasonable in time, can improve the efficiency and performance of the storage system, and can improve the read and write performance of the host.
  • the processor 711 may be a central processing unit (a central processing unit (CPU), and the processor 711 may also be other general-purpose processors, digital signal processors (DSP). ), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the cache 712 can include read only memory and random access memory and provides instructions and data to the processor 710. A portion of cache 712 may also include non-volatile random access memory. For example, cache 712 can also store device type information. It should be understood that the cache 712 may be a physical hard disk, a solid state hard disk SSD, a rewritable optical disk, or the like, and may be other physical storage media. Not limited to this.
  • the bus 713 can include, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus 713 in the figure.
  • each step of the above method may be completed by an integrated logic circuit of hardware in the processor 711 or an instruction in the form of software.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the software modules can be located in random memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, etc., which are well established in the art.
  • the storage medium is located in the cache 712, and the processor 711 reads the information in the cache 712 and completes the steps of the above method in combination with the hardware. To avoid repetition, it will not be described in detail here.
  • the processor 711 is configured to periodically determine, in the cache 712, whether there is service data that does not allocate storage space, including: setting a timer with a periodic timing duration; When the timing is reached, it is determined whether there is service data in the cache 712 where no storage space is allocated.
  • the processor 711 determines whether the service data of the storage space is not allocated in the cache 712, where: when the timer reaches the timing, Determine if storage space is currently being allocated; When the storage space is allocated, it is determined whether there is service data in the cache 712 where no storage space is allocated.
  • the processor 711 determines whether the service data of the storage space is not allocated in the cache 712, including: when determining that the storage space is currently allocated, When the timer reaches the next timing, it is determined whether there is service data in the cache 712 where no storage space is allocated.
  • the processor 711 is configured to periodically determine whether there is service data in the cache that has no allocated storage space, including:
  • the processor 711 is further configured to determine whether a free space of the cache 712 is less than or equal to a cache space threshold.
  • the transceiver 714 is further configured to determine, in the processor 711, the free space of the cache 712. When the buffer space threshold is less than or equal to, the service data of the cache 712 that has been allocated the storage space is sent to the allocated storage space.
  • controller 710 may correspond to the execution body of the method for allocating the storage space in the embodiment of the present invention, and may also correspond to the device 500 for allocating the storage space according to the embodiment of the present invention, and the device 700
  • the controller 710 may correspond to the execution body of the method for allocating the storage space in the embodiment of the present invention, and may also correspond to the device 500 for allocating the storage space according to the embodiment of the present invention, and the device 700
  • the controller of the embodiment of the present invention by periodically determining whether there is service data in the cache of the controller that does not allocate storage space, and determining that there is no service data allocated in the cache, is not allocated.
  • the service data allocation storage space of the storage space that is, the parallel processing of the service data cache and the storage space of the service data, can distribute the storage space allocation throughout the entire operation of the storage system, and avoid centralized allocation when the cached free space is insufficient. Storage space, so as to avoid competition for storage system resources, thereby making the utilization of storage system resources more timely in time, improving the efficiency and performance of the storage system, and improving the read and write performance of the host.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

公开了一种分配存储空间的方法、装置和控制器。该方法包括:接收主机发送的精简逻辑单元号的业务数据;将该业务数据存储在存储系统的缓存中;周期性地确定该缓存中是否存在没有分配存储空间的业务数据;在确定该缓存中存在没有分配存储空间的业务数据时,为该没有分配存储空间的业务数据分配存储空间。实施例的分配存储空间的方法、装置和控制器,通过周期性地确定存储系统的缓存中是否存在没有分配存储空间的业务数据,并在该缓存中存在没有分配存储空间的业务数据时进行存储空间的分配,能够避免集中分配存储空间,从而能够避免对系统资源的争抢,由此能够提高存储系统的效率和性能。

Description

分配存储空间的方法、 装置和控制器 技术领域
本发明涉及计算机领域,尤其涉及计算机领域中一种分配存储空间的方 法、 装置和控制器。 背景技术
目前, 很多企业的数据中心都是采用大型存储产品来进行数据存储, 并 且, 这些大型存储产品采用的典型模式是存储区域网络 (Storage Area Network, 筒称为 "SAN" )。 SAN是一种通过网络方式连接存储阵列和主机 的存储网络, 当用户有存取需求时, 数据可以通过该存储网络在主机和存储 阵列之间高速传输。
存储阵列或存储系统可以由控制器和磁盘系统构成, 用于提供存储接 入、数据存储、备份、快照等功能。存储阵列或存储系统以逻辑单元(Logical Unit, 筒称为 "LU" ) 为逻辑存储单元进行数据存储, 习惯上 LU也可以称 为逻辑单元号 LUN ( Logical Unit Number, 筒称为 "LUN" )。 精筒逻辑单元 号( Thin Logical Unit Number, 筒称为 "Thin LUN" )属于 LUN的一种, 其 特点在于它的硬盘空间分配是写时分配的。 所谓 "写时分配" 是指在创建一 个指定容量的 Thin LUN时, 只是预分配一个虚拟的容量, 而并没有实际的 物理硬盘空间, 在主机实际写入数据时才分配物理硬盘空间给这个 Thin LUN。这种分配技术的好处是我们可以轻易地创建出容量超出物理硬盘空间 的 Thin LUN, 而无须为将来可能达到的数据量提前 "买单", 从而可以节省 存储空间。
目前, 对创建的 Thin LUN分配硬盘空间的技术方案是, 主机的业务数 据先写入存储阵列或存储系统的控制器的緩存, 该緩存是存储阵列或存储系 统从其内存中申请的空间, 用以降低主机写的时延。 等到该緩存的空闲空间 比较紧张时, 控制器才触发硬盘空间的分配。
因此, Thin LUN的特点是可以创建大容量的 LUN, 并且该 LUN的容 量并不需要在创建时实际分配出来。由于 Thin LUN的空间都是写时分配的, 那么有可能在很长的一段时间内 Thin LUN都没有被写满, 但主机新緩存的 业务数据都需要分配硬盘空间。 由于存储系统緩存业务数据时 , 并不触发这些数据分配物理硬盘上的空 间, 而只有等到緩存的空闲空间紧张时, 才分配硬盘空间将緩存中的业务数 据写入分配的物理硬盘中,从而大量的业务数据都集中在緩存的空闲空间紧 张时分配硬盘空间。 这种硬盘分配方法势必会造成对系统各种资源的争抢, 从而会降低存储系统的效率并严重影响存储系统的性能。 发明内容
本发明实施例提供了一种分配存储空间的方法、 装置和控制器, 能够避 免分配存储空间时对存储系统资源的争抢, 并能够提高存储系统的效率和性 能。
第一方面, 提供了一种分配存储空间的方法, 该方法包括: 接收主机发 送的精筒逻辑单元号的业务数据; 将该业务数据存储在存储系统的緩存中; 周期性地确定该緩存中是否存在没有分配存储空间的业务数据; 在确定该緩 存中存在没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数 据分配存储空间。
结合第一方面, 在第一方面的第一种可能的实现方式中, 该周期性地确 定该緩存中是否存在没有分配存储空间的业务数据, 包括: 设置具有周期性 的定时时长的定时器; 在该定时器到达该定时时长时, 确定该緩存中是否存 在没有分配存储空间的业务数据。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实 现方式中, 该在该定时器到达该定时时长时, 确定该緩存中是否存在没有分 配存储空间的业务数据, 包括: 在该定时器到达该定时时长时, 确定当前是 否正在分配存储空间; 在确定当前没有分配存储空间时, 确定该緩存中是否 存在没有分配存储空间的业务数据。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实 现方式中, 该在该定时器到达该定时时长时, 确定该緩存中是否存在没有分 配存储空间的业务数据, 包括: 在确定当前正在分配存储空间时, 在该定时 器到达下一定时时长时,确定该緩存中是否存在没有分配存储空间的业务数 据。
结合第一方面或第一方面的第一种至第三种可能的实现方式中的任一 种可能的实现方式, 在第一方面的第四种可能的实现方式中, 该周期性地确 定该緩存中是否存在没有分配存储空间的业务数据, 包括: 确定该緩存中的 业务数据的位置信息; 根据该存储系统的元数据, 周期性地确定该位置信息 对应的存储空间是否被占用; 在该位置信息对应的存储空间存在没有被占用 的情况时, 确定该緩存中存在没有分配存储空间的业务数据。
结合第一方面或第一方面的第一种至第四种可能的实现方式中的任一 种可能的实现方式,在第一方面的第五种可能的实现方式中,该方法还包括: 确定该緩存的空闲空间是否小于或等于緩存空间阈值; 在确定该緩存的空闲 空间小于或等于该緩存空间阈值时,将该緩存中已经分配存储空间的业务数 据写入到已分配的该存储空间中。
第二方面, 提供了一种分配存储空间的装置, 该装置包括: 接收单元, 用于接收主机发送的精筒逻辑单元号的业务数据; 存储单元, 用于将该接收 单元接收的该业务数据存储在存储系统的緩存中; 第一确定单元, 用于周期 性地确定该緩存中是否存在没有分配存储空间的业务数据; 分配单元, 用于 在该第一确定单元确定该緩存中存在没有分配存储空间的业务数据时, 为该 没有分配存储空间的业务数据分配存储空间。
结合第二方面, 在第二方面的第一种可能的实现方式中, 该第一确定单 元包括: 设置模块, 用于设置具有周期性的定时时长的定时器; 第一确定模 块, 用于在该定时器到达该定时时长时, 确定该緩存中是否存在没有分配存 储空间的业务数据。
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实 现方式中, 该第一确定模块包括: 第一确定子模块, 用于在该定时器到达该 定时时长时, 确定当前是否正在分配存储空间; 第二确定子模块, 用于在确 定当前没有分配存储空间时,确定该緩存中是否存在没有分配存储空间的业 务数据。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实 现方式中, 该第一确定模块包括: 第三确定子模块, 用于在确定当前正在分 配存储空间时, 在该定时器到达下一定时时长时, 确定该緩存中是否存在没 有分配存储空间的业务数据。
结合第二方面或第二方面的第一种至第三种可能的实现方式中的任一 种可能的实现方式, 在第二方面的第四种可能的实现方式中, 该第一确定单 元包括: 第二确定模块, 用于确定该緩存中的业务数据的位置信息; 第三确 定模块, 用于根据该存储系统的元数据, 周期性地确定该位置信息对应的存 储空间是否被占用; 第四确定模块, 用于在该位置信息对应的存储空间存在 没有被占用的情况时, 确定该緩存中存在没有分配存储空间的业务数据。
结合第二方面或第二方面的第一种至第四种可能的实现方式中的任一 种可能的实现方式,在第二方面的第五种可能的实现方式中,该装置还包括: 第二确定单元, 用于确定该緩存的空闲空间是否小于或等于緩存空间阈值; 写入单元, 用于在该第二确定单元确定该緩存的空闲空间小于或等于该緩存 空间阈值时,将该緩存中已经分配存储空间的业务数据写入到已分配的该存 储空间中。
第三方面, 提供了一种控制器, 该控制器包括处理器、 緩存、 总线和收 发器, 其中, 该处理器、 该緩存和该收发器通过该总线通信连接, 其中, 该 收发器用于接收主机发送的精筒逻辑单元号的业务数据; 该緩存用于存储该 业务数据; 该处理器用于周期性地确定该緩存中是否存在没有分配存储空间 的业务数据; 在确定该緩存中存在没有分配存储空间的业务数据时, 该处理 器还用于为该没有分配存储空间的业务数据分配存储空间。
结合第三方面, 在第三方面的第一种可能的实现方式中, 该处理器用于 周期性地确定该緩存中是否存在没有分配存储空间的业务数据, 包括: 设置 具有周期性的定时时长的定时器; 在该定时器到达该定时时长时, 确定该緩 存中是否存在没有分配存储空间的业务数据。
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实 现方式中, 该处理器在该定时器到达该定时时长时, 确定该緩存中是否存在 没有分配存储空间的业务数据, 包括: 在该定时器到达该定时时长时, 确定 当前是否正在分配存储空间; 在确定当前没有分配存储空间时, 确定该緩存 中是否存在没有分配存储空间的业务数据。
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实 现方式中, 该处理器在该定时器到达该定时时长时, 确定该緩存中是否存在 没有分配存储空间的业务数据, 包括: 在确定当前正在分配存储空间时, 在 该定时器到达下一定时时长时,确定该緩存中是否存在没有分配存储空间的 业务数据。
结合第三方面或第三方面的第一种至第三种可能的实现方式中的任一 种可能的实现方式, 在第三方面的第四种可能的实现方式中, 该处理器用于 周期性地确定该緩存中是否存在没有分配存储空间的业务数据, 包括: 确定 该緩存中的业务数据的位置信息; 根据元数据, 周期性地确定该位置信息对 应的存储空间是否被占用; 在该位置信息对应的存储空间存在没有被占用的 情况时, 确定该緩存中存在没有分配存储空间的业务数据。
结合第三方面或第三方面的第一种至第四种可能的实现方式中的任一 种可能的实现方式, 在第三方面的第五种可能的实现方式中, 该处理器还用 于:确定该緩存的空闲空间是否小于或等于緩存空间阈值;该收发器还用于: 在该处理器确定该緩存的空闲空间小于或等于该緩存空间阈值时,将该緩存 中已经分配存储空间的业务数据发送到已分配的该存储空间中。
基于上述技术方案, 本发明实施例的分配存储空间的方法、 装置和控制 器,通过周期性地确定存储系统的緩存中是否存在没有分配存储空间的业务 数据, 并在确定该緩存中存在没有分配存储空间的业务数据时, 为该没有分 配存储空间的业务数据分配存储空间, 能够将存储空间的分配分散在存储系 统的整个运行期间, 避免在存储系统中集中分配存储空间, 从而能够避免对 存储系统资源的争抢, 由此能够提高存储系统的效率和性能, 并能够提高主 机的读写性能。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例的分配存储空间的方法的示意性流程图。
图 2是根据本发明实施例的周期性确定緩存中是否存在没有分配存储空 间的业务数据的方法的示意性流程图。
图 3是根据本发明实施例的周期性确定緩存中是否存在没有分配存储空 间的业务数据的方法的另一示意性流程图。
图 4是根据本发明实施例的周期性确定緩存中是否存在没有分配存储空 间的业务数据的方法的再一示意性流程图。
图 5是根据本发明实施例的分配存储空间的方法的另一示意性流程图。 图 6是根据本发明实施例的分配存储空间的方法的再一示意性流程图。 图 7是根据本发明实施例的分配存储空间的装置的示意性框图。
图 8是根据本发明实施例的第一确定单元的示意性框图。
图 9是根据本发明实施例的第一确定模块的示意性框图。
图 10是根据本发明实施例的第一确定单元的另一示意性框图。
图 11是根据本发明实施例的分配存储空间的装置的另一示意性框图。 图 12是根据本发明实施例的控制器的示意性框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不 是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创 造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
图 1示出了根据本发明实施例的分配存储空间的方法 100的示意性流程 图, 该方法 100可以由分配存储空间的装置执行, 该装置例如为存储系统或 存储阵列, 该装置又例如为存储系统或存储阵列中的控制器。 如图 1所示, 该方法 100包括:
S110, 接收主机发送的精筒逻辑单元号的业务数据;
S120, 将该业务数据存储在存储系统的緩存中;
S 130 , 周期性地确定该緩存中是否存在没有分配存储空间的业务数据; S140, 在确定该緩存中存在没有分配存储空间的业务数据时, 为该没有 分配存储空间的业务数据分配存储空间。
具体而言, 在已经创建指定容量的精筒逻辑单元号 Thin LUN的存储系 统中, 存储系统接收主机发送的精筒逻辑单元号 Thin LUN的业务数据, 并 可以首先将该业务数据存储在该存储系统的緩存中,从而可以降低主机写入 的时延。该业务数据可以是用户希望存储或写入物理存储空间的任何类型的 数据, 例如影音文件、 文本文件、 数据库文件等, 但本发明实施例并不限于 此。
存储系统可以周期性地对緩存进行检测, 以确定该緩存中是否存在没有 分配存储空间的业务数据。 例如, 存储系统可以根据存储系统中记录的元数 据等信息, 确定緩存中是否存在没有分配存储空间的业务数据。 该元数据例 如包括为业务数据分配的存储空间的位置信息等。存储系统在确定该緩存中 存在没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分 配存储空间。
即在本发明实施例的分配存储空间的方法中,存储系统周期性地对緩存 进行检测, 并在确定该存储系统的緩存中存在没有分配存储空间的业务数据 时, 为该没有分配存储空间的业务数据分配存储空间。 这种分配存储空间的 时机的选取与緩存的空闲空间是否不足没有必然联系,从而可以并行对主机 的业务数据进行緩存以及对业务数据进行存储空间的分配。 由此, 对 Thin Lun进行存储空间的分配分散在 Thin Lun的整个运行期间,特别是分散在緩 存的空闲空间充裕的时期内,使得分配存储空间时系统资源充裕,响应更快; 并且存储系统在将緩存中的业务数据写入存储空间时, 由于存储空间已经分 配好, 系统写入效率和性能能够得到提高。
而在现有技术中, 存储系统在判断緩存的空闲空间不足时, 才分配存储 空间, 并将主机写入緩存的业务数据写入硬盘。 即主机的业务数据的緩存以 及业务数据的存储空间的分配串行进行,存储系统进行存储空间的分配时机 都集中在緩存的空闲空间不足的时刻, 由此会造成在该时间内需要对大量的 业务数据分配存储空间, 从而会造成系统资源的争抢, 并且导致分配存储空 间的响应变慢。 此外, 存储空间的分配变慢又会造成緩存不能快速地将业务 数据转移到硬盘上, 不能及时释放出的緩存空间来承载主机接收的业务数 据, 从而最终导致主机写性能的降低。
因此, 本发明实施例的分配存储空间的方法, 通过周期性地确定存储系 统的緩存中是否存在没有分配存储空间的业务数据, 并在确定该緩存中存在 没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存 储空间, 即并行处理业务数据的緩存以及业务数据的存储空间的分配, 能够 将存储空间的分配分散在存储系统的整个运行期间,避免在緩存的空闲空间 不足时集中分配存储空间, 从而能够避免对存储系统资源的争抢, 由此使得 存储系统资源的利用在时间上分布更加合理, 能够提高存储系统的效率和性 能, 并能够提高主机的读写性能。
另外, 本发明实施例的分配存储空间的方法, 实现 Thin LUN存储空间 的分配时机的判断和确定的逻辑筒单有效, 并不会增加系统的开销。
应理解,根据本发明实施例的分配存储空间的方法可以由分配存储空间 的装置执行, 该装置例如为存储系统或存储阵列, 该装置又例如为存储系统 或存储阵列中的控制器, 在本发明实施例的上下文中, 仅以该装置为存储系 统为例进行说明, 但本发明并不限于此。
还应理解, 在本发明实施例中, 存储系统包括控制器和物理存储器, 该 控制器还可以包括緩存, 该存储系统用于提供存储接入、 数据存储、 备份、 快照等功能。
应理解, 在本发明实施例中, 存储系统可以周期性地对緩存进行检测, 以确定该緩存中是否存在没有分配存储空间的业务数据,但本发明实施例并 不限于此。 例如, 存储系统也可以按照预定的检测时刻, 对緩存进行检测, 并在确定该緩存中存在没有分配存储空间的业务数据时, 为该没有分配存储 空间的业务数据分配存储空间, 该方案同样也可以并行处理业务数据的緩存 以及业务数据的存储空间的分配,从而能够将存储空间的分配分散在存储系 统的整个运行期间, 由此能够提高存储系统的效率和性能, 并能够提高主机 的读写性能。
还应理解, 在本发明实施例中, 存储系统为业务数据或 Thin LUN分配 的存储空间可以是物理上的硬盘, 也可以是固态硬盘(Solid State Disk, 筒 称为 "SSD" )、 可擦写光盘等, 还可以是其它物理存储介质, 本发明实施例 仅以物理硬盘为例进行说明, 但本发明并不限于此。
下面将结合图 2和图 3 所示的方案, 详细描述根据本发明实施例的对 Thin LUN进行存储空间的分配时机。
如图 2所示, 在本发明实施例中, 可选地, 该周期性地确定该緩存中是 否存在没有分配存储空间的业务数据, 包括:
5131 , 设置具有周期性的定时时长的定时器;
5132, 在该定时器到达该定时时长时, 确定该緩存中是否存在没有分配 存储空间的业务数据。
具体而言, 存储系统可以设置用于周期性提醒的定时器, 该定时器具有 周期性的定时时长, 当该定时器到达该定时时长时, 存储系统可以确定该緩 存中是否存在没有分配存储空间的业务数据, 并且存储系统在确定该緩存中 存在没有分配存储空间的业务数据,可以为该没有分配存储空间的业务数据 分配存储空间, 即为 Thin LUN分配物理存储空间。
例如, 存储系统可以在创建 Thin LUN时设置定时器, 也可以在接收到 主机发送的业务数据时设置定时器, 但本发明实施例并不限于此。 还例如, 该定时器的周期性的定时时长为 T, 则定时器每隔定时时长 T就提醒存储系 统对緩存进行检测, 以确定緩存中是否存在没有分配存储空间的业务数据。 应理解,该定时时长 T可以为固定值,也可以根据系统的资源等信息而改变, 但本发明实施例并不限于此。 例如, 该定时时长可以为 Tl、 Τ2或 Τ3等, 其中, Τ、 Tl、 Τ2和 Τ3为正数 。
还应理解, 在本发明实施例中, 存储系统可以根据实际需求设置合理的 定时时长, 例如, 存储系统可以基于业务数据传输速率、 緩存大小、 业务数 据量等参数, 来确定定时器的周期性的定时时长, 但本发明实施例并不限于 此。
在本发明实施例中, 在定时器到达定时时长时, 存储系统还可以结合其 它参数, 来确定是否对緩存进行检测, 以确定该緩存中是否存在没有分配存 储空间的业务数据。 可选地, 在本发明实施例中, 如图 3所示, 该在该定时 器到达该定时时长时, 确定该緩存中是否存在没有分配存储空间的业务数 据, 包括:
S133 ,在该定时器到达该定时时长时,确定当前是否正在分配存储空间;
5134, 在确定当前没有分配存储空间时, 确定该緩存中是否存在没有分 配存储空间的业务数据。
即在定时器到达该定时时长时,存储系统可以先确定当前是否正在分配 存储空间, 即存储系统可以先确定上一次的存储空间分配是否结束, 或确定 本次是否为首次进行的存储空间分配。如果存储系统确定当前没有分配存储 空间时, 即上一次的存储空间分配已经结束, 或本次的存储空间分配为首次 进行的存储空间分配, 此时, 存储系统可以确定该緩存中是否存在没有分配 存储空间的业务数据, 并且存储系统可以在确定该緩存中存在没有分配存储 空间的业务数据时, 为该没有分配存储空间的业务数据分配存储空间, 从而 并行处理业务数据的緩存以及业务数据的存储空间的分配。
可选地, 在本发明实施例中, 如图 3所示, 该在该定时器到达该定时时 长时, 确定该緩存中是否存在没有分配存储空间的业务数据, 包括:
5135 , 在确定当前正在分配存储空间时, 在该定时器到达下一定时时长 时, 确定该緩存中是否存在没有分配存储空间的业务数据。
具体而言, 如果存储系统确定当前正在分配存储空间时, 即确定上一次 的存储空间分配没有结束时, 存储系统此时不需要对緩存进行检测, 并且存 储系统可以在定时器经过下一定时时长时, 对緩存进行检测, 以确定该緩存 中是否存在没有分配存储空间的业务数据。 应理解, 存储系统可以根据元数 据等信息, 确定上一次的存储空间分配是否结束; 存储系统也可以基于其它 标识信息,来确定当前是否正在分配存储空间,但本发明实施例并不限于此。
在本发明实施例中, 如图 4所示, 可选地, 该周期性地确定该緩存中是 否存在没有分配存储空间的业务数据, 包括:
5136, 确定该緩存中的业务数据的位置信息;
5137 , 根据该存储系统的元数据, 周期性地确定该位置信息对应的存储 空间是否被占用;
S138 , 在该位置信息对应的存储空间存在没有被占用的情况时, 确定该 緩存中存在没有分配存储空间的业务数据。
即存储系统可以根据该存储系统的元数据,确定緩存中的业务数据的位 置信息, 并可以周期性地确定该位置信息对应的存储空间是否被占用; 如果 该位置信息对应的存储空间存在没有被占用的情况, 则可以确定该緩存中存 在没有分配存储空间的业务数据; 反之, 如果该位置信息对应的存储空间全 部被占用, 不存在没有被占用的情况, 则可以确定该緩存中不存在没有分配 存储空间的业务数据, 即緩存中的业务数据都已经分配存储空间。 从而根据 本发明实施例的方法可以并行处理业务数据的緩存以及业务数据的存储空 间的分配, 由此能够提高存储系统的效率和性能, 并能够提高主机的读写性 能。
应理解, 存储系统在确定该緩存中存在没有分配存储空间的业务数据 时, 为该没有分配存储空间的业务数据分配存储空间。 例如, 存储系统可以 检查緩存中的业务数据哪些是覆盖写数据, 即这些数据所在的存储空间已经 被分配了, 哪些是新写数据, 即这些数据所在的存储空间没有分配。 存储系 统于是可以将这些新写数据的位置信息下发到卷,卷就可以向存储池申请分 配存储空间, 并且在存储空间分配成功后, 可以完成元数据的修改, 并将元 数据的修改固化到硬盘, 从而完成存储空间的分配。 等后续緩存的空闲空间 紧张时, 就只需要将业务数据写入已经分配出来的存储空间即可。
具体而言, 在本发明实施例中, 如图 5所示, 可选地, 该方法 100还包 括:
S150, 确定该緩存的空闲空间是否小于或等于緩存空间阈值; S160, 在确定该緩存的空闲空间小于或等于该緩存空间阈值时, 将该緩 存中已经分配存储空间的业务数据写入到已分配的该存储空间中。
即存储系统可以根据緩存的空闲空间与緩存空间阈值的大小关系,确定 是否将緩存中的业务数据写入到已分配的存储空间中。 例如, 该緩存空间阈 值为该緩存的容量的 10%或 15%等, 但本发明实施例并不限于此。
因此, 本发明实施例的分配存储空间的方法, 通过周期性地确定存储系 统的緩存中是否存在没有分配存储空间的业务数据, 并在确定该緩存中存在 没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存 储空间, 即并行处理业务数据的緩存以及业务数据的存储空间的分配, 能够 将存储空间的分配分散在存储系统的整个运行期间,避免在緩存的空闲空间 不足时集中分配存储空间, 从而能够避免对存储系统资源的争抢, 由此使得 存储系统资源的利用在时间上分布更加合理, 能够提高存储系统的效率和性 能, 并能够提高主机的读写性能。
下面将结合图 6, 详细描述根据本发明实施例的存储系统中分配存储空 间的优选实施例。
如图 6所示,在 S310中,存储系统接收主机发送的 Thin LUN的业务数 据, 并可以将该业务数据存储在存储系统的緩存中。
在 S320中, 存储系统判断是否到达定时分配时间, 该定时分配时间可 以是非周期性的预定时间点, 也可以是周期性的时间点。 如果到达定时分配 时间, 则流程进行到 S330; 否则, 流程进行到 S310。
在 S330中, 存储系统确定上一次的分配是否结束。 如果上一次分配已 经结束, 则流程进行到 S340; 否则, 流程进行到 S320。
在 S340中, 存储系统在确定到达定时分配时间, 并且确定上一次的分 配已经结束时, 触发緩存中没有分配存储空间的数据分配存储空间, 即存储 系统可以确定该緩存中是否存在没有分配存储空间的业务数据, 并可以在确 定该緩存中存在没有分配存储空间的业务数据时, 为该没有分配存储空间的 业务数据分配存储空间。
在 S350中, 存储系统判断緩存空闲空间是否不足。 例如, 存储系统可 以确定该緩存的空闲空间是否小于或等于緩存空间阈值, 以确定緩存的空闲 空间是否不足。 如果确定緩存的空闲空间不足, 则流程进行到 S360; 否则, 流程进行到 S310。 在 S360中, 存储系统确定緩存的空闲空间不足时, 将緩存中已经分配 存储空间的业务数据写入已经分配的存储空间中。 例如, 存储系统在确定该 緩存的空闲空间小于或等于该緩存空间阈值时, 确定緩存的空闲空间不足, 从而可以将该业务数据写入到已分配的该存储空间中。
应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意味 着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应 对本发明实施例的实施过程构成任何限定。
因此, 本发明实施例的分配存储空间的方法, 通过周期性地确定存储系 统的緩存中是否存在没有分配存储空间的业务数据, 并在确定该緩存中存在 没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存 储空间, 即并行处理业务数据的緩存以及业务数据的存储空间的分配, 能够 将存储空间的分配分散在存储系统的整个运行期间,避免在緩存的空闲空间 不足时集中分配存储空间, 从而能够避免对存储系统资源的争抢, 由此使得 存储系统资源的利用在时间上分布更加合理, 能够提高存储系统的效率和性 能, 并能够提高主机的读写性能。
上文中结合图 1至图 6, 详细描述了根据本发明实施例的分配存储空间 的方法, 下面将结合图 7至图 12,详细描述根据本发明实施例的分配存储空 间的装置和控制器。
图 7 示出了根据本发明实施例的分配存储空间的装置 500 的示意性框 图。 如图 7所示, 该装置 500包括:
接收单元 510, 用于接收主机发送的精筒逻辑单元号的业务数据; 存储单元 520, 用于将该接收单元 510接收的该业务数据存储在存储系 统的緩存中;
第一确定单元 530, 用于周期性地确定该緩存中是否存在没有分配存储 空间的业务数据;
分配单元 540, 用于在该第一确定单元 530确定该緩存中存在没有分配 存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存储空间。
因此, 本发明实施例的分配存储空间的装置, 通过周期性地确定存储系 统的緩存中是否存在没有分配存储空间的业务数据, 并在确定该緩存中存在 没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存 储空间, 即并行处理业务数据的緩存以及业务数据的存储空间的分配, 能够 将存储空间的分配分散在存储系统的整个运行期间 ,避免在緩存的空闲空间 不足时集中分配存储空间, 从而能够避免对存储系统资源的争抢, 由此使得 存储系统资源的利用在时间上分布更加合理, 能够提高存储系统的效率和性 能, 并能够提高主机的读写性能。
应理解,在本发明实施例中,分配存储空间的装置 500可以为存储系统, 也可以为存储系统中的控制器, 还可以为其它实体, 本发明实施例仅以该装 置 500为存储系统为例进行说明, 但本发明并不限于此。
如图 8所示, 在本发明实施例中, 可选地, 该第一确定单元 530包括: 设置模块 531 , 用于设置具有周期性的定时时长的定时器;
第一确定模块 532, 用于在该定时器到达该定时时长时, 确定该緩存中 是否存在没有分配存储空间的业务数据。
在本发明实施例中, 可选地, 如图 9所示, 该第一确定模块 532包括: 第一确定子模块 533 , 用于在该定时器到达该定时时长时, 确定当前是 否正在分配存储空间;
第二确定子模块 534, 用于在确定当前没有分配存储空间时, 确定该緩 存中是否存在没有分配存储空间的业务数据。
如图 9所示, 在本发明实施例中, 可选地, 该第一确定模块 532包括: 第三确定子模块 535 , 用于在确定当前正在分配存储空间时, 在该定时 器到达下一定时时长时,确定该緩存中是否存在没有分配存储空间的业务数 据。
在本发明实施例中, 可选地, 如图 10所示, 该第一确定单元 530包括: 第二确定模块 536 , 用于确定该緩存中的业务数据的位置信息; 第三确定模块 537, 用于根据该存储系统的元数据, 周期性地确定该位 置信息对应的存储空间是否被占用;
第四确定模块 538, 用于在该位置信息对应的存储空间存在没有被占用 的情况时, 确定该緩存中存在没有分配存储空间的业务数据。
在本发明实施例中, 可选地, 如图 11所示, 该装置 500还包括: 第二确定单元 550, 用于确定该緩存的空闲空间是否小于或等于緩存空 间阈值;
写入单元 560, 用于在该第二确定单元 550确定该緩存的空闲空间小于 或等于该緩存空间阈值时,将该緩存中已经分配存储空间的业务数据写入到 已分配的该存储空间中。
应理解,根据本发明实施例的分配存储空间的装置 500可对应于本发明 实施例中的分配存储空间的方法的执行主体, 并且装置 500中的各个模块的 上述和其它操作和 /或功能分别为了实现图 1至图 6中的各个方法的相应流 程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的分配存储空间的装置, 通过周期性地确定存储系 统的緩存中是否存在没有分配存储空间的业务数据, 并在确定该緩存中存在 没有分配存储空间的业务数据时, 为该没有分配存储空间的业务数据分配存 储空间, 即并行处理业务数据的緩存以及业务数据的存储空间的分配, 能够 将存储空间的分配分散在存储系统的整个运行期间,避免在緩存的空闲空间 不足时集中分配存储空间, 从而能够避免对存储系统资源的争抢, 由此使得 存储系统资源的利用在时间上分布更加合理, 能够提高存储系统的效率和性 能, 并能够提高主机的读写性能。
另外, 本文中术语 "系统" 和 "网络" 在本文中常被可互换使用。 本文 中术语 "和 /或", 仅仅是一种描述关联对象的关联关系, 表示可以存在三种 关系, 例如, A和 /或 B, 可以表示: 单独存在 A , 同时存在 A和 B, 单独存 在 B这三种情况。另外,本文中字符 "/" ,一般表示前后关联对象是一种 "或" 的关系。
应理解, 在本发明实施例中, "与 A相应的 B"表示 B与 A相关联, 根 据 A可以确定^ 但还应理解, 根据 A确定 B并不意味着仅仅根据 A确定 B, 还可以根据 A和 /或其它信息确定^
如图 12所示, 本发明实施例还提供了一种控制器 710, 该控制器 710 包括处理器 711、 緩存 712、 总线 713和收发器 714, 其中, 该处理器 711、 该緩存 712和该收发器 714通过该总线 713通信连接, 其中, 该收发器 714 用于接收主机发送的精筒逻辑单元号的业务数据; 该緩存 712用于存储该业 务数据; 该处理器 711用于周期性地确定该緩存 712中是否存在没有分配存 储空间的业务数据; 在确定该緩存 712中存在没有分配存储空间的业务数据 时, 该处理器 711还用于为该没有分配存储空间的业务数据分配存储空间。
因此, 本发明实施例的控制器, 通过周期性地确定控制器的緩存中是否 存在没有分配存储空间的业务数据, 并在确定该緩存中存在没有分配存储空 间的业务数据时, 为该没有分配存储空间的业务数据分配存储空间, 即并行 处理业务数据的緩存以及业务数据的存储空间的分配, 能够将存储空间的分 配分散在存储系统的整个运行期间,避免在緩存的空闲空间不足时集中分配 存储空间, 从而能够避免对存储系统资源的争抢, 由此使得存储系统资源的 利用在时间上分布更加合理, 能够提高存储系统的效率和性能, 并能够提高 主机的读写性能。
应理解,在本发明实施例中,该处理器 711可以是中央处理单元(Central Processing Unit, 筒称为 "CPU" ), 该处理器 711还可以是其他通用处理器、 数字信号处理器(DSP )、专用集成电路(ASIC )、现成可编程门阵列(FPGA ) 或者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件等。 通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
该緩存 712可以包括只读存储器和随机存取存储器, 并向处理器 710提 供指令和数据。 緩存 712的一部分还可以包括非易失性随机存取存储器。 例 如, 緩存 712还可以存储设备类型的信息。 应理解, 该緩存 712可以是物理 上的硬盘, 也可以是固态硬盘 SSD、 可擦写光盘等, 还可以是其它物理存储 介质, 本发明实施例仅以物理硬盘为例进行说明, 但本发明并不限于此。
该总线 713除包括数据总线之外, 还可以包括电源总线、 控制总线和状 态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线 713。
在实现过程中, 上述方法的各步骤可以通过处理器 711中的硬件的集成 逻辑电路或者软件形式的指令完成。 结合本发明实施例所公开的方法的步骤 可以直接体现为硬件处理器执行完成, 或者用处理器中的硬件及软件模块组 合执行完成。 软件模块可以位于随机存储器, 闪存、 只读存储器, 可编程只 读存储器或者电可擦写可编程存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于緩存 712, 处理器 711读取緩存 712中的信息, 结合其硬件 完成上述方法的步骤。 为避免重复, 这里不再详细描述。
可选地, 作为一个实施例, 该处理器 711用于周期性地确定该緩存 712 中是否存在没有分配存储空间的业务数据, 包括: 设置具有周期性的定时时 长的定时器; 在该定时器到达该定时时长时, 确定该緩存 712中是否存在没 有分配存储空间的业务数据。
可选地,作为一个实施例,该处理器 711在该定时器到达该定时时长时, 确定该緩存 712中是否存在没有分配存储空间的业务数据, 包括: 在该定时 器到达该定时时长时, 确定当前是否正在分配存储空间; 在确定当前没有分 配存储空间时, 确定该緩存 712中是否存在没有分配存储空间的业务数据。 可选地,作为一个实施例,该处理器 711在该定时器到达该定时时长时, 确定该緩存 712中是否存在没有分配存储空间的业务数据, 包括: 在确定当 前正在分配存储空间时, 在该定时器到达下一定时时长时, 确定该緩存 712 中是否存在没有分配存储空间的业务数据。
可选地, 作为一个实施例, 该处理器 711用于周期性地确定该緩存中是 否存在没有分配存储空间的业务数据, 包括:
确定该緩存 712中的业务数据的位置信息;
根据元数据, 周期性地确定该位置信息对应的存储空间是否被占用; 在该位置信息对应的存储空间存在没有被占用的情况时, 确定该緩存
712中存在没有分配存储空间的业务数据。
可选地, 作为一个实施例, 该处理器 711还用于确定该緩存 712的空闲 空间是否小于或等于緩存空间阈值; 该收发器 714还用于在该处理器 711确 定该緩存 712的空闲空间小于或等于该緩存空间阈值时,将该緩存 712中已 经分配存储空间的业务数据发送到已分配的该存储空间中。
应理解,根据本发明实施例的控制器 710可对应于本发明实施例中的分 配存储空间的方法的执行主体, 也可以对应于根据本发明实施例的分配存储 空间的装置 500,并且装置 700中的各个模块的上述和其它操作和 /或功能分 别为了实现图 1至图 5中的各个方法的相应流程,为了筒洁,在此不再赘述。
因此, 本发明实施例的控制器, 通过周期性地确定控制器的緩存中是否 存在没有分配存储空间的业务数据, 并在确定该緩存中存在没有分配存储空 间的业务数据时, 为该没有分配存储空间的业务数据分配存储空间, 即并行 处理业务数据的緩存以及业务数据的存储空间的分配, 能够将存储空间的分 配分散在存储系统的整个运行期间,避免在緩存的空闲空间不足时集中分配 存储空间, 从而能够避免对存储系统资源的争抢, 由此使得存储系统资源的 利用在时间上分布更加合理, 能够提高存储系统的效率和性能, 并能够提高 主机的读写性能。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和筒洁, 上述 描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对 应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的 耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或 通信连接, 也可以是电的, 机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件 功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术方 案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在 一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算 机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory ), 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种分配存储空间的方法, 其特征在于, 包括:
接收主机发送的精筒逻辑单元号的业务数据;
将所述业务数据存储在存储系统的緩存中;
周期性地确定所述緩存中是否存在没有分配存储空间的业务数据; 在确定所述緩存中存在没有分配存储空间的业务数据时, 为所述没有分 配存储空间的业务数据分配存储空间。
2、 根据权利要求 1所述的方法, 其特征在于, 所述周期性地确定所述 緩存中是否存在没有分配存储空间的业务数据, 包括:
设置具有周期性的定时时长的定时器;
在所述定时器到达所述定时时长时,确定所述緩存中是否存在没有分配 存储空间的业务数据。
3、 根据权利要求 2所述的方法, 其特征在于, 所述在所述定时器到达 所述定时时长时, 确定所述緩存中是否存在没有分配存储空间的业务数据, 包括:
在所述定时器到达所述定时时长时, 确定当前是否正在分配存储空间; 在确定当前没有分配存储空间时,确定所述緩存中是否存在没有分配存 储空间的业务数据。
4、 根据权利要求 3所述的方法, 其特征在于, 所述在所述定时器到达 所述定时时长时, 确定所述緩存中是否存在没有分配存储空间的业务数据, 包括:
在确定当前正在分配存储空间时, 在所述定时器到达下一定时时长时, 确定所述緩存中是否存在没有分配存储空间的业务数据。
5、 根据权利要求 1至 4中任一项所述的方法, 其特征在于, 所述周期 性地确定所述緩存中是否存在没有分配存储空间的业务数据, 包括:
确定所述緩存中的业务数据的位置信息;
根据所述存储系统的元数据, 周期性地确定所述位置信息对应的存储空 间是否被占用;
在所述位置信息对应的存储空间存在没有被占用的情况时,确定所述緩 存中存在没有分配存储空间的业务数据。
6、 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 所述方法 还包括:
确定所述緩存的空闲空间是否小于或等于緩存空间阈值;
在确定所述緩存的空闲空间小于或等于所述緩存空间阈值时,将所述緩 存中已经分配存储空间的业务数据写入到已分配的所述存储空间中。
7、 一种分配存储空间的装置, 其特征在于, 包括:
接收单元, 用于接收主机发送的精筒逻辑单元号的业务数据;
存储单元, 用于将所述接收单元接收的所述业务数据存储在存储系统的 緩存中;
第一确定单元, 用于周期性地确定所述緩存中是否存在没有分配存储空 间的业务数据;
分配单元, 用于在所述第一确定单元确定所述緩存中存在没有分配存储 空间的业务数据时, 为所述没有分配存储空间的业务数据分配存储空间。
8、 根据权利要求 7所述的装置, 其特征在于, 所述第一确定单元包括: 设置模块, 用于设置具有周期性的定时时长的定时器;
第一确定模块, 用于在所述定时器到达该定时时长时, 确定所述緩存中 是否存在没有分配存储空间的业务数据。
9、 根据权利要求 8所述的装置, 其特征在于, 所述第一确定模块包括: 第一确定子模块, 用于在所述定时器到达该定时时长时, 确定当前是否 正在分配存储空间;
第二确定子模块, 用于在确定当前没有分配存储空间时, 确定所述緩存 中是否存在没有分配存储空间的业务数据。
10、根据权利要求 9所述的装置,其特征在于,所述第一确定模块包括: 第三确定子模块, 用于在确定当前正在分配存储空间时, 在所述定时器 到达下一定时时长时,确定所述緩存中是否存在没有分配存储空间的业务数 据。
11、 根据权利要求 7至 10中任一项所述的装置, 其特征在于, 所述第 一确定单元包括:
第二确定模块, 用于确定所述緩存中的业务数据的位置信息;
第三确定模块, 用于根据所述存储系统的元数据, 周期性地确定所述位 置信息对应的存储空间是否被占用;
第四确定模块, 用于在所述位置信息对应的存储空间存在没有被占用的 情况时 , 确定所述緩存中存在没有分配存储空间的业务数据。
12、 根据权利要求 7至 11 中任一项所述的装置, 其特征在于, 所述装 置还包括:
第二确定单元, 用于确定所述緩存的空闲空间是否小于或等于緩存空间 阈值;
写入单元, 用于在所述第二确定单元确定所述緩存的空闲空间小于或等 于所述緩存空间阈值时,将所述緩存中已经分配存储空间的业务数据写入到 已分配的所述存储空间中。
13、 一种控制器, 所述控制器包括处理器、緩存、 总线和收发器, 其中, 所述处理器、 所述緩存和所述收发器通过所述总线通信连接, 其特征在于, 所述收发器用于接收主机发送的精筒逻辑单元号的业务数据;
所述緩存用于存储所述业务数据;
所述处理器用于周期性地确定所述緩存中是否存在没有分配存储空间 的业务数据;
在确定所述緩存中存在没有分配存储空间的业务数据时, 所述处理器还 用于为所述没有分配存储空间的业务数据分配存储空间。
14、 根据权利要求 13所述的控制器, 其特征在于, 所述处理器用于周 期性地确定所述緩存中是否存在没有分配存储空间的业务数据, 包括:
设置具有周期性的定时时长的定时器;
在所述定时器到达所述定时时长时,确定所述緩存中是否存在没有分配 存储空间的业务数据。
15、 根据权利要求 14所述的控制器, 其特征在于, 所述处理器在所述 定时器到达所述定时时长时,确定所述緩存中是否存在没有分配存储空间的 业务数据, 包括:
在所述定时器到达所述定时时长时, 确定当前是否正在分配存储空间; 在确定当前没有分配存储空间时,确定所述緩存中是否存在没有分配存 储空间的业务数据。
16、 根据权利要求 15所述的控制器, 其特征在于, 所述处理器在所述 定时器到达所述定时时长时,确定所述緩存中是否存在没有分配存储空间的 业务数据, 包括:
在确定当前正在分配存储空间时, 在所述定时器到达下一定时时长时, 确定所述緩存中是否存在没有分配存储空间的业务数据。
17、 根据权利要求 13至 16中任一项所述的控制器, 其特征在于, 所述 处理器用于周期性地确定所述緩存中是否存在没有分配存储空间的业务数 据, 包括:
确定所述緩存中的业务数据的位置信息;
根据元数据, 周期性地确定所述位置信息对应的存储空间是否被占用; 在所述位置信息对应的存储空间存在没有被占用的情况时,确定所述緩 存中存在没有分配存储空间的业务数据。
18、 根据权利要求 13至 17中任一项所述的控制器, 其特征在于, 所述 处理器还用于: 确定所述緩存的空闲空间是否小于或等于緩存空间阈值; 所述收发器还用于: 在所述处理器确定所述緩存的空闲空间小于或等于 所述緩存空间阈值时,将所述緩存中已经分配存储空间的业务数据发送到已 分配的所述存储空间中。
PCT/CN2013/090227 2013-12-23 2013-12-23 分配存储空间的方法、装置和控制器 WO2015096002A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/090227 WO2015096002A1 (zh) 2013-12-23 2013-12-23 分配存储空间的方法、装置和控制器
CN201380002762.9A CN105264866B (zh) 2013-12-23 2013-12-23 分配存储空间的方法、装置和控制器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/090227 WO2015096002A1 (zh) 2013-12-23 2013-12-23 分配存储空间的方法、装置和控制器

Publications (1)

Publication Number Publication Date
WO2015096002A1 true WO2015096002A1 (zh) 2015-07-02

Family

ID=53477285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/090227 WO2015096002A1 (zh) 2013-12-23 2013-12-23 分配存储空间的方法、装置和控制器

Country Status (2)

Country Link
CN (1) CN105264866B (zh)
WO (1) WO2015096002A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997918A (zh) * 2010-11-11 2011-03-30 清华大学 异构san环境中的海量存储资源按需分配的实现方法
US20120131303A1 (en) * 2010-11-24 2012-05-24 Microsoft Corporation Thin Provisioned Space Allocation
US20130067187A1 (en) * 2011-09-12 2013-03-14 Microsoft Corporation Allocation strategies for storage device sets
CN103080894A (zh) * 2010-12-28 2013-05-01 株式会社日立制作所 存储系统、存储系统的管理方法和程序

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1021143C (zh) * 1985-10-19 1993-06-09 霍尼韦尔布尔公司 多处理机公用的流水线超高速缓冲存储器
US8254333B2 (en) * 2008-09-22 2012-08-28 Htc Corporation Method for improving buffer status triggering mechanism in wireless communications system and related communication device
CN102750229B (zh) * 2012-05-30 2015-08-19 福建星网锐捷网络有限公司 缓存空间配置方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997918A (zh) * 2010-11-11 2011-03-30 清华大学 异构san环境中的海量存储资源按需分配的实现方法
US20120131303A1 (en) * 2010-11-24 2012-05-24 Microsoft Corporation Thin Provisioned Space Allocation
CN103080894A (zh) * 2010-12-28 2013-05-01 株式会社日立制作所 存储系统、存储系统的管理方法和程序
US20130067187A1 (en) * 2011-09-12 2013-03-14 Microsoft Corporation Allocation strategies for storage device sets

Also Published As

Publication number Publication date
CN105264866B (zh) 2018-08-21
CN105264866A (zh) 2016-01-20

Similar Documents

Publication Publication Date Title
US11960725B2 (en) NVMe controller memory manager providing CMB capability
US9489141B2 (en) Efficient scheduling of Input/Output requests to reduce latency and maximize throughput in a flash storage device
WO2018076793A1 (zh) 一种NVMe数据读写方法及NVMe设备
US20200151134A1 (en) Bandwidth limiting in solid state drives
WO2022017002A1 (zh) 一种垃圾回收方法及装置
JP5922740B2 (ja) メモリデバイスのための装置、メモリデバイスおよびメモリデバイスの制御のための方法
KR20200087713A (ko) 적응형 기입 버퍼 해제를 이용한 스토리지 미디어 프로그래밍
JP2009181148A (ja) ストレージサブシステム
US10901624B1 (en) Dummy host command generation for supporting higher maximum data transfer sizes (MDTS)
US9400603B2 (en) Implementing enhanced performance flash memory devices
WO2017092002A1 (zh) 应用于计算机系统的数据迁移方法和装置、计算机系统
WO2020000485A1 (zh) 一种基于NVMe的数据写入方法、装置及系统
WO2019062202A1 (zh) 硬盘操作命令的执行方法、硬盘及存储介质
WO2015035814A1 (zh) 一种写数据方法及存储设备
US10983930B1 (en) Efficient non-transparent bridge (NTB) based data transport
US8307155B1 (en) Method, system, apparatus, and computer-readable medium for integrating a caching module into a storage system architecture
WO2021174698A1 (zh) 虚拟机快照创建方法、装置、存储介质及计算机设备
WO2015165055A1 (zh) 存储数据的方法、内存控制器和中央处理器
WO2017054714A1 (zh) 磁盘阵列的读方法及装置
TWI747660B (zh) 多閃存晶片的資料讀取方法及裝置以及電腦程式產品
WO2015096002A1 (zh) 分配存储空间的方法、装置和控制器
CN114637462A (zh) 用于存储装置的数据复制卸载的系统和方法
US11733917B2 (en) High bandwidth controller memory buffer (CMB) for peer to peer data transfer
CN111694507B (zh) 计算环境中的存储缓存/分层期间加速任务的装置和方法
WO2021052230A1 (zh) 一种存储系统、存储节点和数据存储方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380002762.9

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13900555

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13900555

Country of ref document: EP

Kind code of ref document: A1