WO2015145667A1 - ストレージシステム - Google Patents

ストレージシステム Download PDF

Info

Publication number
WO2015145667A1
WO2015145667A1 PCT/JP2014/058878 JP2014058878W WO2015145667A1 WO 2015145667 A1 WO2015145667 A1 WO 2015145667A1 JP 2014058878 W JP2014058878 W JP 2014058878W WO 2015145667 A1 WO2015145667 A1 WO 2015145667A1
Authority
WO
WIPO (PCT)
Prior art keywords
defragmentation
data
area
content
block
Prior art date
Application number
PCT/JP2014/058878
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 JP2016509754A priority Critical patent/JP6171084B2/ja
Priority to US15/122,310 priority patent/US10649691B2/en
Priority to PCT/JP2014/058878 priority patent/WO2015145667A1/ja
Priority to CN201480076664.4A priority patent/CN106062703B/zh
Publication of WO2015145667A1 publication Critical patent/WO2015145667A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/31Providing disk cache in a specific location of a storage system
    • G06F2212/312In storage controller

Definitions

  • the present invention relates to defragmentation in a storage system.
  • Patent Document 1 As background art in this technical field.
  • the storage device disclosed in Patent Document 1 performs normal reference processing in response to a reference request from the host, and acquires continuous data (referred to as logically continuous data) in the content. At that time, if the physical positions of the data are not continuous, the storage apparatus writes them in the continuous physical area when writing to the next disk. Further, Patent Document 1 discloses a method of reading not only the write data but also the logically continuous data around the offset of the write data and writing it to the disk when a host update request is made.
  • Patent Document 1 writes them in a new area of the disk if the number of read data blocks is small when a host reference request is made. For this reason, the randomness of the entire content increases, and the reading performance from the disc deteriorates. Further, since the storage device of Patent Document 1 always reads the peripheral data from the disk at the time of the host update request, the host request response performance deteriorates due to waiting for the I / O. Therefore, it is desired to increase the speed of the defragmentation process while suppressing a decrease in the processing performance of the host I / O request.
  • One aspect of the present invention is a storage system that is provided by one or a plurality of storage devices and includes a media area that stores content data, and a controller that includes a memory area that temporarily stores data in the media area. is there.
  • the controller acquires a reference request for a reference request data block included in the content and stored in the media area.
  • the controller determines the number of gaps at addresses on the media area of a plurality of data blocks consecutive in the content including the reference request data block.
  • the controller determines whether defragmentation by the plurality of data blocks is valid based on the gap number. When the controller determines that the defragmentation is valid, the controller writes the plurality of data blocks read from the media area to the memory area in a continuous address area of the media area.
  • FIG. 3 is a diagram for explaining the outline of Example 1; It is a figure which shows the structural example of a file storage system. It is a figure which shows the structural example of a file storage system. It is a figure which shows the structural example of the defragmentation determination table at the time of a reference request. It is a figure which shows the structural example of the defragmentation determination table at the time of an update request. It is a figure which shows the outline
  • FIG. 6 is a diagram showing an outline of Example 2. It is a flowchart of a page collection process. 10 is a diagram showing an outline of Example 3. FIG. It is a flowchart of a release block collection process.
  • XX table various types of information may be described using the expression “XX table”, but the various types of information may be expressed using a data structure other than a table. In order to show that it does not depend on the data structure, the “XX table” can be called “XX information”.
  • the process may be described using the program as the subject, but it is determined by executing the program by the hardware itself or a processor (for example, MP (Micro Processor)) included in the hardware. Therefore, the subject of the processing may be hardware because the processing is appropriately performed using a storage resource (for example, a memory) and / or a communication interface device (for example, a port).
  • the program source may be a program distribution server or a storage medium, for example.
  • the file storage system includes one or more storage devices.
  • a storage area provided by one or more storage devices is referred to as a media area.
  • the input / output performance of the media area in the file storage system is limited to random and sequential access patterns to stored data.
  • Access to the media area uses an address defined in the media area.
  • the address defined in the media area is, for example, a logical block address (LBA).
  • Random access performance is low compared to sequential access performance. Therefore, it is effective to improve the input / output performance of the storage system to arrange the data so that the sequential access request is not random access as much as possible.
  • the file storage system manages data for each content that is logically organized data. As contents, there are files that aggregate normal files such as archive files, backup files, and virtual machine volume files in addition to normal files. The content can also be part of the file.
  • Measures include defragmentation.
  • defragmentation requires reading all contents from the media area (random access) and writing the data to a new address area in the media area, which is heavy and reduces the performance of the system.
  • Online defragmentation is defragmentation in processing of a reference request (host reference request) and / or an update request (host update request) from the host.
  • the file storage system determines whether defragmentation based on data requested for reference and data continuous to data requested for reference in content is valid.
  • the file storage system determines whether or not the defragmentation is valid based on the number of gaps that the continuous data in the content including the reference request data has in the media area.
  • the data position in the content is indicated by an offset.
  • a data position in content may be referred to as a logical position.
  • data with consecutive offsets in content may be referred to as logically continuous data.
  • data stored at continuous addresses in the media area may be referred to as physically continuous data.
  • the address in the media area is indicated by LBA, for example.
  • the continuous data in the content is divided into multiple data blocks and stored in the media area.
  • the file storage system determines whether defragmentation is effective based on the number of gaps between addresses of the plurality of data blocks (block areas). If the addresses are non-contiguous, there is a gap between them.
  • the data storage unit area in the media area is simply referred to as a block.
  • the file storage system If it is determined that the defragmentation is valid, the file storage system writes the plurality of data blocks in a continuous address area (area consisting of continuous blocks) in the media area. By omitting defragmentation determined to be unnecessary based on the number of gaps, an increase in load due to defragmentation is reduced.
  • the file storage system performs online defragmentation at the time of host reference request only for content that is specified in advance.
  • the file storage system determines whether it is necessary to defragment the content when a host update request is made for the content. A flag indicating that is given to the content determined to be necessary.
  • the file storage system determines whether the target content requires online defragmentation based on the above flag. Only when the flag indicates that online defragmentation is required, the file storage system performs online defragmentation. Thereby, unnecessary defragmentation can be further omitted.
  • the file storage system performs online defragmentation in response to a host update request.
  • the file storage system collectively writes the continuous data including the update request data to the continuous address area in the media area.
  • the file storage system performs offline defragmentation along with online defragmentation.
  • Offline defragmentation is defragmentation asynchronous to the host request.
  • the file storage system selects content that has not been defragmented by online defragmentation, and applies the defragmentation. Since online defragmentation reduces the random data arrangement of content, the processing load of off-line defragmentation is reduced, and a decrease in system input / output performance can be suppressed.
  • FIG. 1 schematically shows an outline of processing of the computer system and the file storage system of this embodiment.
  • the computer system includes a file storage system 100, a plurality of host computers 14, and a management computer 15. These are connected by a network 2.
  • the host computer 14 is a computer that accesses the resources of the file storage system 100 and performs business.
  • the network 2 is a network for communication of user data between the host computer 14 and the file storage system 100 and management data between the management computer 15 and other devices, and is an IP network in one example.
  • the file system is composed of a file storage system 100.
  • the file storage system 100 includes a file system, and receives access to the held file from the host computer 14.
  • the memory area 103 of the file storage system 100 stores a defragmentation control program 300.
  • the defragmentation control program 300 includes an online defragmentation processing module 301 and an offline defragmentation processing module 302.
  • the online defrag processing module 301 When receiving the reference request from the host computer 14, the online defrag processing module 301 refers to the content management table 200 of the reference destination content of the reference request and checks whether or not the defragmentation execution flag 202 is set to be valid.
  • the content management table 200 holds management information for one content.
  • the online defragmentation processing module 301 executes online defragmentation. Thereby, processing for useless online defragmentation can be avoided.
  • the online defragmentation processing module 301 reads, from the media area 104, data that continues to the reference request data in the content (logically continuous data) in addition to the reference request data.
  • the number K of data blocks read from the media area 104 is an integer of 2 or more. K is a constant value or a variable value.
  • the reference data is B1 in the content B, and the number K of data blocks read from the media area 104 is 3.
  • the content B is composed of data blocks B0, B1, B2, and B3.
  • the data blocks B0, B1, B2, and B3 are continuously arranged in this order. That is, the offsets of the data blocks B0, B1, B2, and B3 are continuous.
  • the media area 104 stores data of the content B, and the data block of the latest data is indicated by a bold line.
  • Blocks 141, 143, and 145 store data blocks B0, B1, and B2, respectively.
  • the method of selecting logically continuous data in the content depends on the design. For example, the online defragmentation processing module 301 may select only the data before the reference data, may select only the data after the reference data, or may select both the data before and after.
  • the online defragmentation processing module 301 counts the number of gaps at the address (physical data arrangement) in the media area 104 of the data block from which the data is read.
  • the online defragmentation module 301 can identify the address in the media area 104 from the offset in the content by referring to the address mapping table 260 that associates the offset in the content with the address in the media area.
  • the online defragmentation processing module 301 refers to the reference request defragmentation determination table 220 and determines whether or not defragmentation is valid for the count number.
  • the online defragmentation processing module 301 writes the data in the continuous address area (physical continuous block) of the media area 104.
  • logically continuous data is constituted by physically continuous data blocks.
  • the number of gaps of the blocks 141, 143, and 145 (data blocks B0, B1, and B2) is two.
  • a gap 142 exists between the block 141 and the block 143, and a gap 144 exists between the block 143 and the block 145.
  • the reference request defragmentation determination table 220 indicates that the defragmentation is valid.
  • the online defrag processing module 301 writes the data B 0, B 1, B 3 to the blocks 146 to 147 that are continuous in the media area 104.
  • the number of gaps of content B is reduced from 2 to 1.
  • the determination of whether the count of the number of gaps and the defragmentation are valid may be performed before the data is read from the media area 104.
  • the online defragmentation processing module 301 may read only the reference data from the media area 104 and may not read other continuous peripheral data.
  • the online defrag processing module 301 When receiving the update request, the online defrag processing module 301 writes both the update data and the cache data in a physically continuous area when logically continuous data is cached in the update data.
  • the host update request indicates that the update data D1 * is overwritten on the content D.
  • the content D is composed of data blocks D0, D1, D2, and D3.
  • the data blocks D0, D1, D2, and D3 are continuously arranged in this order.
  • the host update request instructs to overwrite the data block D0 with the data block D1 *.
  • the media area 104 stores data of the content D, and the data block of the latest data is indicated by a bold line.
  • the online defragmentation processing module 301 When the online defragmentation processing module 301 receives the host update request by the data block D1 *, the online defragmentation processing module 301 refers to the cache management table 240 and determines whether logically continuous data is cached in the data block D1 *. In the example of FIG. 1, data blocks D0 and D2 logically continuous to the data block D1 * are cached.
  • the offline defragmentation processing module 302 writes the data blocks D0, D1 *, D2 to the continuous blocks 171 to 173 in the media area 104. The number of gaps in the content D is reduced from 2 to 1.
  • the online defragmentation processing module 301 further determines whether the updated content D is fragmented and defragmentation is necessary based on the defragmentation determination table 230 at the time of an update request. When it is determined that defragmentation is necessary, the offline defragmentation processing module 302 sets the defragmentation execution flag 202 to be valid in the content management table 200 of the content D.
  • the offline defragmentation processing module 302 refers to the offline defragmentation management table 210 and checks whether the fast execution flag 212 is set to be valid. When the high-speed execution flag 212 is not set to be valid, the offline defragmentation processing module 302 executes offline defragmentation for all contents in the media area 104.
  • the offline defragmentation processing module 302 selects content for which the defragmentation execution flag 202 is set in the content management table 200, and executes offline defragmentation only for the selected content.
  • This configuration can improve the read performance because the physical arrangement of data read by online defragmentation is continuously rewritten. Furthermore, the load of off-line defragmentation processing is reduced by increasing the number of data in which physical data arrangement is continuous by on-line defragmentation.
  • the online defragmentation process having a small defragmentation effect or no defragmentation effect is omitted, and the processing performance of the host I / O request for the online defragmentation process is reduced.
  • FIG. 2A shows a configuration example of the file storage apparatus 10 according to the present embodiment.
  • the file storage system 100 includes a file storage device 10.
  • the file storage apparatus 10 is connected to the management computer 15 and a plurality of host computers 14 via the network 2.
  • the network 2 may be, for example, a WAN (Wide Area Network), a LAN (Local Area Network), the Internet, a public line, or a dedicated line.
  • the file storage apparatus 10 includes a processor 102, a memory 107, a storage device 106, and a network interface 105. These are connected via a system bus 108.
  • the processor 102 operates as various functional units of the file storage apparatus 10 by operating using information stored in the memory area 103 in accordance with a program stored in the memory 107.
  • the processor 102 operates as a defragmentation control unit and an empty block management unit.
  • the memory 107 stores a program group 350 and management information 250.
  • the program group 350 includes a defragmentation control program 300 and an empty block management program 310.
  • the management information 250 includes information used by the program group 350.
  • the management information 250 includes a content management table 200, an offline defrag management table 210, a reference request defrag determination table 220, an update request defrag determination table 230, a cache management table 240, and an address mapping table 260.
  • the memory 107 is used for storing information for operating the file storage apparatus 10, as a cache memory for temporarily storing user data of the host computer 14, and as a work memory for the processor 102. It is done.
  • the memory 107 provides the memory area 103 in FIG.
  • a volatile semiconductor memory such as a DRAM or a nonvolatile semiconductor memory such as a flash memory is used, and high-speed data access is possible as compared with the media area 104.
  • program group 350 and management information 250 are shown in the memory area 103, but typically, the program group 350 and management information 250 are loaded from the storage device 106.
  • the storage device 106 stores programs, management information, and metadata necessary for realizing a predetermined function, and stores user data of the host computer 14 in this example.
  • Storage device 106 provides media area 104.
  • the storage device 106 is a storage device including a nonvolatile non-transitory storage medium, and may be connected via a network.
  • the defragmentation control program 300 includes an online defragmentation processing module 301 that executes defragmentation when a host I / O request is made, and an offline defragmentation processing module 302 that executes defragmentation asynchronously with a host I / O request.
  • the free block management program 310 manages use / unuse of blocks, which are data storage units of the media area 104 (storage device 106) for storing user data.
  • the empty block management program 310 holds empty block management information indicating the address in the media area of the empty block, and updates the management information according to the data update in the media area 104.
  • the defragmentation control program 300 determines the write destination of the physical continuous area of the content data read from the media area in cooperation with the empty block management program 310.
  • the free block management program 310 manages the block in which the content data is stored as a free block after the defragmentation is applied.
  • FIG. 2B shows another configuration example of the file storage system 100.
  • the file storage system 100 includes a file server 11 and a block storage device 12. Components other than the storage device 106 in the configuration of FIG. 2A are included in the file server 11.
  • the block storage device 12 corresponds to the storage device 106.
  • the network 4 is a network that connects the file server 11 and the block storage device 12 to each other, and is, for example, a SAN (Storage Area Network).
  • the file server 11 is connected to the network 4 via the storage interface 119
  • the block storage apparatus 12 is connected to the network 4 via the storage interface 129.
  • the file server 11 and the block storage device 12 transmit and receive commands and user data via the network 4 for updating and referencing user data.
  • the block storage device 12 provides the file server 11 with a storage location of user data and an access I / F to the data in units of blocks.
  • the block storage device 12 includes a storage I / F 129 used for communication with the file server 11, a processor 122 that executes a program stored in the memory 123, a storage device 124 that stores data, and a memory 123 that stores programs and data. They are mounted and connected by an internal communication path (for example, bus) 128.
  • the file server 11 includes a processor 112, a memory 113, a network interface 115, and a storage interface 119, which are connected by a system bus 118.
  • the processor 112, the memory 113, and the network interface 115 are the same as corresponding elements in the file storage apparatus 10.
  • the memory 113 stores a program group 350 and management information 250.
  • the file storage system 100 includes a content management table 200.
  • the content management table 200 is created for each content.
  • the content management table 200 includes a defragmentation execution flag 202 in addition to conventional management information (not shown).
  • Conventional management information is, for example, information that constitutes an inode, and includes information related to content length, content owning user, content update, and the like.
  • the defragmentation execution flag 202 When the content needs to be defragmented, the defragmentation execution flag 202 is set valid, and when the content does not need defragmentation, the defragmentation execution flag 202 is set invalid. When the data constituting the content is stored in continuous address areas in the media area 104, the defragmentation execution flag 202 is set to invalid.
  • the online defragmentation processing module 301 determines whether or not the content needs to be defragmented based on the update request defragmentation determination table 230 in the host update request processing. If it is determined that defragmentation is necessary, the online defragmentation processing module 301 sets the content defragmentation execution flag 202 to be valid.
  • the online defragmentation processing module 301 displays a defragmentation execution flag. 202 is set to invalid.
  • the offline defragmentation management table 210 includes a high-speed execution flag 212.
  • the high-speed execution flag 212 is a value set from the management computer 15. When the high-speed execution flag 212 is valid, the content to which offline defragmentation is applied is limited to the content for which the defragmentation execution flag 202 is valid, and high-speed defragmentation is executed.
  • FIG. 3 shows a configuration example of the host reference request time defragmentation determination table 220.
  • the host reference request defragmentation determination table 220 includes a column 222 indicating the type of range occupied by logically continuous K data blocks read from the media area in the content, and a column 223 indicating the number of gaps of the K data blocks. And a column 224 indicating the defragmentation execution determination result.
  • the host reference request defragmentation determination table 220 shows the relationship between the combination of the type of range occupied by K data blocks and the number of gaps of K data blocks, and the defragmentation execution determination result. .
  • the type of the range occupied in the content is the entire content, a part of the content including the top data of the content, a part of the content including the end data of the content, and a part of the content including only the intermediate data.
  • a part of the content consisting only of the intermediate data is composed of data other than the head data and the end data.
  • the defragmentation determination result is invalid when there is a possibility that there is no defragmentation effect due to the relationship between the range in the content and the number of gaps. Note that the online defragmentation execution determination result at the time of the reference request may be determined only from the number of gaps, regardless of the range occupied by the data block in the content.
  • FIG. 4 shows a configuration example of the update request time defragmentation determination table 230.
  • the update request time defragmentation determination table 230 includes a column 232 indicating the type of host update request, a column 233 indicating whether or not continuous block allocation in the media area 104 is possible, and a column 234 indicating whether or not defragmentation is necessary.
  • LFS Log-structured File System
  • LFS tracks updates of both content user data and management information, and records the update data in the log portion of the file system.
  • the update point that is logged is called a checkpoint.
  • the LFS can automatically and continuously generate file system snapshots by storing update data of some or all checkpoints selected from past checkpoints as snapshots.
  • the LFS When the file is updated, the LFS writes the update data in another block on the media area 104 without overwriting the update data on the block data on the media area 104 corresponding to the update location of the file. Thereby, the data of the arbitrary checkpoint can be restored. On the memory area 103, the block data corresponding to the update location of the file is overwritten with the update data.
  • defragmentation does not occur when the host update request is a data deletion request. From these determination results, it is determined whether or not to enable the defragmentation execution flag 202 of the content management table 200.
  • defragmentation occurs when the host update request is a data deletion request, and defragmentation does not occur when data is overwritten.
  • the addition of data is the same as in LFS.
  • Fig. 5 shows an overview of the defragmentation method when a host reference is requested.
  • the content C (400) is composed of data blocks C0, C1, C2, C3, C4, C5, C6, and C7.
  • the defragmentation execution flag 412 of the content management table 410 for content C is valid.
  • Data blocks C0, C1, C2, C3, C4, C5, C6, and C7 are stored in the media area 104.
  • the bold data block in the media area 104 indicates the latest data of the content C.
  • a reference request for the data block C1 is issued. For example, when the data block C 1 is not cached in the memory area 103, the data block C 1 needs to be read from the media area 104.
  • the cache management table 240 indicates whether or not the data block C1 is cached.
  • the online defragmentation processing module 301 reads logical continuous data blocks C0, C1, and C2 including the reference request data block C1 from the blocks 401 to 403 in the media area 104.
  • data blocks C0 and C2 before and after the data block C1 are selected as logically continuous peripheral data blocks of the data block C1 in the content.
  • the online defrag processing module 301 reads data from the media area 104 using a function provided by the OS.
  • only the data block before the data block C1 or only the continuous data block after the data block C1 may be selected.
  • the number of data blocks before and after the data block C1 may be different.
  • the number K of data blocks to be selected is 3, but other numerical values may be used.
  • the online defragmentation processing module 301 counts the number of gaps of the data blocks C0, C1, and C2 (blocks 401 to 403) in the media area 104.
  • the online defrag processing module 301 can refer to the address mapping table 260 and know the media area address corresponding to the content offset of the data blocks C0, C1, and C2.
  • the online defrag processing module 301 counts the number of gaps based on the addresses in the media area of the data blocks C0, C1, and C2. The count of the number of gaps may be performed before reading the data blocks C0, C1, and C2.
  • a gap 404 exists between the data block C0 (block 401) and the data block C1 (block 402), and the data block C1 (block 402) and the data block C2 (block 403) is a gap 405.
  • the number of gaps between the data block C0 (block 401), the data block C1 (block 402), and the data block C2 (block 403) in the media area 104 is two.
  • the online defragmentation processing module 301 refers to the host reference request defragmentation determination table 220 and determines whether or not to perform defragmentation using the data blocks C0, C1, and C2. The online defragmentation processing module 301 determines whether or not to perform defragmentation from the range occupied by the data blocks C0, C1, and C2 in the content C (400) and the number of gaps between them.
  • Data block C0 is the top data of content C (400). Therefore, the data blocks C0, C1, and C2 include the top data of the content C (400) and are a part of the content C (400). The position of the data block in the content is indicated by the offset.
  • the online defragmentation processing module 301 determines to perform defragmentation by writing the data blocks C0, C1, and C2 to the physical continuous area.
  • the online defrag processing module 301 sets the cache state of these data blocks (stored pages) to dirty in the cache management table 240.
  • a special write-only bit indicating the defragmentation process may be prepared.
  • the file system program that writes the data blocks C0, C1, and C2 to the media area 104 obtains the new address area to be written from the empty block management program 310 and writes the data blocks C0, C1, and C2 to the media area 104. Write to the new address area inside.
  • the new address area is a continuous empty block, and the file stem program written to the media area 104 can obtain information on the empty block from the empty block management program 310.
  • the data blocks C0, C1, and C2 are written into successive blocks 401 *, 402 *, and 403 *, respectively.
  • the online defragmentation processing module 301 may acquire the write destination address from the empty block management program 310 and set it in the cache management table 240 at the time of writing. At this time, the file system program written to the media area 104 writes the data block to the write destination address set in the cache management table 240.
  • the free block management program 310 obtains the processing result of the offline defragmentation processing module 302, and manages the blocks 401, 402, 403 as free blocks, and the blocks 401 *, 402 *, 403 *, as non-free areas.
  • the online defragmentation processing module 301 reads the peripheral continuous data block from the media area 104 in addition to the reference data block C5.
  • the data blocks C4 and C6 one by one before and after the reference data block C5 are read from the media area 104.
  • Data blocks C4, C5, and C6 are stored in blocks 406 to 408 in the media area 104.
  • a gap 409 exists between the data block C4 (block 406) and the data block C5 (block 407).
  • the number of gaps of the data block C4 (block 406), the data block C5 (block 407), and the data block C6 (block 408) in the media area 104 is 1. Further, the data blocks C4, C5, and C6 are part of the content C (400) and are composed only of intermediate data.
  • the online defragmentation processing module 301 ends the process without setting the cache state of the data blocks C4, C5, and C6 to dirty in the cache management table 240. Data blocks C4, C5, and C6 are not written to the media area 104.
  • the count of the number of gaps may be performed before reading the data blocks C4, C5, and C6. When it is determined that defragmentation is unnecessary as in this example, it is not necessary to read peripheral continuous data of reference data.
  • the online defragmentation processing module 301 executes defragmentation only when the defragmentation is valid, and arranges the data constituting the content to be continuous in the media area 104.
  • FIG. 6 is a flowchart of the host reference request defragmentation process.
  • a file system program (not shown) accepts a reference request from the host computer 14 or a reference request by processing inside the system (S101).
  • the request processing module refers to the cache management table 240 and determines whether it is necessary to read the reference data from the media area 104 (S102).
  • the request processing module When the data is cached in the memory area 103 and it is not necessary to read the reference data from the media area 104 (S102: NO), the request processing module responds to the request source with the cache data in the memory area 103 (S102: NO). S110). By omitting online defragmentation when a cache hit occurs, the load of online defragmentation is reduced.
  • the online defragmentation processing module 301 When it is necessary to read the reference data from the media area 104 (S102: YES), the online defragmentation processing module 301 refers to the content management table 200 of the reference destination content and determines whether or not the defragmentation execution flag 202 is valid (S103). ).
  • the online defragmentation processing module 301 reads the reference request data from the media area 104 using the media area I / O module in the OS, and stores it in the memory area 103. Store (S105). The request processing module returns the reference data written in the memory area 103 to the request source (S110).
  • the online defragmentation processing module 301 acquires the address information (physical positional relationship information) in the media area 104 of the read K data block from the address mapping table 260. (S104).
  • the online defrag processing module 301 determines whether to perform online defragmentation of the K data block (S106).
  • the online defragmentation processing module 301 identifies the positions occupied by K data blocks in the content, and further counts the number of gaps.
  • the online defragmentation processing module 301 specifies the position and the number of gaps in the content from the offset value in the content of the K data block and the address in the media area 104. Note that the online defragmentation processing module 301 may perform the determination S106 after reading the K data block.
  • the online defragmentation processing module 301 uses the media area I / O module to read logically continuous K data blocks including the requested data block from the media area 104 (S111).
  • the online defragmentation processing module 301 refers to the host reference request defragmentation determination table 220 and acquires the value of the defragmentation execution determination result column 204 corresponding to the set of the position and gap number occupied in the content.
  • the online defragmentation processing module 301 returns the reference data read from the media area 104 to the host computer 14 and ends the process.
  • the online defragmentation processing module 301 performs online defragmentation. Specifically, the online defragmentation processing module 301 performs processing so that the data of the K blocks read to the memory area 103 is written out physically continuous blocks at the time of the next writing.
  • the online defragmentation processing module 301 sets the cache state of K block data to dirty.
  • the media area I / O module acquires a new address area for these dirty pages from the empty block management program 310, and writes the K block data in the dirty state to the designated continuous block.
  • the online defragmentation processing module 301 may determine the write destination of the K block data. In place of / in addition to the cache state indicating the dirty state, a special write-only bit indicating the defragmentation process may be prepared.
  • a maximum value m may be defined as the number of data blocks to be written in the continuous block. When K is larger than the maximum value m, m consecutive data blocks selected from the K data block are written to consecutive addresses. The writing of block data is the same in other flowcharts.
  • the online defrag processing module 301 updates the address mapping table 260. Further, the online defrag processing module 301 refers to the address mapping table 260 to determine whether the entire content (all data blocks of the content) is arranged in continuous address blocks (physical continuous blocks) of the media area 104 after the defragmentation. Determine (S108).
  • the online defragmentation processing module 301 sets the defragmentation execution flag 202 of the content to invalid (S109), and reads the reference data read out on the memory area 103. The process is returned to the host computer 14 (S110), and the process is terminated.
  • step S109 is skipped.
  • Fig. 7 shows an overview of the defragmentation method when a host update is requested.
  • the content to be overwritten is the content D (420).
  • the content D (420) is composed of data blocks D0, D1, D2, and D3, and is stored in the media area 104.
  • the host update request requests that the data block D1 be overwritten with the data block D1 *.
  • the memory area 103 stores the data block D1 * received from the host computer 14.
  • the file system program makes the cache state of the data block D1 (stored page) dirty.
  • the online defragmentation processing module 301 refers to the update request defragmentation determination table 230 in order to determine whether defragmentation is necessary.
  • the host update request here is an overwrite request, and the update request time defragmentation determination table 230 indicates that defragmentation is necessary.
  • the online defragmentation processing module 301 validates the defragmentation execution flag 332 of the content D management table 430.
  • the online defragmentation processing module 301 performs the data blocks D0, D1 *, D2 is processed so that it is written in a continuous block at the next writing time.
  • the online defragmentation processing module 301 sets their cache state (stored page) to dirty in the cache management table 240.
  • the media area writing program acquires the address of the free continuous block from the free block management program 310 as the write destination address.
  • the media area I / O module writes them out to the designated continuous block.
  • the online defrag processing module 301 may acquire the address of the free continuous block from the free block management program 310. Instead of / in addition to the dirty state assigned to the data blocks D0 and D2, a special write-only bit indicating a defragmentation process may be prepared.
  • blocks 421, 422, 423, and 424 store data blocks D0, D1, D2, and D3.
  • blocks 421 *, 422 *, 423 *, and 424 store data blocks D0, D1 *, D2, and D3.
  • the blocks 421, 422, and 423 are managed as free blocks.
  • the content E440 is composed of data blocks E0, E1, and E2.
  • new contents E are added, each of them is cached on the memory area 103 and made dirty.
  • the host update request is a content addition request, and logically continuous peripheral data does not exist in the file storage system 100.
  • Each of the media area I / O modules writes them to physically continuous areas allocated by the empty block management program 310.
  • the online defragmentation processing module 301 sets the defragmentation execution flag of the content E management table 450 to be valid.
  • data blocks E0, E1, and E2 are written to physically continuous areas, and the defragmentation execution flag 452 remains invalid.
  • FIG. 8 shows a flowchart of defragmentation processing at the time of host update request.
  • the request processing module accepts an update request from the host computer 14 or an update request by processing inside the system (S201).
  • the request processing module caches the update data in the memory area 103, and sets the cache state of these data blocks (stored pages) to dirty in the cache management table 240 (S202).
  • the online defragmentation processing module 301 refers to the update request defragmentation determination table 230 and determines whether or not defragmentation is necessary according to the type of host update request (S203). When it is determined that defragmentation is unnecessary (S203: NO), the online defragmentation processing module 301 proceeds to step S205.
  • the online defragmentation processing module 301 sets the defragmentation execution flag 202 of the content management table 200 of the content to be valid (S204).
  • the online defrag processing module 301 refers to the cache management table 240 and checks whether an existing data block logically continuous to the update request data block (data block other than the update request data) exists in the memory area 103. (S205).
  • step S207 is skipped.
  • the online defragmentation processing module 301 sets the cache state of the peripheral data (stored page) to dirty in the cache management table 240. (S207).
  • the media area I / O module writes the dirty data to the empty block in the media area 104 assigned by the empty block management program 310 (S208).
  • either the online defragmentation processing module 301 or the media area I / O module may acquire the address information of the update request data and the empty block to which the peripheral data is written.
  • the online defrag processing module 301 refers to the mapping table 270 to determine whether or not the data written to the media area 104 including the host update request data is allocated to continuous blocks (continuous physical areas) ( S209).
  • the online defragmentation processing module 301 sets the defragmentation execution flag 202 of the content management table 200 to be valid (S210), and ends the process.
  • the online defragmentation processing module 301 determines whether the entire content is assigned to the continuous block with reference to the mapping table 270 (S211).
  • step S212 is skipped.
  • FIG. 9 shows a flowchart of offline defragmentation processing.
  • the offline defragmentation processing module 302 generates a list of contents stored in the media area 104 from the content management table 200 (S301).
  • the offline defragmentation processing module 302 selects content (S302), and determines whether or not the high-speed execution flag 212 of the offline defragmentation management table 210 is set to be valid (S303).
  • the high-speed execution flag 212 can be set from the management computer 15 by the administrator.
  • the offline defragmentation processing module 302 determines whether the defragmentation execution flag 202 of the content management table 200 is valid (S304). When the high-speed execution flag 212 is invalid (S303: NO), step S304 is skipped.
  • the offline defragmentation processing module 302 proceeds to step S308.
  • the offline defragmentation processing module 302 executes defragmentation of the content (S305).
  • the offline defragmentation processing module 302 refers to the mapping table 270 after defragmentation, and determines whether the entire content has been arranged in a continuous block (S306). When the entire content is arranged in a continuous block (S306: YES), the offline defragmentation processing module 302 sets the defragmentation execution flag 202 of the corresponding content to invalid (S307). If the entire content is not arranged in a continuous block (S306: NO), step S307 is skipped.
  • step S308 the offline defragmentation processing module 302 determines whether the next content exists. When the next content exists (S308: YES), the offline defragmentation processing module 302 returns to step S202. When the next content does not exist (S308: NO), the offline defragmentation processing module 302 ends the offline defragmentation.
  • the storage system 100 does not have to execute offline defragmentation and / or online deflating at the time of an update request.
  • the storage system 100 may execute offline defragmentation of all contents without referring to the defragmentation execution flag.
  • the storage system 100 may execute online defragmentation even when a cache hit occurs in the reference request. It is not necessary to use the defragmentation execution flag.
  • This example describes a defragmentation method linked with a cache expansion device.
  • a cache expansion device 18 can be connected to the file storage device 10 and the server 11 to expand the memory area 103.
  • the cache expansion area given by the cache expansion device 18 may be composed of a storage medium such as Non Volatile Memory (NVM) represented by flash memory.
  • NVM Non Volatile Memory
  • the cache expansion area may be used as a swap area for temporarily storing data in the memory area, or may be used as a memory area as it is.
  • the content B is composed of data blocks B0, B1, B2, and B3.
  • Data blocks B0, B1, B2, and B3 are stored in non-contiguous blocks in the media area 104.
  • the host reference request requests reference to the data block B1.
  • the online defrag processing module 301 reads the data blocks B0 and B2 together with the data block B1. Since the memory area 103 is finite, not all data can be held in the memory. At this time, the OS page collection processing module operates when the memory is tight. For example, when any of logically continuous data blocks B0, B1, and B2 is a collection target, the data blocks are arranged so as to be continuous in the cache expansion device 18 while maintaining the continuity. This improves the performance of reading data blocks B0, B1, and B2 from the cache expansion device.
  • the defragmentation control program 300 writes the data stored in the cache expansion area to the continuous addresses in the media area 104 without reading the data from the media area 104. This eliminates the need for I / O read from the media area 104 and improves defragmentation performance.
  • the data stored in the cache expansion area is handled in the same manner as the data stored in the memory area 103.
  • the data storage destination is only written in the memory management information managed by the OS. Therefore, there is no change in the online defragmentation process and the offline defragmentation process described in the first embodiment.
  • a page is a data storage unit in the memory area 103.
  • FIG. 11 shows page collection processing on the memory area 103 in this embodiment.
  • the page collection processing module refers to the memory management information for managing the page reference frequency, and selects a page with a low reference frequency (S401).
  • the page collection processing module determines whether or not the defragmentation execution flag 202 is valid in the content management table 200 indicated by the selected page (S402).
  • the page collection processing unit When the defragmentation execution flag 202 is invalid (S402: NO), the page collection processing unit performs a collection process for the selected page (S403). When the defragmentation execution flag 202 is valid (S402: YES), the page collection processing unit determines whether logically continuous data around the selected page exists in the memory (S404).
  • the page collection processing unit determines that the selected page is a transfer target to the secondary cache area or the swap area (S405).
  • the page collection processing unit determines a page of continuous data including the selected page as a movement target (S406).
  • the page collection processing unit moves the data of the movement target page and collects the page before the movement (S407).
  • the page collection processing unit changes the memory management information so that the data to which the memory management information has been moved is referred to as the reference destination (S408), and ends the processing. Through the above processing, the access performance of the moved page data can be improved.
  • the area where the data is moved by defragmentation is a free area on the free block management program 310, but the storage pool is released. If not, it is a used area on the storage pool. That is, by applying defragmentation, the use area of the storage pool increases and the use efficiency of the physical storage area deteriorates.
  • the present embodiment solves these problems.
  • LFS automatically and continuously generates file system snapshots.
  • the LFS writes the update data to another block on the media area 104 without overwriting the block data on the media area 104 corresponding to the update location of the content.
  • data at an arbitrary time in the past can be restored.
  • the data of the block corresponding to the updated location of the content is overwritten. This arbitrary time is called a checkpoint.
  • FIG. 11 shows an outline of the third embodiment.
  • a maintenance checkpoint number management table 500 and a release block list 510 are added to the configuration of the first embodiment.
  • the administrator can set the maintenance checkpoint number 502 in the maintenance checkpoint number management table 500 from the management computer 15.
  • the maintenance checkpoint number 502 indicates how many past checkpoints are maintained from the latest checkpoint currently being processed.
  • the maintenance checkpoint number 502 does not include a snapshot. Some checkpoint data is saved as a snapshot.
  • the checkpoint selected as the snapshot can be designated from the management computer 15.
  • ⁇ Data is maintained from the latest checkpoint to the number of maintenance checkpoints excluding snapshots.
  • the block for storing the data of the past checkpoint is released as will be described later.
  • the release block list 510 indicates block addresses of the media area 104 that can be released at a certain checkpoint due to an increase in defragmentation or checkpoint.
  • the released block collection processing module may store the released block list 510 in the media area 104 in association with the checkpoint. In the configuration, the release block list 510 is created for each checkpoint.
  • the release block collection processing module reads the release block list 510 for each check point, and performs release processing including Trim processing up to the check point of (latest check point ⁇ number N of maintenance check points).
  • the storage area of the storage pool 150 includes a storage area of a high-speed storage device 151 such as one or a plurality of NVMs and a storage area of a low-speed storage device 152 such as one or a plurality of HDDs.
  • the release block collection processing module operates synchronously or asynchronously with the host request processing.
  • the released block collection processing module releases the blocks in the cache expansion device 18 and the storage pool 150 (Trim processing) based on the released block list registered up to the maintenance checkpoint number 502 in the maintenance checkpoint number management table 500. I do. Thereby, the area release processing can be performed in the cache expansion device 18 and the storage pool 150.
  • FIG. 13 shows a flowchart of the released block collection processing module.
  • the file storage system 100 holds checkpoint management information (not shown) that associates checkpoints with block addresses.
  • the released block collection processing module searches for and selects the oldest checkpoint in the checkpoint management information (S501), and the selected checkpoint is a checkpoint before (the latest checkpoint-the number of maintenance checkpoints N). It is determined whether there is any (S502). As mentioned above, snapshots are excluded from the count.
  • step S502 If the determination result of step S502 is negative (S502: NO), the released block collection processing module ends the process. If the determination result of step S502 is affirmative (S502: YES), the released block collection processing module reads the released block list 510 of the selected checkpoint (S503).
  • the free block management program 310 changes the release block address in the release block list 510 to a free block (S504).
  • the released block collection processing module performs a released block release process (trim process) (S505), and returns to step S501.
  • trim process released block release process
  • the present invention for speeding up the defragmentation process while maintaining the I / O performance from the host device has been described according to the embodiment.
  • the present invention is not limited to the above-described embodiment, and various Various modifications are included.
  • the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described.
  • a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment.
  • each of the above-described configurations, functions, processing units, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor.
  • Information such as programs, tables, and files for realizing each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card or an SD card.

Abstract

 一例のストレージシステムは、コンテンツに含まれ、メディア領域に格納されている、参照要求データブロックの参照要求を取得する。ストレージシステムは、参照要求データブロックを含むコンテンツ内で連続する複数データブロックの、メディア領域上のアドレスにおけるギャップ数を決定する。ストレージシステムは、ギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定する。ストレージシステムは、デフラグが有効と判定した場合に、メディア領域からメモリ領域に読み出された複数データブロックを、メディア領域の連続アドレス領域に書き出す。

Description

ストレージシステム
 本発明は、ストレージシステムにおけるデフラグに関する。
 本技術分野の背景技術として、特許文献1がある。特許文献1に開示されているストレージ装置は、ホストからの参照要求に応答して通常の参照処理を行い、コンテンツ内で連続したデータ(論理的に連続したデータと呼ぶ)を取得する。その時、データの物理的な位置が連続していない場合には、ストレージ装置は、それらを次のディスクへの書き出し時に、連続物理領域に書き出す。更に、特許文献1は、ホスト更新要求時にそのライトデータだけでなく、そのライトデータのオフセット周辺の論理的に連続したデータを読み出してからディスクに書き込む方法を開示している。
米国特許8359430号
 特許文献1のストレージ装置は、ホスト参照要求時、読み出したデータブロック数が小さいと、それらをディスクの新規領域に書き出す。そのため、コンテンツ全体ではランダム性が増し、ディスクからの読み出し性能が劣化する。更に、ホスト更新要求時、特許文献1のストレージ装置は、周辺データをディスクから必ず読み出すため、そのI/O待ちによりホスト要求応答性能が劣化する。したがって、ホストI/O要求の処理性能の低下を抑制しつつ、デフラグ処理を高速化することが望まれる。
 本発明の一態様は、1又は複数の記憶デバイスにより提供され、コンテンツのデータを格納するメディア領域と、前記メディア領域のデータを一時的に格納するメモリ領域を含むコントローラと、を含むストレージシステムである。前記コントローラは、コンテンツに含まれ、前記メディア領域に格納されている、参照要求データブロックの参照要求を取得する。前記コントローラは、前記参照要求データブロックを含む前記コンテンツ内で連続する複数データブロックの、前記メディア領域上のアドレスにおけるギャップ数を決定する。前記コントローラは、前記ギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定する。前記コントローラは、前記デフラグが有効と判定した場合に、前記メディア領域から前記メモリ領域に読み出された前記複数データブロックを、前記メディア領域の連続アドレス領域に書き出す。
 本発明の一態様によれば、ホストI/O要求の処理性能の低下を抑制しつつデフラグ処理を高速化できる。
実施例1の概要を説明する図である。 ファイルストレージシステムの構成例を示す図である。 ファイルストレージシステムの構成例を示す図である。 参照要求時デフラグ判定テーブルの構成例を示す図である。 更新要求時デフラグ判定テーブルの構成例を示す図である。 ホスト参照要求時のデフラグ方法の概要を示す図である。 ホスト参照要求時デフラグ処理のフローチャートである。 ホスト更新要求時のデフラグ方法の概要を示す図である。 ホスト更新要求時デフラグ処理のフローチャートである。 オフラインデフラグ処理のフローチャートである。 実施例2の概要を示す図である。 ページ回収処理のフローチャートである。 実施例3の概要を示す図である。 解放ブロック回収処理のフローチャートである。
 幾つかの実施例を、図面を参照して説明する。なお、以下に説明する実施例は特許請求の範囲にかかる発明を限定するものではなく、また実施例で説明されている諸要素及びその組み合わせの全てが発明の解決手段に必須であるとは限らない。
 なお、以下の説明では、「XXテーブル」の表現にて各種情報を説明することがあるが、各種情報は、テーブル以外のデータ構造で表現されていても良い。データ構造に依存しないことを示すために「XXテーブル」を「XX情報」と呼ぶことができる。
 また、以下の説明では、プログラムを主語として処理を説明する場合があるが、プログラムをハードウェアの自体、またはハードウェアが有するプロセッサ(例えば、MP(Micro Processor))によって実行することで、定められた処理を、適宜に記憶資源(例えばメモリ)及び/又は通信インターフェースデバイス(例えばポート)を用いながら行うため、処理の主語がハードウェアとされても良い。また、プログラムソースは、例えば、プログラム配布サーバ又は記憶メディアであっても良い。
 以下において、ファイルストレージシステムにおけるデフラグ技術が開示される。ファイルストレージシステムは、1以上の記憶デバイスを含む。以下において、1以上の記憶デバイスが与える記憶領域をメディア領域と呼ぶ。
 ファイルストレージシステムにおけるメディア領域の入出力性能は、格納されるデータへのランダム及びシーケンシャルアクセスのパターンに制限される。メディア領域へのアクセスは、メディア領域において定義されるアドレスを使用する。メディア領域で定義されるアドレスは、例えば、論理ブロックアドレス(LBA)である。
 ランダムアクセスの性能は、シーケンシャルアクセスの性能と比較して低い。従って、シーケンシャルアクセス要求は、なるべくランダムアクセスとならないようにデータを配置することが、ストレージシステムの入出力性能の向上に有効である。
 ファイルストレージシステムは、データを、論理的にまとまったデータであるコンテンツごとに管理する。コンテンツとしては、通常のファイルの他、アーカイブファイル、バックアップファイル、仮想計算機のボリュームファイルのような、通常のファイルを集約したファイルがある。コンテンツは、ファイルの一部でもあり得る。
 同様に、データのアクセスも、コンテンツごとに発生する。そのため、コンテンツを構成するデータは、メディア領域において連続したアドレス領域に格納することが求められる。しかし、データの更新要求(上書・追加・削除)により、コンテンツのデータのメディア領域における格納アドレスがランダムとなり、入出力性能が劣化する。
 対策としてデフラグの適用がある。しかし、デフラグは、コンテンツを全てメディア領域から読み出し(ランダムアクセス)し、そのデータをメディア領域の新たなアドレス領域に書き込む必要があり、負荷が重く、システムの性能を低下させる。
 以下に説明するファイルストレージシステムは、オンラインデフラグを実行する。オンラインデフラグは、ホストからの参照要求(ホスト参照要求)及び/又は更新要求(ホスト更新要求)の処理におけるデフラグである。
 一例において、ファイルストレージシステムは、ホスト参照要求時に、参照要求されたデータと、コンテンツ内で参照要求されたデータに連続するデータと、によるデフラグが、有効であるか判定する。ファイルストレージシステムは、参照要求データを含む、コンテンツ内での連続データがメディア領域で有するギャップ数に基づいてデフラグが有効であるか否か判定する。
 ここで、コンテンツ内のデータ位置は、オフセットにより示される。本開示において、コンテンツ内でのデータ位置を論理的な位置と呼ぶことがある。同様に、コンテンツ内でオフセットが連続するデータを、論理的に連続したデータと呼ぶことがある。これに対して、メディア領域において連続アドレスに格納されているデータを、物理的に連続するデータと呼ぶことがある。上述のように、メディア領域におけるアドレスは、例えば、LBAで示される。
 コンテンツ内の連続データは、複数データブロックに分かれてメディア領域において格納されている。ファイルストレージシステムは、当該複数データブロック(ブロック領域)のアドレス間におけるギャップ数に基づいて、デフラグが有効であるか判定する。アドレスが非連続である場合、それら間にギャップが存在する。以下では、メディア領域におけるデータ格納単位領域を単にブロックと呼ぶ。
 デフラグが有効であると判定した場合、ファイルストレージシステムは、上記複数データブロックを、メディア領域における連続アドレス領域(連続ブロックからなる領域)に書き出す。ギャップ数に基づき不要と判定したデフラグを省略することで、デフラグによる負荷の増大を低減する。
 一例において、ファイルストレージシステムは、予め指定されているコンテンツに対してのみ、ホスト参照要求時のオンラインデフラグを実行する。ファイルストレージシステムは、コンテンツへのホスト更新要求時に、当該コンテンツのデフラグが必要となるか否か判定する。必要と判定したコンテンツには、それを示すフラグを与える。
 ファイルストレージシステムは、ホスト参照要求時、上記フラグにより、対象コンテンツが、オンラインデフラグが必要であるか否かを判定する。フラグが、オンラインデフラグが必要であることを示す場合のみ、ファイルストレージシステムは、オンラインデフラグを実行する。これにより、不要なデフラグをさらに省略できる。
 一例において、ファイルストレージシステムは、ホスト更新要求において、オンラインデフラグを実行する。ホストから更新要求されているデータと、コンテンツ内で連続したデータがキャッシュされている時、ファイルストレージシステムは、更新要求データを含む連続データを、まとめてメディア領域における連続アドレス領域に書き出す。
 一例において、ファイルストレージシステムは、オンラインデフラグと共に、オフラインデフラグを実行する。オフラインデフラグは、ホスト要求と非同期のデフラグである。ファイルストレージシステムは、オフラインデフラグにおいて、オンラインデフラグでデフラグが完了しなかったコンテンツを選択し、デフラグを適用する。オンラインデフラグがコンテンツのランダムなデータ配置を減少させるため、オフラインデフラグの処理負荷が軽減し、システム入出力性能の低下が抑制できる。
 図1は本実施例の計算機システム及びファイルストレージシステムの処理の概要を模式的に示している。計算機システムは、ファイルストレージシステム100と、複数のホスト計算機14と、管理計算機15とを含む。これらはネットワーク2により接続されている。
 ホスト計算機14は、ファイルストレージシステム100のリソースにアクセスし、業務を行う計算機である。ネットワーク2は、ホスト計算機14とファイルストレージシステム100との間のユーザデータ及び管理計算機15と他の装置との間の管理データの通信用ネットワークであって、一例において、IPネットワークである。
 図1において、ファイルシステムは、ファイルストレージシステム100で構成されている。ファイルストレージシステム100はファイルシステムを含み、ホスト計算機14から、保持しているファイルへのアクセスを受け付ける。
 ファイルストレージシステム100のメモリ領域103は、デフラグ制御プログラム300を格納している。デフラグ制御プログラム300は、オンラインデフラグ処理モジュール301とオフラインデフラグ処理モジュール302とを含む。
 オンラインデフラグ処理モジュール301は、ホスト計算機14から参照要求を受信すると、当該参照要求の参照先コンテンツのコンテンツ管理テーブル200を参照し、デフラグ実行フラグ202が有効に設定されているか否かチェックする。コンテンツ管理テーブル200は、一つのコンテンツについての管理情報を保持している。
 デフラグ実行フラグ202が有効に設定されている場合、オンラインデフラグ処理モジュール301は、オンラインデフラグを実行する。これにより、無用なオンラインデフラグのための処理を避けることができる。具体的には、オンラインデフラグ処理モジュール301は、参照要求データに加え、コンテンツ内で参照要求データに連続するデータ(論理的に連続したデータ)を、メディア領域104から読み出す。メディア領域104から読み出すデータブロック数Kは、2以上の整数である。Kは一定値又は可変値である。
 図1の例において、参照データはコンテンツB内のB1であり、メディア領域104から読み出すデータブロック数Kは3である。コンテンツBはデータブロックB0、B1、B2、B3で構成され、コンテンツB内において、データブロックB0、B1、B2、B3は、この順序で連続配置されている。つまり、データブロックB0、B1、B2、B3のオフセットは連続している。メディア領域104は、コンテンツBのデータを格納し、最新データのデータブロックが太線で示されている。
 データB1に対する参照要求に対して、メディア領域104から、ブロック141、143、145のデータが読み出される。ブロック141、143、145は、それぞれ、データブロックB0、B1、B2を格納している。コンテンツ内の論理的に連続したデータの選択方法は、設計に依存する。例えば、オンラインデフラグ処理モジュール301は、参照データの前のデータのみ選択してもよく、参照データの後のデータのみ選択してもよく、前後双方のデータを選択してもよい。
 オンラインデフラグ処理モジュール301は、データを読み出したデータブロックのメディア領域104におけるアドレス(物理的データ配置)におけるギャップ数をカウントする。図1の例において、オンラインデフラグ処理モジュール301は、コンテンツ内オフセットとメディア領域内アドレスとを対応付けるアドレスマッピングテーブル260を参照し、コンテンツ内のオフセットからメディア領域104におけるアドレスを同定することができる。オンラインデフラグ処理モジュール301は、参照要求時デフラグ判定テーブル220を参照し、当該カウント数においてデフラグが有効か否か判定する。
 デフラグが有効であると判定すると、オンラインデフラグ処理モジュール301は、メディア領域104の連続アドレス領域(物理的な連続ブロック)に、データを書き出す。これにより、論理的に連続したデータを、物理的に連続したデータブロックで構成する。
 図1の例において、ブロック141、143、145(データブロックB0、B1、B2)のギャップ数は2である。ブロック141とブロック143との間にギャップ142が存在し、ブロック143とブロック145との間にギャップ144が存在する。
 本例において、参照要求時デフラグ判定テーブル220は、デフラグが有効であると示している。オンラインデフラグ処理モジュール301は、データB0、B1、B3を、メディア領域104で連続するブロック146~147に書き出す。コンテンツBのギャップ数は、2から1に減少している。
 ギャップ数のカウント及びデフラグが有効であるか否かの判定は、データをメディア領域104から読み出す前に行っても良い。デフラグが無効と判定した場合、オンラインデフラグ処理モジュール301はメディア領域104から参照データのみを読み出し、他の連続周辺データを読み出さなくてもよい。
 次に、ホスト計算機14からの更新要求に応じたオンラインデフラグを説明する。オンラインデフラグ処理モジュール301は、更新要求を受信すると、更新データに論理的に連続するデータがキャッシュされている場合に、更新データとキャッシュデータを共に、物理的に連続した領域に書き出す。
 図1の例において、ホスト更新要求はコンテンツDに対し、更新データD1*を上書きすることを示す。コンテンツDは、データブロックD0、D1、D2、D3で構成され、コンテンツB内において、データブロックD0、D1、D2、D3は、この順序で連続配置されている。ホスト更新要求は、データブロックD0を、データブロックD1*で上書きすることを指示する。メディア領域104は、コンテンツDのデータを格納し、最新データのデータブロックが太線で示されている。
 オンラインデフラグ処理モジュール301は、データブロックD1*によるホスト更新要求を受信すると、キャッシュ管理テーブル240を参照して、データブロックD1*に論理的に連続するデータがキャッシュされているか判定する。図1の例において、データブロックD1*に論理的に連続するデータブロックD0、D2がキャッシュされている。オフラインデフラグ処理モジュール302は、データブロックD0、D1*、D2をメディア領域104の連続するブロック171~173に書き出す。コンテンツDのギャップ数は、2から1に減少している。
 オンラインデフラグ処理モジュール301は、さらに、更新後のコンテンツDがフラグメントし、デフラグが必要かどうかの判定を、更新要求時デフラグ判定テーブル230に基づいて行う。デフラグが必要と判定した場合、オフラインデフラグ処理モジュール302は、コンテンツDのコンテンツ管理テーブル200に、デフラグ実行フラグ202を有効に設定する。
 次に、オフラインデフラグを説明する。オフラインデフラグ処理モジュール302は、オフラインデフラグ管理テーブル210を参照し、高速実行フラグ212が有効に設定されているか調べる。高速実行フラグ212が有効に設定されていない場合、オフラインデフラグ処理モジュール302は、メディア領域104内の全てのコンテンツについて、オフラインデフラグを実行する。
 高速実行フラグ212が設定されている場合、オフラインデフラグ処理モジュール302は、コンテンツ管理テーブル200にデフラグ実行フラグ202が設定されているコンテンツを選択し、選択したコンテンツについてのみオフラインデフラグを実行する。
 本構成により、オンラインデフラグ処理にて読み出したデータの物理的な配置を連続に書き換えるため、読み出し性能を向上させることができる。更に、オンラインデフラグで物理的なデータ配置が連続となったデータが増えることにより、オフラインデフラグ処理の負荷が軽減する。
 データブロックのギャップ数に基づいてオンラインデフラグの実行有無を判定することで、デフラグの効果が小さい又はデフラグの効果がないオンラインデフラグ処理を省略し、オンラインデフラグ処理のホストI/O要求の処理性能への影響を低減できる。
 図2Aは、本実施例にかかるファイルストレージ装置10の構成例を示す。ファイルストレージシステム100は、ファイルストレージ装置10で構成されている。ファイルストレージ装置10は、管理計算機15、複数のホスト計算機14に、ネットワーク2を介して接続されている。ネットワーク2は、例えばWAN(Wide Area Network)、LAN(Local Area Network)、インターネット、公衆回線または専用回線などであってよい。
 ファイルストレージ装置10は、プロセッサ102、メモリ107、記憶デバイス106及びネットワークインタフェース105を含む。これらは、システムバス108を介して接続されている。
 プロセッサ102は、メモリ107に格納されているプログラムに従って、メモリ領域103に格納されている情報を使用して動作することで、ファイルストレージ装置10の様々な機能部として動作する。例えば、プロセッサ102は、デフラグ制御部及び空きブロック管理部として動作する。
 メモリ107は、プログラム群350及び管理情報250を格納している。プログラム群350は、デフラグ制御プログラム300、空きブロック管理プログラム310を含む。管理情報250は、プログラム群350が使用する情報を含む。管理情報250は、コンテンツ管理テーブル200、オフラインデフラグ管理テーブル210、参照要求時デフラグ判定テーブル220、更新要求時デフラグ判定テーブル230、キャッシュ管理テーブル240、アドレスマッピングテーブル260を含む。
 さらに、メモリ107は、ファイルトレージ装置10が動作するための情報を格納するために用いられるほか、ホスト計算機14のユーザデータを一時的に格納するキャッシュメモリとして、さらに、プロセッサ102のワークメモリとして用いられる。メモリ107は、図1におけるメモリ領域103を提供する。メモリ107には、DRAM等の揮発性半導体メモリまたはフラッシュメモリ等の不揮発性半導体メモリが使用され、メディア領域104よりも高速データアクセスが可能である。
 説明の便宜上、プログラム群350及び管理情報250はメモリ領域103内に示されているが、典型的には、プログラム群350及び管理情報250は、記憶デバイス106からロードされる。
 記憶デバイス106は、所定の機能を実現するために必要なプログラム、管理情報、メタデータを格納する他、本例において、ホスト計算機14のユーザデータを格納する。記憶デバイス106は、メディア領域104を提供する。例えば、記憶デバイス106は、不揮発性の非一時的記憶媒体を備える記憶デバイスであり、ネットワークを介して接続されてもよい。
 デフラグ制御プログラム300は、上述のように、ホストI/O要求時にデフラグを実行するオンラインデフラグ処理モジュール301と、ホストI/O要求と非同期にデフラグを実行するオフラインデフラグ処理モジュール302を含む。
 空きブロック管理プログラム310は、ユーザデータを格納するメディア領域104(記憶デバイス106)のデータ格納単位であるブロックの使用/未使用を管理する。空きブロック管理プログラム310は、空きブロックのメディア領域内アドレスを示す空きブロック管理情報を保持し、メディア領域104におけるデータ更新に応じて当該管理情報を更新する。
 デフラグ制御プログラム300は、空きブロック管理プログラム310と連携して、メディア領域から読み出したコンテンツデータの物理連続領域の書き出し先を決定する。空きブロック管理プログラム310は、デフラグ適用後、コンテンツデータが格納されていたブロックを空きブロックとして管理する。
 図2Bは、ファイルストレージシステム100の他の構成例を示す。本例において、ファイルストレージシステム100は、ファイルサーバ11とブロックストレージ装置12から構成される。図2Aの構成における記憶デバイス106以外の構成要素が、ファイルサーバ11に含まれている。ブロックストレージ装置12が、記憶デバイス106に対応する。
 ネットワーク4は、ファイルサーバ11とブロックストレージ装置12を相互に接続するネットワークであり、例えば、SAN(Storage Area Network)である。ファイルサーバ11は、ストレージインタフェース119を介してネットワーク4に接続し、ブロックストレージ装置12は、ストレージインタフェース129を介して、ネットワーク4に接続する。ファイルサーバ11及びブロックストレージ装置12は、ユーザデータの更新及び参照のため、ネットワーク4を介して、コマンド及びユーザデータの送受信を行う。
 ブロックストレージ装置12は、ファイルサーバ11に対して、ユーザデータの保存先と、ブロック単位でのデータへのアクセスI/Fとを提供する。ブロックストレージ装置12は、ファイルサーバ11との通信に使用するストレージI/F129、メモリ123に格納されたプログラムを実行するプロセッサ122、データを保存する記憶デバイス124及びプログラムやデータを格納するメモリ123を搭載し、それらを内部的な通信路(例えば、バス)128によって接続している。
 ファイルサーバ11は、プロセッサ112、メモリ113、ネットワークインタフェース115及びストレージインタフェース119を含み、これらはシステムバス118で接続されている。プロセッサ112、メモリ113、ネットワークインタフェース115は、ファイルストレージ装置10における対応要素と同様である。メモリ113は、プログラム群350及び管理情報250を格納している。
 図1に示すように、ファイルストレージシステム100は、コンテンツ管理テーブル200を含む。コンテンツ管理テーブル200は、コンテンツ毎に作成される。コンテンツ管理テーブル200は、不図示の従来の管理情報に加え、デフラグ実行フラグ202を含む。従来の管理情報は、例えば、inodeを構成する情報であり、コンテンツの長さ、コンテンツ所有ユーザ、コンテンツの更新、等に関する情報を含む。
 コンテンツにデフラグが必要な場合、デフラグ実行フラグ202は有効に設定され、コンテンツにデフラグが不要な場合、デフラグ実行フラグ202は無効に設定される。コンテンツを構成するデータが、メディア領域104において連続したアドレス領域に格納されている場合、デフラグ実行フラグ202は無効に設定される。
 本実施例では、オンラインデフラグ処理モジュール301は、ホスト更新要求の処理において、更新要求時デフラグ判定テーブル230に基づき、当該コンテンツのデフラグが必要であるか否かを判定する。デフラグが必要であると判定した場合、オンラインデフラグ処理モジュール301は、当該コンテンツのデフラグ実行フラグ202を有効に設定する。
 さらに、ホスト参照要求時デフラグ判定テーブル220の判定結果又はオフラインデフラグの適用により、コンテンツを構成するデータが物理的に連続な領域に配置されたと判定した場合、オンラインデフラグ処理モジュール301は、デフラグ実行フラグ202を無効に設定する。
 オフラインデフラグ管理テーブル210は、高速実行フラグ212から構成される。高速実行フラグ212は、管理計算機15から設定される値である。高速実行フラグ212が有効な時、オフラインデフラグを適用するコンテンツを、デフラグ実行フラグ202が有効なコンテンツに制限し、高速なデフラグを実行する。
 高速実行フラグ212が無効な時、全てのコンテンツにデフラグを適用し、全てのコンテンツで最適なデータ配置を実現する。これらの制御をシステム管理者が管理計算機15を介して設定する。
 図3は、ホスト参照要求時デフラグ判定テーブル220の構成例を示す。ホスト参照要求時デフラグ判定テーブル220は、メディア領域から読み出した論理的に連続するK個のデータブロックがコンテンツ内に占める範囲の種別を示すカラム222、K個のデータブロックのギャップ数を示すカラム223、デフラグ実行判定結果を示すカラム224を有する。
 このように、ホスト参照要求時デフラグ判定テーブル220は、K個のデータブロックがコンテンツ内に占める範囲の種別及びK個のデータブロックのギャップ数の組合せと、デフラグ実行判定結果と、の関係を示す。
 コンテンツ内に占める範囲の種別は、コンテンツ全体、コンテンツの先頭データを含むコンテンツの一部、コンテンツの終端データを含むコンテンツの一部、中間データのみからなるコンテンツの一部、である。中間データのみからなるコンテンツの一部は、先頭データ及び終端データ以外のデータで構成されている。
 コンテンツ内に占める範囲とギャップ数との関係から、デフラグ実行判定を行うことで、デフラグ効果についてより適切な判定を行うことができる。図3の例は、コンテンツ内に占める範囲とギャップ数との関係からデフラグ効果がない可能性がある場合には、デフラグ判定結果無効となっている。なお、参照要求時でのオンラインデフラグ実行判定結果は、コンテンツ内でデータブロックが占める範囲によらず、ギャップ数のみから決定されてもよい。
 図4は、更新要求時デフラグ判定テーブル230の構成例を示す。更新要求時デフラグ判定テーブル230は、ホスト更新要求の種類を示すカラム232、メディア領域104における連続ブロック割当可否を示すカラム233、デフラグが必要か否かの判定結果を示すカラム234を有する。
 ここでは、Log-structured File System(LFS)を採用するファイルシステムを搭載したファイルストレージシステムにおける、デフラグ発生の判定方法を説明する。なお、本実例のデフラグ発生の判定方法はLFSに限定されることなく、他のファイルシステムを搭載したファイルストレージシステムに対しても適宜変更して適用できる。
 LFSは、コンテンツのユーザデータ及び管理情報の双方の更新をトラキングし、更新データをファイルシステムのログ部分に記録する。ログされる更新時点をチェックポイントと呼ぶ。LFSは、過去のチェックポイントから選択した一部又は全部のチェックポイントの更新データを、スナップショットとして保存することで、ファイルシステムのスナップショットを自動かつ連続的に生成することができる。
 LFSは、ファイルを更新する時、ファイルの更新箇所に対応するメディア領域104上のブロックのデータに、更新データを上書きせずに、更新データをメディア領域104上の別のブロックに書き込む。これにより、任意チェックポイントのデータを復元することができる。メモリ領域103上では、ファイルの更新箇所に対応するブロックのデータは、更新データで上書きされる。
 LFSの上記動作により、ホスト更新要求が既存コンテンツ内のデータの上書処理である時、該当コンテンツにおいてフラグメンテーションが発生し、デフラグが必要である。ホスト更新要求が、新規コンテンツの追加要求又は既存コンテンツへのデータ追加要求である時、既存データと新規追加データを含む全てのデータをメディア領域104内の連続ブロックへ格納することができない時、フラグメンテーションが発生し、デフラグが必要である。全てのデータをメディア領域104内の連続ブロックへの格納できる場合、デフラグが不要である。
 最後に、ホスト更新要求がデータの削除要求である時、デフラグは発生しない。これらの判定結果から、コンテンツ管理テーブル200のデフラグ実行フラグ202を有効にするかどうかを判断する。
 なお、同一ブロックに更新データを上書きするファイルシステムにおいて、ホスト更新要求がデータの削除要求である時デフラグが発生し、データの上書処理である時デフラグは発生しない。データの追加についてはLFSと同様である。
 図5は、ホスト参照要求時のデフラグ方法の概要を示す。コンテンツC(400)が、データブロックC0、C1、C2、C3、C4、C5、C6、C7から構成されている。コンテンツCのコンテンツ管理テーブル410のデフラグ実行フラグ412は有効である。データブロックC0、C1、C2、C3、C4、C5、C6、C7は、メディア領域104に格納されている。図5において、メディア領域104の太線のデータブロックが、コンテンツCの最新のデータを示す。
 図5の例において、データブロックC1の参照要求が発行されている。例えば、メモリ領域103にデータブロックC1がキャッシュされていない場合、データブロックC1が、メディア領域104から読み出される必要がある。キャッシュ管理テーブル240は、データブロックC1がキャッシュされているか否かを示す。
 オンラインデフラグ処理モジュール301は、デフラグ実行フラグ412が有効であるため、参照要求データブロックC1を含む、論理的な連続データブロックC0、C1、C2をメディア領域104のブロック401~403から読み出す。ここでは、コンテンツにおけるデータブロックC1の論理的連続周辺データブロックとして、データブロックC1の前後のデータブロックC0、C2が選択されている。オンラインデフラグ処理モジュール301は、OSが提供する機能を使用して、メディア領域104からデータを読み出す。
 これと異なり、データブロックC1の前のデータブロックのみ又はデータブロックC1の後の連続データブロックのみを選択してもよい。データブロックC1の前のデータブロック数と後のデータブロック数とが異なっていてもよい。また、本例において、選択されるデータブロック数Kは、3であるが、それ以外の数値でもよい。
 次に、オンラインデフラグ処理モジュール301が、メディア領域104におけるデータブロックC0、C1、C2(ブロック401~403)のギャップ数をカウントする。オンラインデフラグ処理モジュール301は、アドレスマッピングテーブル260を参照して、データブロックC0、C1、C2のコンテンツ内オフセットに対応するメディア領域内アドレスを知ることができる。オンラインデフラグ処理モジュール301は、データブロックC0、C1、C2のメディア領域内アドレスにより、ギャップ数をカウントする。なお、ギャップ数のカウントは、データブロックC0、C1、C2の読み出し前に実行されてもよい。
 図5の例を参照すると、メディア領域104において、データブロックC0(ブロック401)とデータブロックC1(ブロック402)と間にギャップ404が存在し、データブロックC1(ブロック402)とデータブロックC2(ブロック403)と間にギャップ405が存在する。
 したがって、メディア領域104におけるデータブロックC0(ブロック401)、データブロックC1(ブロック402)、データブロックC2(ブロック403)のギャップ数は、2である。
 オンラインデフラグ処理モジュール301は、ホスト参照要求時デフラグ判定テーブル220を参照し、データブロックC0、C1、C2を使用してデフラグを行うか否か判定する。オンラインデフラグ処理モジュール301は、データブロックC0、C1、C2がコンテンツC(400)で占める範囲と、それらのギャップ数とから、デフラグ実行の有無を決定する。
 データブロックC0は、コンテンツC(400)の先頭データである。したがって、データブロックC0、C1、C2は、コンテンツC(400)の先頭データを含み、コンテンツC(400)の一部である。なお、データブロックのコンテンツ内の位置は、そのオフセットにより示されている。
 ホスト参照要求時デフラグ判定テーブル220は、データブロックがコンテンツ内で占める範囲が「コンテンツの先頭データを含むコンテンツの一部」であって、そのギャップ数が「2」である場合、デフラグ実行判定が「有効」であることを示す。したがって、オンラインデフラグ処理モジュール301は、データブロックC0、C1、C2を物理的連続領域に書き出すことで、デフラグを行うと判定する。
 オンラインデフラグ処理モジュール301は、キャッシュ管理テーブル240において、これらデータブロック(の格納ページ)のキャッシュ状態をダーティに設定する。なお、ダーディ状態を示すキャッシュ状態に代えて/加えて、デフラグ用の処理を示す特別な書き出し専用ビットを用意してもよい。
 その後、データブロックC0、C1、C2をメディア領域104に書き出すファイルシステムプログラムが、書き出し時に、書き出し先新規アドレス領域を空きブロック管理プログラム310から取得し、データブロックC0、C1、C2を、メディア領域104内の新規アドレス領域に書き出す。
 新規アドレス領域は、連続した空きブロックであり、メディア領域104に書き出すファイルステムプログラムは,空きブロック管理プログラム310から、空きブロックの情報を得ることができる。図5の例において、データブロックC0、C1、C2は、それぞれ、連続したブロック401*、402*、403*に書き出される。
 なお、メディア領域104に書き出すファイルシステムプログラムに代わり,オンラインデフラグ処理モジュール301が,書き出し時に、書き出し先アドレスを空きブロック管理プログラム310から取得し、キャッシュ管理テーブル240に設定してもよい。この時,メディア領域104に書き出すファイルシステムプログラムは,キャッシュ管理テーブル240に設定した書き出し先アドレスに、データブロックを書き出す。
 空きブロック管理プログラム310は、オフラインデフラグ処理モジュール302の処理結果を得て、ブロック401、402、403を空きブロックとして、ブロック401*、402*、403*、非空き領域として管理する。
 次に、データブロックC5の参照要求に対する処理を説明する。データブロックC1と同様に、メモリ領域103上にデータブロックC5がキャッシュされていない場合、データブロックC5は、メディア領域104から読み出される必要がある。
 オンラインデフラグ処理モジュール301は、参照データブロックC5に加え、その周辺連続データブロックをメディア領域104から読み出す。本例は、参照データブロックC5の前後一つずつのデータブロックC4、C6をメディア領域104から読み出す。
 データブロックC4、C5、C6は、メディア領域104において、ブロック406~408に格納されている。メディア領域104において、データブロックC4(ブロック406)とデータブロックC5(ブロック407)と間にギャップ409が存在する。
 したがって、メディア領域104におけるデータブロックC4(ブロック406)、データブロックC5(ブロック407)、データブロックC6(ブロック408)のギャップ数は、1である。さらに、データブロックC4、C5、C6は、コンテンツC(400)の一部であって、中間データのみからなる。
 ホスト参照要求時デフラグ判定テーブル220は、データブロックがコンテンツ内で占める範囲が「中間データのみからなるコンテンツの一部」であって、そのギャップ数が「1」である場合、デフラグ実行判定が「無効」であることを示す。したがって、オンラインデフラグ処理モジュール301は、キャッシュ管理テーブル240をデータブロックC4、C5、C6のキャッシュ状態をダーティに設定することなく処理を終了する。データブロックC4、C5、C6は、メディア領域104に書き出されない。
 なお、ギャップ数のカウントは、データブロックC4、C5、C6の読み出し前に実行されてもよい。本例のようにデフラグが不要と判定される場合、参照データの周辺連続データを読み出さなくてもよい。
 以上のように、オンラインデフラグ処理モジュール301は、デフラグが有効な時だけデフラグを実行し、コンテンツを構成するデータがメディア領域104において連続するように配置する。
 図6は、ホスト参照要求時デフラグ処理のフローチャートである。不図示のファイルシステムプログラムは、ホスト計算機14からの参照要求又はシステム内部の処理による参照要求を受け付ける(S101)。要求処理モジュールは、キャッシュ管理テーブル240を参照し、メディア領域104から参照データを読み出す必要があるか判定する(S102)。
 メモリ領域103上にデータがキャッシュされており、メディア領域104から参照データを読み出す必要がない場合(S102:NO)、要求処理モジュールは、メモリ領域103上のキャッシュデータを、要求元に応答する(S110)。キャッシュヒット時のオンラインデフラグを省略することで、オンラインデフラグの負荷を低減する。
 メディア領域104から参照データを読み出す必要がある場合(S102:YES)、オンラインデフラグ処理モジュール301は、参照先コンテンツのコンテンツ管理テーブル200を参照し、デフラグ実行フラグ202が有効か否か判定する(S103)。
 デフラグ実行フラグ202が無効である場合(S103:NO)、オンラインデフラグ処理モジュール301は、OS内のメディア領域I/Oモジュールを使用して、参照要求データをメディア領域104から読み出し、メモリ領域103に格納する(S105)。要求処理モジュールは、メモリ領域103に書き出された参照データを、要求元へ応答する(S110)。
 デフラグ実行フラグ202が有効である場合(S103:YES)、オンラインデフラグ処理モジュール301は、読み出したKデータブロックのメディア領域104におけるアドレス情報(物理的位置関係の情報)をアドレスマッピングテーブル260から取得する(S104)。
 オンラインデフラグ処理モジュール301は、Kデータブロックのオンラインデフラグを実行すべきか判定する(S106)。オンラインデフラグ処理モジュール301は、Kデータブロックがコンテンツ内に占める位置を特定し、さらに、それらのギャップ数をカウントする。オンラインデフラグ処理モジュール301は、Kデータブロックのコンテンツ内オフセット値及びメディア領域104内アドレスから、それらのコンテンツ内に占める位置及びギャップ数を特定する。なお、オンラインデフラグ処理モジュール301は、判定S106を、Kデータブロックを読み出した後に行ってもよい。
 オンラインデフラグ処理モジュール301は、メディア領域I/Oモジュールを使用して、要求データブロックを含む論理的に連続なKデータブロックを、メディア領域104から読み出す(S111)。
 オンラインデフラグ処理モジュール301は、ホスト参照要求時デフラグ判定テーブル220を参照し、上記コンテンツ内に占める位置及びギャップ数の組が対応するデフラグ実行判定結果カラム204の値を取得する。デフラグ実行判定結果が無効の場合(S106:NO)、オンラインデフラグ処理モジュール301は、メディア領域104から読み出した参照データを、ホスト計算機14へ返して、処理を終了する。
 デフラグ実行判定結果が有効の場合(S106:YES)、オンラインデフラグ処理モジュール301は、オンラインデフラグを実行する。具体的には、オンラインデフラグ処理モジュール301は、メモリ領域103に読み出したKブロックのデータが、それらの次の書き出し時に物理的に連続したブロック書き出すように処理する。
 例えば、オンラインデフラグ処理モジュール301は、Kブロックデータのキャッシュ状態をダーティに設定する。メディア領域I/Oモジュールは、これらのダーティページを空きブロック管理プログラム310から新規アドレス領域を取得し、ダーティ状態のKブロックデータを指定された連続ブロックに書き出す。
 Kブロックデータの書き出し先は、オンラインデフラグ処理モジュール301が決定してもよい。ダーディ状態を示すキャッシュ状態に代えて/加えて、デフラグ用の処理を示す特別な書き出し専用ビットを用意してもよい。連続ブロックに書き出すデータブロックの数に、最大値mが定義されていてもよい。Kが最大値mより大きい場合、Kデータブロックから選択されたm連続データブロックが、連続アドレスに書き出される。ブロックデータの書き出しについては、他のフローチャートにおいて同様である。
 オンラインデフラグ処理モジュール301は、アドレスマッピングテーブル260を更新する。さらに、オンラインデフラグ処理モジュール301は、上記デフラグ後、コンテンツ全体(コンテンツの全データブロック)が、メディア領域104の連続アドレスブロック(物理連続ブロック)に配置されているか、アドレスマッピングテーブル260を参照して判定する(S108)。
 コンテンツが物理連続ブロックへ配置されている場合(S108:YES)、オンラインデフラグ処理モジュール301は、当該コンテンツのデフラグ実行フラグ202を無効に設定し(S109)、メモリ領域103上に読み出した参照データをホスト計算機14へ返し(S110)、処理を終了する。コンテンツが物理連続ブロックへ配置されていない場合(S108:NO)、ステップS109はスキップされる。
 図7は、ホスト更新要求時のデフラグ方法の概要を示す。ここでは、上書要求のホスト更新要求の例と、新規コンテンツ追加要求のホスト更新要求の例を説明する。上書き要求の対象コンテンツは、コンテンツD(420)である。コンテンツD(420)はデータブロックD0、D1、D2、D3から構成され、メディア領域104に格納されている。
 ホスト更新要求は、データブロックD1を、データブロックD1*で上書きすることを要求する。メモリ領域103は、ホスト計算機14から受信したにデータブロックD1*を格納している。ファイルシステムプログラムは、キャッシュ管理テーブル240において、データブロックD1(の格納ページ)のキャッシュ状態をダーティにする。
 オンラインデフラグ処理モジュール301は、デフラグが必要であるかを判定するために、更新要求時デフラグ判定テーブル230を参照する。ここでのホスト更新要求は、上書き要求であり、更新要求時デフラグ判定テーブル230は、デフラグが必要であることを示す。オンラインデフラグ処理モジュール301は、コンテンツD管理テーブル430のデフラグ実行フラグ332を有効にする。
 データブロックD1*の論理的に連続な周辺データであるデータブロックD0とデータブロックD2とが、既にメモリ領域103上にキャッシュされている場合、オンラインデフラグ処理モジュール301は、データブロックD0、D1*、D2が、次のそれらの書き出し時に、連続ブロックに書き出されるように処理する。
 例えば、オンラインデフラグ処理モジュール301は、キャッシュ管理テーブル240においてそれらの(格納ページの)キャッシュ状態をダーティに設定する。メディア領域書き出しプログラムが、書き出し先アドレスとして空きブロック管理プログラム310から空き連続ブロックのアドレスを取得する。メディア領域I/Oモジュールは、それらを、指定された連続ブロックに書き出す。
 メディア領域I/Oモジュールの代わりに、オンラインデフラグ処理モジュール301が空きブロック管理プログラム310から空き連続ブロックのアドレスを取得してもよい。データブロックD0、D2に付与されるダーティ状態に代えて/加えて、デフラグ用の処理を示す特別な書き出し専用ビットを用意してもよい。
 データブロックD1*の論理的に連続な周辺データであるデータブロックD0又はデータブロックD2が、メモリ領域103上にキャッシュされていない場合、そのデータブロックはメディア領域104から読み出されることはない。既にキャッシュされている連続周辺データブロックのみが、データブロックD1*と共に書き出される。
 図7の例において、ホスト更新要求前、ブロック421、422、423、424は、データブロックD0、D1、D2、D3を格納している。デフラグ後、ブロック421*、422*、423*、424は、データブロックD0、D1*、D2、D3を格納している。空きブロック管理プログラム310では、デフラグ後、ブロック421、422、423を空きブロックとして管理する。
 次に、ホスト更新要求が追加要求である例の概要を、コンテンツE440を使用して説明する。コンテンツE440はデータブロックE0、E1、E2から構成される。コンテンツEを新規追加する場合、それぞれをメモリ領域103上にキャッシュし、それぞれダーティにする。
 ホスト更新要求はコンテンツ新規追加要求であり、論理的に連続した周辺データはファイルストレージシステム100内に存在しない。メディア領域I/Oモジュールは、それぞれを空きブロック管理プログラム310が割り当てた物理的に連続した領域へ書き出す。
 メディア領域104における連続した領域に書き出せない場合、オンラインデフラグ処理モジュール301は、コンテンツE管理テーブル450のデフラグ実行フラグを、有効に設定する。図7の例において、データブロックE0、E1、E2物理的に連続した領域へ書き出されており、デフラグ実行フラグ452は無効のままである。
 図8は、ホスト更新要求時デフラグ処理のフローチャートを示す。要求処理モジュールは、ホスト計算機14からの更新要求又はシステム内部の処理による更新要求を受け付ける(S201)。要求処理モジュールは、更新データをメモリ領域103においてキャッシュし、キャッシュ管理テーブル240において、それらデータブロック(の格納ページ)のキャッシュ状態をダーティに設定する(S202)。
 オンラインデフラグ処理モジュール301は、更新要求時デフラグ判定テーブル230を参照して、ホスト更新要求の種類に応じてデフラグが必要か否かを判定する(S203)。デフラグが不要と判定した場合(S203:NO)、オンラインデフラグ処理モジュール301は、ステップS205に進む。
 デフラグが必要と判定した場合(S203:YES)、オンラインデフラグ処理モジュール301は、当該コンテンツのコンテンツ管理テーブル200のデフラグ実行フラグ202を有効に設定する(S204)。
 オンラインデフラグ処理モジュール301は、キャッシュ管理テーブル240を参照して、更新要求データブロックに論理的に連続する既存データブロック(更新要求データ以外のデータブロック)が、メモリ領域103上に存在するかチェックする(S205)。
 論理的に連続な周辺データがメモリ領域103上に存在しない場合(S205:NO)、ステップS207はスキップされる。論理的に連続な周辺データがメモリ領域103上に存在する場合(S205:YES)、オンラインデフラグ処理モジュール301は、キャッシュ管理テーブル240において、周辺データ(の格納ページ)のキャッシュ状態をダーティに設定する(S207)。
 メディア領域I/Oモジュールは、ダーティデータを、空きブロック管理プログラム310が割り当てた、メディア領域104内の空きブロックへ書き出す(S208)。上述のように、オンラインデフラグ処理モジュール301及びメディア領域I/Oモジュールのいずれが、更新要求データ及び周辺データの書き出し先空きブロックのアドレス情報を取得してもよい。
 オンラインデフラグ処理モジュール301は、ホスト更新要求データを含みメディア領域104に書き出されたデータが、連続したブロック(連続物理領域)に割り当てられたか否かを、マッピングテーブル270を参照して判定する(S209)。
 データが連続したブロックに割り当てられていない場合(S209:NO)、オンラインデフラグ処理モジュール301は、コンテンツ管理テーブル200のデフラグ実行フラグ202を有効に設定して(S210)、処理を終了する。
 データが連続したブロックに割り当てられている場合(S209:YES)、オンラインデフラグ処理モジュール301は、コンテンツ全体が連続したブロックに割り当てられているかマッピングテーブル270を参照して判定する(S211)。
 コンテンツ全体が連続したブロックに割り当てられている場合には(S211:YES)、オンラインデフラグ処理モジュール301は、デフラグ実行フラグ202を無効に設定して(S212)、処理を終了する。コンテンツ全体が連続したブロックに割り当てられていない場合には(S211:NO)、ステップS212はスキップされる。
 図9は、オフラインデフラグ処理のフローチャートを示す。オフラインデフラグ処理モジュール302は、コンテンツ管理テーブル200から、メディア領域104に格納されているコンテンツのリストを生成する(S301)。オフラインデフラグ処理モジュール302は、コンテンツを選択し(S302)、オフラインデフラグ管理テーブル210の高速実行フラグ212が有効に設定されているか判定する(S303)。高速実行フラグ212は、管理者により管理計算機15から設定され得る。
 高速実行フラグ212が有効である場合(S303:YES)、オフラインデフラグ処理モジュール302は、コンテンツ管理テーブル200のデフラグ実行フラグ202が有効か判定する(S304)。高速実行フラグ212が無効である場合(S303:NO)、ステップS304はスキップされる。
 デフラグ実行フラグ202が無効である場合(S304:NO)、オフラインデフラグ処理モジュール302は、ステップS308に進む。デフラグ実行フラグ202が有効である場合、オフラインデフラグ処理モジュール302は、当該コンテンツのデフラグを実行する(S305)。
 オフラインデフラグ処理モジュール302は、デフラグ後、マッピングテーブル270を参照して、コンテンツ全体が連続したブロックへ配置できたかを判定する(S306)。コンテンツ全体が連続したブロックへ配置されている場合(S306:YES)、オフラインデフラグ処理モジュール302は、該当コンテンツのデフラグ実行フラグ202を無効に設定する(S307)。コンテンツ全体が連続したブロックへ配置されていない場合(S306:NO)、ステップS307はスキップされる。
 ステップS308において、オフラインデフラグ処理モジュール302は、次のコンテンツが存在するか判定する。次のコンテンツが存在する場合(S308:YES)、オフラインデフラグ処理モジュール302は、ステップS202へ戻る。次のコンテンツが存在しない場合には(S308:NO)、オフラインデフラグ処理モジュール302は、オフラインデフラグを終了する。
 なお、ストレージシステム100は、オフラインデフラグ及び/又は更新要求時のオンラインデフラを実行しなくてもよい。ストレージシステム100は、デフラグ実行フラグを参照することなく、全コンテンツのオフラインデフラグを実行してもよい。ストレージシステム100は、参照要求におけるキャッシュヒット時にも、オンラインデフラグを実行してもよい。デフラグ実行フラグを使用しなくてもよい。
 本実施例は、キャッシュ拡張装置と連携したデフラグ方法を説明する。図10に示すようにファイルストレージ装置10及びサーバ11に対して、キャッシュ拡張装置18を接続し、メモリ領域103の拡張を行うことができる。キャッシュ拡張装置18により与えられるキャッシュ拡張領域は、フラッシュメモリに代表されるNon Volatile Memory(NVM)などの記憶媒体で構成されてよい。また、キャッシュ拡張領域は、メモリ領域のデータを一時的に格納するスワップ領域として使用されてもよいし、そのままメモリ領域として使用されてもよい。
 キャッシュ拡張領域が通常のメモリ領域と同様に扱われる場合には、実施例1との変更部分は無いため説明を省略する。以下において、キャッシュ拡張領域が2次キャッシュ領域又はスワップ領域として使用される場合について説明する。
 図10において、コンテンツBは、データブロックB0、B1、B2、B3で構成されている。データブロックB0、B1、B2、B3は、メディア領域104において、非連続のブロックに格納されている。ホスト参照要求は、データブロックB1の参照を要求している。
 オンラインデフラグ処理モジュール301は、データブロックB1と共に、データブロックB0及びB2を読み出す。メモリ領域103は有限であるため、全てのデータをメモリ上に保持することはできない。この時、OSのページ回収処理モジュールがメモリ逼迫すると動作する。例えば、論理的に連続なデータブロックB0、B1、B2のどれかが回収対象となった場合、その連続性を保ったまま、キャッシュ拡張装置18内で連続するように配置する。これによりキャッシュ拡張装置からデータブロックB0、B1、B2を読み出す性能が向上する。
 また、デフラグ実行時、デフラグ制御プログラム300は、キャッシュ拡張領域に格納されているデータをメディア領域104から読み出さずに、メディア領域104内の連続アドレスに書き出す。これにより、メディア領域104から読み出すI/Oが不必要になり、デフラグ性能が向上する。
 キャッシュ拡張領域に格納されているデータは、メモリ領域103に格納されているデータと同様に扱われる。OSで管理されるメモリ管理情報にデータの格納先が記されるだけである。そのため、実施例1で述べたオンラインデフラグ処理及びオフラインデフラグ処理に変更はない。
 ここで、ページ回収処理について説明する。ページは、メモリ領域103におけるデータ格納単位である。図11は、本実施例におけるメモリ領域103上のページ回収処理を示す。ページ回収処理モジュールは、ページの参照頻度を管理するメモリ管理情報を参照し、参照頻度の低いページを選択する(S401)。ページ回収処理モジュールは、選択ページが指すコンテンツ管理テーブル200において、デフラグ実行フラグ202が有効か判定する(S402)。
 デフラグ実行フラグ202が無効な場合(S402:NO)、ページ回収処理部は、選択ページの回収処理を行う(S403)。デフラグ実行フラグ202が有効な場合(S402:YES)、ページ回収処理部は、選択ページ周辺の論理的に連続なデータがメモリ上に存在するか判定する(S404)。
 論理的に連続なデータが存在しない場合(S404:NO)、ページ回収処理部は、選択ページを、2次キャッシュ領域又はスワップ領域への移動対象と決定する(S405)。論理的に連続なデータが存在する場合(S404:YES)、ページ回収処理部は、選択ページを含む連続データのページを、移動対象と決定する(S406)。
 ページ回収処理部は、移動対象ページのデータを移動し、移動前のページを回収する(S407)。ページ回収処理部は、メモリ管理情報を、メモリ管理情報が移動されたデータに参照先としてページの移動先を参照するように変更し(S408)、処理を終了する。以上の処理により、移動されたページデータのアクセス性能を向上できる。
 デフラグ処理の高速化を行うには、物理的に連続した領域にデータを高速に書き込む必要がある。特に、フラッシュメモリを使用する場合、一度書き込んだデータ領域への上書きは性能が低い。
 ストレージプールを作成して実使用分のみ記憶デバイスの物理領域を割り当てる場合、デフラグによりデータが移動される領域は、空きブロック管理プログラム310上では空き領域であるが、ストレージプールにおける解放処理が行われていない場合、ストレージプール上では使用領域である。つまり、デフラグを適用することにより、ストレージプールの使用領域が増加し、物理記憶領域の使用効率が劣化する。本実施例は、これらを解決する。
 以下においては、LFSを採用するファイルシステムを搭載したファイルストレージシステムの例を説明する。以下に説明する方法は、LFSに限定されることなく、LFSを採用しないファイルシステムを搭載したストレージシステムにおいて、既に使用されていないブロックの解放(Trim処理)に使用できる。
 LFSは、ファイルシステムのスナップショットを自動かつ連続的に生成する。LFSは、コンテンツを更新する際、コンテンツの更新箇所に対応する、メディア領域104上のブロックのデータを上書きせずに、更新データをメディア領域104上の別のブロックに書き込む。これにより、過去の任意の時点のデータを復元することができる。メモリ領域103上では、コンテンツの更新箇所に対応するブロックのデータは上書きされる。この任意の時点をチェックポイントと呼ぶ。
 図11は、実施例3の概要を示す。実施例1の構成に、維持チェックポイント数管理テーブル500と解放ブロックリスト510が追加されている。管理者は、維持チェックポイント数管理テーブル500は、維持チェックポイント数502を、管理計算機15から設定することができる。
 維持チェックポイント数管理テーブル500において、維持チェックポイント数502は、現在処理している最新のチェックポイントからどれだけ過去のチェックポイントを維持するかを示す。維持チェックポイント数502は、スナップショットを含まない。一部のチェックポイントのデータは、スナップショットとして保存される。スナップショットとして選択されるチェックポイントは、管理計算機15から指定され得る。
 最新のチェックポイントから、スナップショットを除いた維持チェックポイント数まで、データが維持される。より過去のチェックポイントのデータを格納するブロックは、後述するように解放される。
 解放ブロックリスト510は、デフラグやチェックポイントの増加によって、あるチェックポイントで解放可となったメディア領域104のブロックアドレスを示す。あるチェックポイントが作成される時に、解放ブロック回収処理モジュールは、その解放ブロックリスト510をチェックポイントと結び付けられてメディア領域104に格納してもよい。その構成において、解放ブロックリスト510は、チェックポイント毎に作成される。
 解放ブロック回収処理モジュールは、チェックポイント毎に解放ブロックリスト510を読み出し、Trim処理などを含めた解放処理を、(最新チェックポイント―維持チェックポイント数N)のチェックポイントまで行う。
 図11において、ストレージプール150が作成されている。ストレージプール150の記憶領域は、1又は複数のNVMなどの高速記憶装置151の記憶領域、及び、1つ又は複数のHDDなどの低速記憶デバイス152の記憶領域から構成される。
 解放ブロック回収処理モジュールは、ホスト要求処理と同期または非同期で動作する。解放ブロック回収処理モジュールは、維持チェックポイント数管理テーブル500の維持チェックポイント数502までに登録されている解放ブロックリストに基づいて、キャッシュ拡張装置18やストレージプール150におけるブロックの解放処理(Trim処理)を行う。これにより、キャッシュ拡張装置18やストレージプール150において、領域解放処理を行うことができる。
 図13は、解放ブロック回収処理モジュールのフローチャートを示す。ファイルストレージシステム100は、チェックポイントとブロックアドレスとを関連づける、不図示のチェックポイント管理情報を保持している。解放ブロック回収処理モジュールは、チェックポイント管理情報において、一番古いチェックポイントの探索を行い、選択する(S501)、選択チェックポイントが、(最新チェックポイント-維持チェックポイント数N)以前のチェックポイントであるか、判定する(S502)。上述のように、スナップショットはカウントから除かれる。
 ステップS502の判定結果が否定的の場合(S502:NO)、解放ブロック回収処理モジュールは、処理を終了する。ステップS502の判定結果が肯定的の場合(S502:YES)、解放ブロック回収処理モジュールは、選択チェックポイントの解放ブロックリスト510を読み出す(S503)。
 空きブロック管理プログラム310は、解放ブロックリスト510の解放ブロックアドレスを、空きブロックへ変更する(S504)。解放ブロック回収処理モジュールは、解放ブロックの解放処理(トリム処理)を行い(S505)、ステップS501に戻る。以上の処理により、使用されていないブロックを解放し記憶領域の効率的な利用を実現できる。
 以上、ホスト装置からのI/O性能を維持したままデフラグ処理を高速化する本発明について、実施例に即して説明したが、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。
 また、上記の各構成・機能・処理部等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード等の記録媒体に置くことができる。

Claims (10)

  1.  1又は複数の記憶デバイスにより提供され、コンテンツのデータを格納するメディア領域と、
     前記メディア領域のデータを一時的に格納するメモリ領域を含むコントローラと、を含み、
     前記コントローラは、
     コンテンツに含まれ、前記メディア領域に格納されている、参照要求データブロックの参照要求を取得し、
     前記参照要求データブロックを含む前記コンテンツ内で連続する複数データブロックの、前記メディア領域上のアドレスにおけるギャップ数を決定し、
     前記ギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定し、
     前記デフラグが有効と判定した場合に、前記メディア領域から前記メモリ領域に読み出された前記複数データブロックを、前記メディア領域の連続アドレス領域に書き出す、ストレージシステム。
  2.  請求項1に記載のストレージシステムであって、
     前記コントローラは、前記参照要求データブロックが前記メモリ領域にキャッシュされていない場合に、前記参照要求データブロックを含む前記複数データブロックを前記メディア領域から前記メモリ領域に読み出し、
     前記読み出した複数データブロックのギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定し、
     前記参照要求データブロックが前記メモリ領域にキャッシュされている場合、前記複数データブロックを前記メディア領域から読み出すことなく、キャッシュされている前記参照要求データブロックを返す、ストレージシステム。
  3.  請求項1に記載のストレージシステムであって、
     前記コントローラは、
     更新要求データブロックを伴う前記コンテンツの更新要求の処理において、前記コンテンツ内で連続し前記更新要求データブロックを含む複数データブロックが前記メモリ領域にキャッシュされている場合に、前記更新要求データブロックを含む複数データブロックを、前記メディア領域の連続アドレス領域に書き出す、ストレージシステム。
  4.  請求項1に記載のストレージシステムであって、
     前記コントローラは、前記複数データブロックが前記コンテンツ内において占める範囲に基づいて、前記複数データブロックによるデフラグが有効か否か判定する、ストレージシステム。
  5.  請求項1に記載のストレージシステムであって、
     前記コントローラは、
     前記コンテンツのデフラグの実行を制御する、デフラグ実行制御情報を含み、
     前記コンテンツ内の全データが前記メディア領域内で連続アドレス領域に格納されている場合に前記デフラグ実行制御情報をデフラグ無効に設定し、
     前記デフラグ実行制御情報がデフラグ有効を示す場合に、前記ギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定する、ストレージシステム。
  6.  請求項5に記載のストレージシステムであって、
     前記コントローラは、前記コンテンツの更新要求の種別に基づいて、前記デフラグ実行制御情報をデフラグ無効に設定するか否か判定する、ストレージシステム。
  7.  請求項5に記載のストレージシステムであって、
     前記コントローラは、前記デフラグ実行制御情報がデフラグ有効を示す場合に前記コンテンツのオフラインデフラグを実行し、前記デフラグ実行制御情報がデフラグ無効を示す場合にオフラインデフラグを省略する、ストレージシステム。
  8.  請求項1に記載のストレージシステムであって、
     前記コントローラは、
     前記メモリ領域に接続され、前記メモリ領域を拡張するメモリ拡張領域と、を含み、
     前記メモリ領域に格納され、前記コンテンツ内で連続するデータブロックを、前記メモリ拡張領域における連続アドレス領域に移動する、ストレージシステム。
  9.  請求項1に記載のストレージシステムであって、
     前記コントローラは、
     前記メディア領域において過去データを格納しており解放すべきブロック、を管理する、解放ブロック管理情報を保持し、
     前記メディア領域において、前記解放ブロック管理情報に登録されているブロックの解放処理を実行する、ストレージシステム。
  10.  1又は複数の記憶デバイスにより提供され、コンテンツのデータを格納するメディア領域と、前記メディア領域のデータを一時的に格納するメモリ領域と、を含むストレージシステムの制御方法であって、
     コンテンツに含まれ、前記メディア領域に格納されている、参照要求データブロックの参照要求を取得し、
     前記参照要求データブロックを含む前記コンテンツ内で連続する複数データブロックの、前記メディア領域上のアドレスにおけるギャップ数を決定し、
     前記ギャップ数に基づいて、前記複数データブロックによるデフラグが有効か否か判定し、
     前記デフラグが有効と判定した場合に、前記メモリ領域に格納されている前記複数データブロックを、前記メディア領域の連続アドレス領域に書き出す、ストレージシステムの制御方法。
PCT/JP2014/058878 2014-03-27 2014-03-27 ストレージシステム WO2015145667A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2016509754A JP6171084B2 (ja) 2014-03-27 2014-03-27 ストレージシステム
US15/122,310 US10649691B2 (en) 2014-03-27 2014-03-27 Storage system
PCT/JP2014/058878 WO2015145667A1 (ja) 2014-03-27 2014-03-27 ストレージシステム
CN201480076664.4A CN106062703B (zh) 2014-03-27 2014-03-27 存储系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/058878 WO2015145667A1 (ja) 2014-03-27 2014-03-27 ストレージシステム

Publications (1)

Publication Number Publication Date
WO2015145667A1 true WO2015145667A1 (ja) 2015-10-01

Family

ID=54194260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/058878 WO2015145667A1 (ja) 2014-03-27 2014-03-27 ストレージシステム

Country Status (4)

Country Link
US (1) US10649691B2 (ja)
JP (1) JP6171084B2 (ja)
CN (1) CN106062703B (ja)
WO (1) WO2015145667A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017212515A1 (ja) * 2016-06-06 2017-12-14 株式会社日立製作所 ストレージシステム、計算機、およびストレージ制御方法
CN112558878A (zh) * 2020-12-16 2021-03-26 北京华弘集成电路设计有限责任公司 一种基于不同类型存储机制的空间调换方法
JP2021531557A (ja) * 2018-07-10 2021-11-18 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation データ・セットにとっておよびデータ・セットの移行にとって最適なストレージ環境の判定

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10430081B2 (en) * 2016-06-28 2019-10-01 Netapp, Inc. Methods for minimizing fragmentation in SSD within a storage system and devices thereof
CN109815162A (zh) * 2019-01-28 2019-05-28 Oppo广东移动通信有限公司 内存管理方法、装置、移动终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08339318A (ja) * 1995-04-10 1996-12-24 Sony Corp データ記録装置およびデータ管理方法
JP2001188658A (ja) * 1999-12-28 2001-07-10 Toshiba Corp ディスク制御システムおよびデータ再配置方法
JP2002268924A (ja) * 2001-03-08 2002-09-20 Toshiba Corp デフラグメンテーション機能を有するディスク記憶システム、及び同システムにおけるデフラグメンテーション方法
JP2005165781A (ja) * 2003-12-03 2005-06-23 Sony Corp 記録再生装置及び方法、並びに記録再生システム
JP2008305313A (ja) * 2007-06-11 2008-12-18 Nec Corp リモートデフラグ方式、サービス装置、プログラム、及びリモートデフラグ方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819290A (en) 1995-04-10 1998-10-06 Sony Corporation Data recording and management system and method for detecting data file division based on quantitative number of blocks
US6934802B2 (en) * 2002-04-19 2005-08-23 Seagate Technology Llc Band detection and performance optimization for a data storage device
US7702870B2 (en) * 2006-01-19 2010-04-20 Network Appliance Inc. Method and apparatus for defragmentation and for detection of relocated blocks
US8359430B1 (en) 2007-08-30 2013-01-22 Network Appliance, Inc. Techniques for efficient mass storage layout optimization
US8448004B2 (en) * 2008-10-27 2013-05-21 Netapp, Inc. Power savings using dynamic storage cluster membership
US8190811B2 (en) * 2009-06-09 2012-05-29 Seagate Technology, Llc Defragmentation of solid state memory
CN102483683B (zh) * 2009-12-24 2014-12-10 株式会社日立制作所 提供虚拟卷的存储系统
US8788755B2 (en) * 2010-07-01 2014-07-22 Infinidat Ltd. Mass data storage system and method of operating thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08339318A (ja) * 1995-04-10 1996-12-24 Sony Corp データ記録装置およびデータ管理方法
JP2001188658A (ja) * 1999-12-28 2001-07-10 Toshiba Corp ディスク制御システムおよびデータ再配置方法
JP2002268924A (ja) * 2001-03-08 2002-09-20 Toshiba Corp デフラグメンテーション機能を有するディスク記憶システム、及び同システムにおけるデフラグメンテーション方法
JP2005165781A (ja) * 2003-12-03 2005-06-23 Sony Corp 記録再生装置及び方法、並びに記録再生システム
JP2008305313A (ja) * 2007-06-11 2008-12-18 Nec Corp リモートデフラグ方式、サービス装置、プログラム、及びリモートデフラグ方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017212515A1 (ja) * 2016-06-06 2017-12-14 株式会社日立製作所 ストレージシステム、計算機、およびストレージ制御方法
JP2021531557A (ja) * 2018-07-10 2021-11-18 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation データ・セットにとっておよびデータ・セットの移行にとって最適なストレージ環境の判定
CN112558878A (zh) * 2020-12-16 2021-03-26 北京华弘集成电路设计有限责任公司 一种基于不同类型存储机制的空间调换方法
CN112558878B (zh) * 2020-12-16 2023-07-04 北京华弘集成电路设计有限责任公司 一种基于不同类型存储机制的空间调换方法

Also Published As

Publication number Publication date
JPWO2015145667A1 (ja) 2017-04-13
US10649691B2 (en) 2020-05-12
CN106062703B (zh) 2019-08-02
CN106062703A (zh) 2016-10-26
US20160371035A1 (en) 2016-12-22
JP6171084B2 (ja) 2017-07-26

Similar Documents

Publication Publication Date Title
US9454317B2 (en) Tiered storage system, storage controller and method of substituting data transfer between tiers
US8886882B2 (en) Method and apparatus of storage tier and cache management
JP5593577B2 (ja) ストレージシステム及びその制御情報の管理方法
JP5944587B2 (ja) 計算機システム及び制御方法
US9971692B2 (en) Supporting concurrent operations at fine granularity in a caching framework
EP1755042A2 (en) Storage system for controlling disk cache
CN108604165B (zh) 存储装置
JP5309259B2 (ja) ストレージ装置及びその制御方法
US9916249B2 (en) Space allocation in a multi-grained writeback cache
US10095595B2 (en) Instant recovery in a multi-grained caching framework
US20150363134A1 (en) Storage apparatus and data management
JP6106028B2 (ja) サーバ及びキャッシュ制御方法
WO2016046911A1 (ja) ストレージシステム及びストレージシステムの管理方法
US8694563B1 (en) Space recovery for thin-provisioned storage volumes
US9317423B2 (en) Storage system which realizes asynchronous remote copy using cache memory composed of flash memory, and control method thereof
JP6171084B2 (ja) ストレージシステム
US10628311B2 (en) Reducing defragmentation in a multi-grained writeback cache
US20140074776A1 (en) Re-trim of free space within vhdx
JP6685334B2 (ja) ストレージ装置
WO2016056104A1 (ja) ストレージ装置、及び、記憶制御方法
US9817757B2 (en) Scalable metadata management in a multi-grained caching framework
US10089125B2 (en) Virtual machines accessing file data, object data, and block data
US9864688B1 (en) Discarding cached data before cache flush
JP2019045955A (ja) 記憶装置およびデータの配置の最適化方法
US11947799B1 (en) Systems and methods for using the TRIM command with solid state devices

Legal Events

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

Ref document number: 14887476

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15122310

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2016509754

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14887476

Country of ref document: EP

Kind code of ref document: A1