WO2016181640A1 - 計算装置、方法、及び、プログラム - Google Patents

計算装置、方法、及び、プログラム Download PDF

Info

Publication number
WO2016181640A1
WO2016181640A1 PCT/JP2016/002262 JP2016002262W WO2016181640A1 WO 2016181640 A1 WO2016181640 A1 WO 2016181640A1 JP 2016002262 W JP2016002262 W JP 2016002262W WO 2016181640 A1 WO2016181640 A1 WO 2016181640A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
storage means
unit
data
stored
Prior art date
Application number
PCT/JP2016/002262
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 日本電気株式会社
Publication of WO2016181640A1 publication Critical patent/WO2016181640A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Definitions

  • the present invention relates to a calculation apparatus, method, and program for extending the lifetime of a nonvolatile memory device in a data store system using the nonvolatile memory device.
  • a data store system constituted by a single computer or a plurality of computers, for example, a database system, a file system, and a cache system.
  • Distributed storage systems are often applied to such systems.
  • the distributed storage system includes a plurality of general-purpose computers connected via a network.
  • the distributed storage system stores data and provides data using a storage device installed in those computers.
  • the storage device is, for example, an HDD (Hard disk drive), a nonvolatile memory, or a DRAM (Dynamic random access memory).
  • Cluster-based distributed storage system and distributed database system technologies have been developed on the premise of traditional server architecture.
  • each server In a distributed database system based on this server architecture, each server must go through the corresponding server to access the resources of other servers.
  • a CPU Central Processing Unit
  • each resource for example, memory and storage are directly connected via an interconnect network. Therefore, each CPU can physically share each resource, and the CPU can access the resource without passing through another server.
  • Such changes in server architecture also change the technology of distributed storage systems and distributed database systems.
  • Non-volatile memory represented by flash memory has a limit on the number of times data can be written to the memory element due to its physical characteristics.
  • the nonvolatile memory generally has restrictions on the size of deletion and the size of writing. For example, when rewriting 4 kilobytes of data in a nonvolatile memory that can be deleted only in units of 256 kilobytes, the server once deletes 256 kilobytes including the 4 kilobyte area, and then rewrites it again.
  • the server writes 256 kilobytes of data to the flash memory device in addition to the 4 kilobytes that are actually rewritten.
  • Such an increase in the amount of writing leads to an increase in the number of times of writing and reduces the lifetime of the nonvolatile memory.
  • Such an increase in the amount of writing is generally called write amplification.
  • the controller of the nonvolatile memory device and the storage software using the nonvolatile memory device have various access functions.
  • Patent Document 1 discloses a technique called over-provisioning having a write area that has been erased in advance and cannot be seen as a real capacity.
  • Patent Document 2 discloses a cooperation technology on the software side and the flash memory device side.
  • this technology when there is a data deletion request, it is only necessary to perform administrative deletion with software such as a file system. Actual deletion is performed when a separate deletion command is issued. I do.
  • This technology extends the lifetime of the device by linking the software and the flash memory device in this way.
  • the file system and database system perform writing in a log format in order to speed up processing that requires writing to flash memory devices with low random access performance.
  • Such a method requires a process called garbage collection for collecting old invalid data areas and a conversion process for storing them in an order that can be easily referred to when viewed from the database system software.
  • writing to the flash memory device is performed physically sequentially by converting a logical address designated by random writing into a physical address. This conversion is performed in a layer called FTL (Flash Transaction Layer).
  • FTL Flash Transaction Layer
  • the data store system performs random writing to the storage device when converting sequentially written data such as journal logs into a normal file storage format. For this reason, the storage device updates data in various areas and generates the above-described write amplification. As a result, the life of the storage device is shortened.
  • the storage device controller When the storage device controller performs control for extending the life against random writing, the load on the controller is increased, resulting in performance degradation.
  • the object of the present invention is to provide a calculation apparatus, method, and program for reducing the above-mentioned problems.
  • a computing device comprising: a log storage unit that stores an update log of data items stored in a normal storage unit that stores a plurality of data items that are randomly accessed by an identifier; Extracting and collecting item identifiers and update data and writing them sequentially to the new storage means, log conversion means, and if the data item of the specified identifier is stored in the new storage means, from the new storage means, If not stored, a reading means for obtaining from the normal storage means is provided.
  • a method includes an update data item from a log storage unit that stores an update log of a data item stored in a normal storage unit that stores a plurality of data items that are randomly accessed by an identifier.
  • the identifier and update data are extracted and collected, sequentially written to the new storage means, and the data item of the specified identifier is stored from the new storage means if stored in the new storage means. Obtained from normal storage means.
  • the computing device suppresses the performance degradation of the storage system using the device while realizing the extension of the lifetime of the nonvolatile memory device.
  • FIG. 1 shows the configuration of a data store system 90 according to the first embodiment of the present invention.
  • FIG. 2 shows the internal configuration of the computing device 10 and the external storage device 20.
  • FIG. 3 is a device showing a hardware configuration of the computing device 10.
  • FIG. 4 is a configuration diagram of the log management information recording unit 14.
  • FIG. 5 is a flowchart of the reading process of the data store system 90.
  • FIG. 6A is a process flowchart (part 1) of the log reading unit 15.
  • FIG. 6B is a process flowchart (part 2) of the log reading unit 15.
  • FIG. 7 is a process flowchart of the storage unit reading unit 16.
  • FIG. 8 is a flowchart of the writing process of the data store system 90.
  • FIG. 9 is a processing flowchart of the log conversion unit 17.
  • B shows the configuration of a data store system 90 according to the first embodiment of the present invention.
  • FIG. 2 shows the internal configuration of the computing device 10 and the external storage device 20.
  • FIG. 10 is a diagram showing an overview of reading aggregation for the log storage unit 21.
  • FIG. 11 is a diagram for explaining the necessity of issuing a log reading command by the log reading unit 15.
  • FIG. 12 is a diagram showing a configuration of the external storage device 20 in the present embodiment.
  • FIG. 3 is a configuration diagram of the computing device 10 according to the second embodiment.
  • FIG. 1 shows the configuration of a data store system 90 according to the first embodiment of the present invention.
  • the data store system 90 is, for example, a database system, KVS (Key Value Store), or a file system.
  • the data store system 90 includes X computing devices 10 (from computing device 10-1 to computing device 10-X) and Y external storage devices 20 (from external storage device 20-1 to external storage device 20-Y). ), Z other resources not shown, and an interconnect network 30 that couples them.
  • X and Y are 1 or more
  • Z is a number of 0 or more.
  • the data store system 90 adopting the lease separation type architecture constructs a single or a plurality of computer servers by combining the computing device 10, the external storage device 20, and other resources as necessary.
  • FIG. 2 shows the internal configuration of the computing device 10 and the external storage device 20.
  • this figure illustrates a data store system 90 that includes only one computing device 10 and one external storage device 20. Even when the data store system 90 includes a plurality of computing devices 10 and a plurality of external storage devices 20, their internal configurations may be as shown in FIG.
  • the computing device 10 includes a request receiving unit 11, a request processing unit 12, a log writing unit 13, a log management information recording unit 14, a log reading unit 15, a storage unit reading unit 16, and a log conversion unit 17.
  • the external storage device 20 includes a log storage unit 21, a new storage unit 22, and a normal storage unit 23.
  • the data store system 90 can provide a data access function to the user by operating these units in cooperation.
  • the log reading unit 15 and the storage unit reading unit 16 may be collectively implemented as the reading unit 18.
  • the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log reading unit 15, the storage unit reading unit 16, and the log conversion unit 17 are each configured by a logic circuit.
  • the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log reading unit 15, the storage unit reading unit 16, and the log conversion unit 17 may be realized by a program.
  • the program is executed on, for example, the computing device 10, a computer server including the computing device 10, the interconnect network 30, and the external storage device 20, or another computer connected to the interconnect network 30.
  • the log management information recording unit 14 is, for example, a semiconductor storage device or a disk device included in the computing device 10.
  • the log management information recording unit 14 may be realized by the computing device 10 or other hardware connected to the interconnect network 30 or other network.
  • the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log management information recording unit 14, the log reading unit 15, the storage unit reading unit 16, and the log conversion unit 17 operate on the same computing device 10. Assuming that
  • the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log management information recording unit 14, the log reading unit 15, the storage unit reading unit 16, and the soot log conversion unit 17 may operate in plural for each computing device 10. . Thereafter, unless otherwise specified, the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log management information recording unit 14, the log reading unit 15, and the storage unit reading unit 16 operate one by one for each computing device 10. Assuming that
  • one log conversion unit 17 operates on the computing device 10 for each log storage unit 21 in the external storage device 20.
  • the device 10 is, for example, a device having a hardware configuration shown in FIG.
  • the computing device 10 includes, for example, a CPU 81, a main storage device 82, and a network interface 83.
  • the CPU 81 is an arithmetic device called a central processing unit, and is generally realized by a processor.
  • the main storage device 82 is a storage device implemented with, for example, a DRAM.
  • the network interface 83 is an interface to the interconnect network 30.
  • the computing device 10 may include a part not shown, for example, another storage device or a device for an interface with a network other than the interconnect network 30. Further, the computing device 10 may separately hold a high-speed storage circuit such as a register, a CPU cache, or a closed network in the computing device 10, and may include a storage device such as an HDD or a flash memory. .
  • the external storage device 20 is, for example, a device including an interface to the interconnect network 30 for coupling with the computing device 10, a storage device, an access unit to the storage device, and a power control unit.
  • the storage device is, for example, a flash memory memory, a DRAM, an MRAM (Magnetic-resistive-Random-Access-Memory), or an HDD.
  • the log storage unit 21, the new storage unit 22, and the normal storage unit 23 are storage devices included in the external storage device 20.
  • the interconnect network 30 is a communication network for exchanging data, control messages, and other messages between the computing device 10 and the external storage device 20, for example.
  • the interconnect network 30 is realized by an optical cable and a switch, for example.
  • the interconnect network 30 may be realized by a PCI Express (registered trademark) standard cable.
  • the computing device 10 may be a computer having a conventional architecture (hereinafter simply referred to as a computer).
  • the interconnect network 30 is realized by, for example, Ethernet (registered trademark) or a PCI-Express network.
  • ExpEther (registered trademark) technology can extend the PCI Express standard, which is a computer interconnect network. For this reason, it is possible to realize an architecture similar to the resource separation type architecture by using a computer by holding the interface having the ExpEther function in the computer.
  • the external storage device 20 includes a card having an ExpEther function and a PCI Express standard device.
  • the PCI Express standard device may be realized by any means as long as it has some kind of storage device.
  • the external storage device 20 may be, for example, a plurality of HDDs or SSDs (Slid State Drives) connected via PCI Express flash memory and RAID (Redundant Arrays of Independent Disks) cards.
  • the external storage device 20 may be a card having a GPGPU (Graphical-Purpose computing on graphics processing processing units) function and a storage device, or an arithmetic board based on an MIC (Many Integrated Core) architecture such as Intel Xeon Phi.
  • GPGPU Graphic-Purpose computing on graphics processing processing units
  • MIC Many Integrated Core
  • the interconnect network 30 may be realized by Fiber Channel or FCoE (Fiber Channel over Ethernet (registered trademark)).
  • the computing device 10 includes a host bus adapter or an Ethernet card in the computer, and the external storage device 20 is a storage device or storage system provided with an interface to these networks.
  • the data store system 90 having such an architecture often has a separate network between the computing devices 10. For example, computers are connected via Ethernet, and computers and storage are connected via Fiber Channel.
  • power may be supplied from the power supply provided in each of the computing device 10 and the external storage device 20, or a separate power source may be prepared for the plurality of computing devices 10 and the external storage device 20 and supplied via a cable. May be.
  • the request receiving unit 11, the request processing unit 12, the log writing unit 13, the log reading unit 15, the storage unit reading unit 16, and the log conversion unit 17 are realized by programs executed on the computing device 10. It is about the case that is done. Even when each unit is realized by a logic circuit, the operation is basically the same.
  • the request accepting unit 11 is a module that accepts an access request for data stored in the external storage device 20 from an application program running on the computing device 10, for example.
  • the request receiving unit 11 may operate as an independent process or may be operated by being incorporated in an application program as a library.
  • the request receiving unit 11 receives an access request, interprets it, and passes it to the request processing unit 12.
  • the type of access request differs depending on the data store system 90. For example, READ / WRITE is used for a file system, PUT / GET is used for a KVS system, and SQL (Structured Query Query Language) is used for a database system.
  • READ / WRITE is used for a file system
  • PUT / GET is used for a KVS system
  • SQL Structured Query Query Language
  • the KVS system is a data store system that acquires or writes a value (value) for an identifier (key).
  • the KVS system PUT / GET access request includes an identifier of a value to be written or acquired.
  • the KVS system performs an access process by having a mechanism for storing a value corresponding to an identifier in a specific address area of a storage medium.
  • the KVS system has a mechanism for calculating the address area by some method.
  • the computing device 10 has the identifier and address map information in the main storage device 82, and mechanically calculates the physical address from the hash value.
  • the request processing unit 12 is a module that actually accesses an access request received by the request receiving unit 11 to a necessary area of the corresponding device.
  • the KVS system has a mechanism for specifying the external storage device 20 to be accessed and calculating the address in the external storage device 20 based on the identifier specified by the access request.
  • the request processing unit 12 has the mechanism.
  • the request processing unit 12 determines in which of the plurality of external storage devices 20 the value for the identifier is stored by a consistent hashing technique. Note that the log writing unit 13, the log reading unit 15, and the storage unit reading unit 16 may determine the external storage device 20 by the same method. The value for the identifier is stored in one or more of the log storage unit 21, the new storage unit 22, and the normal storage unit 23 inside the external storage device 20.
  • the log management information recording unit 14 holds information for determining at which address in the log storage unit 21 the value for the identifier is stored.
  • the storage unit reading unit 16 calculates physical addresses in the new storage unit 22 and the normal storage unit 23.
  • the request processing unit 12 generally operates as follows. In the update process (PUT or the like), the request processing unit 12 passes the access request information to the log writing unit 13 and requests writing to the log storage unit 21. In the update processing, when it is necessary to read a corresponding value before log writing, the request processing unit 12 performs reference processing in advance. In such a system, a command for reading the version information of the value or processing after comparing with the current value such as comparison writing is provided.
  • the request processing unit 12 requests the log reading unit 15 and the storage unit reading unit 16 to read the identifier value specified in the request.
  • the request processing unit 12 may make these requests simultaneously, or may request the storage unit reading unit 16 when the log reading unit 15 is requested and the value of the identifier is not found.
  • the log writing unit 13 writes the identifier and value specified by the request processing unit 12 and other meta information in the log storage unit 21.
  • the other meta information varies depending on the system, but is, for example, version information or time. Since the log storage unit 21 uses a continuous area from the start address, basically, new log information is always written at the end address where data is written.
  • the request processing unit 12 acquires the last address from the log management information recording unit 14.
  • the log writing unit 13 further records relation information between the corresponding identifier and the physical address in the log storage unit 21 in the log management information recording unit 14. After completion of these processes, the log writing unit 13 sends a completion notification to the request processing unit 12, and the request processing unit 12 receiving the notification notifies the request receiving unit 11 of the completion of the access request processing. Depending on the system operation policy, the request processing unit 12 may send a completion notification to the request receiving unit 11 after requesting the log writing unit 13. In addition, the log writing unit 13 performs a write command using a comparison write command held by the external storage device 20.
  • This comparison write instruction is called a CAW (Compare and Swap) instruction or a CAS (Compare and Swap) instruction.
  • the log writing unit 13 sets the comparison source data to a blank state. That is, the log writing unit 13 issues a command to perform writing if it is blank. The reason for issuing such an instruction is that a log may be added by another computing device 10.
  • the log management information recording unit 14 holds an identifier and address (may be a pointer) information of the log storage unit 21 in which a value corresponding to the identifier is stored, and tail address information of the log storage unit 21.
  • FIG. 4 is a configuration diagram of the log management information recording unit 14.
  • the log management information recording unit 14 includes a tail address management unit 41 and a log storage unit address management unit 42.
  • the tail address management unit 41 holds the tail address of the log to be written by the log writing unit 13 known to the computing device 10 and is updated by the log reading unit 15.
  • the data store system 90 includes a plurality of computing devices 10 as shown in FIG. 1, there is a possibility that another computing device 10 additionally writes an update log. Therefore, the log writing unit 13 alone cannot identify the latest tail address of the log, and the log reading unit 15 needs to update the information in the tail address management unit 41.
  • the log writing unit 13 that can write to one log storage unit 21 may be limited to one, and in such a case, such a mechanism is unnecessary.
  • the log storage unit address management unit 42 records the storage location of the update information for the specified key for the update information stored in the log storage unit 21. For example, information indicating that update information for key A is stored at address 0 is recorded.
  • the log storage unit address management unit 42 may cache other information as necessary.
  • the log reading unit 15 acquires the update information of the corresponding key from the log storage unit 21. For this reason, the log reading unit 15 acquires information from the log management information recording unit 14 and then executes a read command on the address where the update information of the corresponding key is stored. In addition, the log reading unit 15 executes a read command to check whether the end area of the log has been updated. The log reading unit 15 may execute the read command for the tail every time the request is processed, or speculatively. Details of this will be described later.
  • the storage unit reading unit 16 reads data corresponding to the corresponding key from the new storage unit 22 or the normal storage unit 23 in response to a request from the request processing unit 12.
  • the storage unit reading unit 16 can employ various methods as a method of calculating the storage destination address from the corresponding key.
  • the storage unit reading unit 16 may issue a read request for value acquisition to the renewal storage unit 22 and the normal storage unit 23 in parallel or sequentially.
  • the storage unit reading unit 16 outputs a value stored in the new storage unit 22.
  • the log conversion unit 17 converts the information stored in the log storage unit 21 and writes it to the new storage unit 22. In addition, the log conversion unit 17 writes the information stored in the new storage unit 22 in the normal storage unit 23.
  • the log conversion unit 17 may perform the processing periodically at a certain time period, or may be performed when the usage capacity of the log storage unit 21 exceeds a certain value.
  • the external storage device 20 is a storage medium that stores data of the data store system 90, and includes three areas: a log storage unit 21, a new storage unit 22, and a normal storage unit 23.
  • the log storage unit 21 stores update information of key groups handled by the external storage device 20 in a journal log format.
  • the log writing unit 13 sequentially stores update information in the log storage unit 21.
  • the update information stores at least a record key and updated data.
  • the update information may include version information, a vector clock similar to the version information, and time information. Such information is used to ensure consistency between replicas when data replicas are retained for fault tolerance. Further, the log storage unit 21 may perform control such that a physical address to be written is used smoothly by a technique called wear leveling.
  • the new storage unit 22 is an area in which the log conversion unit 17 converts and stores log information in the log storage unit 21.
  • the normal storage unit 23 is an area that holds data corresponding to an identifier (key) finally.
  • the normal storage unit 23 is an area for storing data in a so-called data file format or database format.
  • an application program (or user) that is a user of the data store system 90 issues a request to the request receiving unit 11 (S11).
  • the application program issues a request using a library that is the request receiving unit 11.
  • the request processing unit 12 receives and interprets the request (S12).
  • the request processing unit 12 executes different processing depending on which API of API (Application Program Interface) provided by the request receiving unit 11 is called.
  • API Application Program Interface
  • GET processing a data key is designated as an argument, and the request processing unit 12 recognizes this key.
  • the request processing unit 12 interprets the SQL and drops it into an execution process.
  • the processing in this step is processing performed by, for example, a query parser or executor.
  • the request processing unit 12 After identifying the GET process in S12, the request processing unit 12 requests the log reading unit 15 and the storage unit reading unit 16 to acquire data of the designated key (S13). Next, the log reading unit 15 and the storage unit reading unit 16 each execute data acquisition processing for the corresponding key (S14, S17).
  • the request processing unit 12 may activate the log reading unit 15 and the storage unit reading unit 16 in parallel, or when the log reading unit 15 is activated first and data is not obtained from the log storage unit 21 (in S15) NO), the storage unit reading unit 16 may be activated.
  • the designer of the data store system 90 may perform this selection in consideration of the trade-off between the latency of the application program and the load on the device. Details of S14 and S17 will be described later.
  • the request processing unit 12 determines whether or not the value (data) for the corresponding key has been acquired as a result (S15). When the data for the corresponding key is not included in the log storage unit 21 (NO in S15), the request processing unit 12 acquires the result of the storage unit reading unit 16 (S18). When the log reading unit 15 can acquire the value for the corresponding key (YES in S15), the request processing unit 12 responds to the request receiving unit 11 with the result of the log reading unit 15 (S16).
  • the storage unit reading unit 16 performs acquisition processing of the value of the corresponding key.
  • the request processing unit 12 responds to the request reception unit 11 with the result obtained by the storage unit reading unit 16 only when the data of the key is not acquired by the log reading unit 15 (NO in S15) (S18). .
  • the reading unit 18 executes steps S14 to S16.
  • the reading unit 18 may execute the processes corresponding to S14 and S17 in parallel or in the order described above.
  • ⁇ Operation of log reading unit 15 ⁇ 6A and 6B are process flowcharts of the log reading unit 15.
  • the log reading unit 15 is activated in S14 of FIG. 5 and executes subsequent processing.
  • the log reading unit 15 executes the flow starting from S21 and the flow starting from S26 in parallel, but these two flows may be executed sequentially.
  • This flow is a flow for acquiring the latest log data.
  • the log reading unit 15 needs to respond with the latest data value. Since there is a possibility that another computing device 10 (see FIG. 1) in the data store system 90 has rewritten data, the log reading unit 15 is added by the other computing device 10 in order to obtain the latest value. It is necessary to get up to the latest log.
  • the log reading unit 15 acquires the end address information of the log from the end address management unit 41 in the log management information recording unit 14 (S21).
  • This end address is information recognized by the log management information recording unit 14 and may be different from the actual end address in the log storage unit 21. The reason is that other computing devices 10 in the data store system 90 may have added logs.
  • the log reading unit 15 issues a data read command for a certain size from the end address in the log storage unit 21 and acquires the data (S22). This size is a constant multiple of the minimum write size of the nonvolatile device.
  • the log reading unit 15 checks the contents of the read data to determine whether log information has been written (S23). If valid log information is stored in the read data (YES in S23), the log reading unit 15 proceeds to S24, and if not stored (NO in S23), the process proceeds to S25.
  • the log reading unit 15 confirms whether or not the latest log has been read (S24). The log reading unit 15 determines that the latest log has been read if no valid log information is stored until the middle of the read data. When the valid log is stored up to the end of the read data, there is a possibility that there is a subsequent log, and the latest log is not necessarily read.
  • the log reading unit 15 If it cannot be determined that the latest log has been read (NO in S24), the log reading unit 15 returns to S22 and rereads the subsequent log.
  • the read target is the continuation of the data read in the previous S22 (after the end address).
  • the log reading unit 15 updates the information in the end address management unit 41 and the log storage unit address management unit 42 when the end address has changed. (S25).
  • the log reading unit 15 may update the tail address management unit 41 every time the log is read in S22 to S24, instead of executing this step.
  • the log reading unit 15 determines that the latest log has been read and proceeds to S25.
  • the log reading unit 15 proceeds to S29 after S25.
  • the log reading unit 15 acquires the storage address of the corresponding key from the log storage unit address management unit 42 (S26). The log reading unit 15 determines whether or not the corresponding key is included in the log from the information in the log storage unit address management unit 42 (S27). When the log includes the corresponding key (YES in S27), the log reading unit 15 proceeds to S28, and when not included, proceeds to S29. When the corresponding key is included (YES in S27), the log reading unit 15 issues a read command to the log storage unit 21 using the address information obtained from the log storage unit address management unit 42, and stores data corresponding to the corresponding key. Obtain (S28).
  • the log reading unit 15 specifies information to be responded to the request receiving unit 11 from the data acquired so far (S29).
  • the latest log (hereinafter, difference log) information obtained from S21 to S25 includes data corresponding to the corresponding key
  • the latest data in the difference log is returned to the request reception unit 11 ( S2A, and S15 and S16 in FIG. 5).
  • the log reading unit 15 does not have to wait for the completion of the flow operation from S26 to S28. By operating in this way, the log reading unit 15 can reduce the latency.
  • FIG. 7 is a process flowchart of the storage unit reading unit 16. The storage unit reading unit 16 is activated in S17 of FIG. 5 and executes subsequent processing.
  • the storage unit reading unit 16 issues a read command to the new storage unit 22 and the normal storage unit 23 (S31 and S34). These two read instructions are executed in parallel. By doing so, the response time (latency) to the read request is shortened. Note that the reading may be performed sequentially, or the process of S34 may be performed after the process starting from S31. By arranging in this order, unnecessary processing of S34 can be omitted, so the load on the external storage device 20 is reduced.
  • the storage unit reading unit 16 may determine whether to perform simultaneous reading (S31 and S34) based on the access pattern to the data. These simultaneous readings have a relatively small effect in an application with a large access bias to the key, and conversely a large effect when the bias is small (accessed evenly). This situation also applies to simultaneous reading (S21 and S26) performed by the log reading unit 15.
  • the storage unit reading unit 16 and the log reading unit 15 may process only one set of S21 and S26 and S31 and S34 in parallel, and the other may be processed sequentially.
  • the storage unit reading unit 16 calculates at which address in the new storage unit 22 the target key is stored using a technique such as hash value calculation. Also in S34, the storage unit reading unit 16 similarly calculates which address in the normal storage unit 23 stores the target key.
  • the storage unit reading unit 16 When the target key is stored in the new storage unit 22 (YES in S32), the storage unit reading unit 16 outputs the data acquired from the new storage unit 22 (S33). When the target key is not stored in the new storage unit 22 (NO in S32) and stored in the normal storage unit 23 (YES in S35), the storage unit reading unit 16 stores the normal key. The data acquired from the unit 23 is output (S36). When the target key is not stored in the new storage unit 22 or the normal storage unit 23 (NO in S32 and NO in S35), the storage unit reading unit 16 determines the target key. No data is reported (S37).
  • FIG. 8 is a flowchart of the writing process of the data store system 90.
  • FIG. 8 shows an example of the PUT process flow in the KVS system, but the update process of the other data store system 90 is almost the same type of process.
  • the application program issues a request through the request receiving unit 11 (S11), and the request processing unit 12 interprets the request (S12). These two steps are the same as in FIG.
  • the request processing unit 12 acquires data necessary for the writing process (S41).
  • This data is, for example, version information or vector clock information that is necessary for matching between duplicates acquired in preparation for a failure. That is, the request processing unit 12 acquires version information corresponding to the key, for example.
  • the request processing unit 12 obtains version information by GET processing. Alternatively, the version information is held together with the address corresponding to the key in the log storage unit address management unit 42 in the log management information recording unit 14, and the request processing unit 12 obtains the version information from the log storage unit address management unit 42. Also good.
  • the CAW instruction is an instruction for determining whether to update after comparing with old data. For example, when the log writing unit 13 uses the CAS instruction, an old value of the data is required. The request processing unit 12 obtains this value by GET processing in advance. The main storage device 82 of the computing device 10 may hold this data.
  • the request processing unit 12 passes update information to the log writing unit 13 (S42).
  • the update information includes, for example, version information obtained in S41 and data to be newly written in the request received by the request receiving unit 11.
  • the log writing unit 13 acquires the end address from the end address management unit 41 of the log management information recording unit 14 and writes the update information to the address of the log storage unit 21 (S43).
  • the log writing unit 13 may buffer the update information and set the write size to a constant multiple (the constant is a natural number) of the minimum write size of the log storage unit 21 which is a nonvolatile storage medium. For example, when the minimum writing size of the nonvolatile storage medium is 4 kilobytes, the log writing unit 13 aggregates a plurality of write commands until the update information reaches 4 kilobytes, and then executes the writing. This buffering can reduce the amount of data written to the nonvolatile storage medium and extend the life of the nonvolatile storage medium.
  • a write command smaller than the minimum write size of a nonvolatile storage medium actually results in a large capacity write. For example, even if the update information is 512 kilobytes, if the minimum write size is 4 kilobytes, 4 kilobytes are written to the storage medium.
  • the log writing unit 13 may perform such buffering by providing the external storage device 20 with a volatile memory.
  • the log writing unit 13 performs writing to the log storage unit 21 with a CAW command.
  • the comparison data of the CAW instruction is initialization state data in the log storage unit 21 or data indicating a deleted state.
  • the reason for making such a comparison is that log writing may be performed by another computing device 10.
  • the log writing unit 13 newly acquires the end address and performs the CAW instruction again. The log writing unit 13 repeats this until it succeeds (S43).
  • the log writing unit 13 updates the information in the tail address management unit 41 and the log storage unit address management unit 42 of the log management information recording unit 14 (S44). Finally, the log writing unit 13 notifies the request processing unit 12 of the completion of log writing, and in response to this, the request processing unit 12 notifies the request receiving unit 11 of the completion of processing (S45). When a plurality of write commands are buffered and written in S43, the log writing unit 13 notifies after completion of the buffered log information write command.
  • FIG. 9 is a processing flowchart of the log conversion unit 17.
  • the log conversion unit 17 converts the log data in the log storage unit 21 into data in the new storage unit 22 and the normal storage unit 23.
  • the log conversion unit 17 is activated at regular intervals or when the usage capacity of the log storage unit 21 exceeds a threshold value.
  • the log conversion unit 17 reads the update log in the log storage unit 21 from the top for the conversion capacity (S51).
  • the conversion target log may be all the logs stored in the log storage unit 21 at the start of the conversion process, or may be a predetermined ratio of logs, for example, 80% of all the logs, or a log with a predetermined capacity. There may be.
  • the log conversion unit 17 obtains metadata such as a key (updated key) with data update, update data corresponding to the updated key, and version information for the updated key from the read log information. Extract (S52).
  • the log conversion unit 17 extracts a list of keys stored in the new storage unit 22 (S53).
  • the log conversion unit 17 may read the new storage unit 22 at this timing, or may create the list information in the previous log conversion process and store it in the main storage device 82, for example.
  • the log conversion unit 17 extracts a list of keys to be written in the normal storage unit 23 (S54).
  • the list extracted here is not included in the updated key list extracted in S52 among the list of keys written in the new storage unit 22.
  • the log conversion unit 17 writes the data of the key group extracted in S54 to the normal storage unit 23 (S55), and the updated key group and the data corresponding thereto as a batch sequential write to the new storage unit 22.
  • the log conversion unit 17 determines a sufficient size for storing the update information to be written, and secures the new storage unit 22 having the capacity. This size is smaller than that of the normal storage unit 23 and is desirably a minimum writing size of the nonvolatile storage medium and a constant multiple of the deletion unit.
  • the new storage unit 22 having a predetermined size may be secured in a fixed manner.
  • the log conversion unit 17 may write update data to the normal storage unit 23 for some of the keys to be updated (S55).
  • the log conversion unit 17 may leave some of the list extracted in S54 in the new storage unit 22 when the capacity of the new storage unit 22 is sufficient. In that case, the remaining key is removed from the list to be written in the normal storage unit 23.
  • the log conversion unit 17 deletes the log data converted this time from the log storage unit 21 and releases the area (S57).
  • ⁇ Reading aggregation The read command for the end address of the log storage unit 21 (S22 in FIG. 6) needs to be issued for each request. This increase in read instructions causes the performance of the data store system 90 to deteriorate.
  • the log reading unit 15 may consolidate the read instructions for a plurality of requests at a time. This aggregation is called reading aggregation.
  • FIG. 10 is a diagram showing an overview of reading aggregation for the log storage unit 21.
  • FIG. 9A shows a state where a read command is issued for each request.
  • b) shows a state in which reading and aggregation are performed.
  • the request processing unit 12 issues four requests (request 1 to request 4) to the log reading unit 15.
  • the log reading unit 15 issues a read command to the log storage unit 21 for each of these four requests.
  • the log reading unit 15 receives the first request 1 and issues a log tail read command, and then issues a log tail read command to the requests 2 and 3 received until the read is completed. Do not issue. Since the request 4 is received after receiving the result of the request 1, the log reading unit 15 issues a log read command again and waits for a return value.
  • the log reading unit 15 determines whether or not to issue a log reading command in consideration of the delay of the interconnect network 30.
  • FIG. 11 is a diagram for explaining the necessity of issuing a log reading command by the log reading unit 15.
  • (A) of this figure shows a case where the delay of the interconnect network 30 is small.
  • the log reading unit 15 can determine whether or not to issue a log read at the time when the request is received.
  • b) shows a case where the delay of the interconnect network 30 is large.
  • the log reading unit 15 determines whether or not to issue the log reading. Can not. Therefore, the log reading unit 15 arrives within the delay time before the time when the return value is returned based on the delay of the system, that is, for the request in which the time t in b) is within the delay time.
  • a log read command may be issued.
  • the log reading unit 15 checks whether it is necessary to issue a log read when a response is returned from the log storage unit 21 as follows. 1) The log reading unit 15 puts the arrival time in the request received from the request processing unit 12 and queued. 2) The log reading unit 15 compares the time when the return value is received from the log storage unit 21 with the arrival time of the request included in the queue. 3) The log reading unit 15 issues a new read command if the request arrival time is before the return time and within a certain time, that is, if the time t in b) is within a certain time. 4) The above-mentioned fixed time is given by a parameter. This value is approximately the delay time of the interconnect network 30 + ⁇ .
  • the computing apparatus 10 suppresses the performance degradation of the storage system using the device while realizing the extension of the lifetime of the nonvolatile memory device.
  • the reason is that the log writing unit 13 stores the data update of the normal storage unit 23 such as a database in the log storage unit 21 in a log format, and the log conversion unit 17 extracts the data update recorded in the log. This is because the new storage unit 22 is sequentially written.
  • the computing device 10 suppresses write amplification that occurs during random writing to the normal storage unit 23, and realizes a life extension of the nonvolatile memory device.
  • the controller of the storage device does not require special control for extending the life, and suppresses an increase in the load on the controller.
  • the data store system 90 of the present embodiment manages the normal storage unit 23 by a method different from that of the first embodiment.
  • Other basic operations and configurations are the same as those in the first embodiment, and thus the description thereof is omitted.
  • FIG. 12 is a diagram showing a configuration of the external storage device 20 in the present embodiment.
  • the external storage device 20 in this embodiment includes W (W is a number of 2 or more) normal storage units 23 (from the normal storage unit 23-1 to the normal storage unit 23-W). Further, the external storage device 20 includes a normal storage management information holding unit 24.
  • writing to the normal storage unit 23 is random writing, which adversely affects the life of the nonvolatile storage medium.
  • the external storage device 20 of this embodiment includes a plurality of normal storage units 23 and records data.
  • the log conversion unit 17 moves the data stored in the new storage unit 22 to the normal storage unit 23
  • the log conversion unit 17 creates the normal storage unit 23 having a size that can store all of the data to be converted. Then, the log conversion unit 17 executes writing from the new storage unit 22 to the normal storage unit 23 as sequential writing.
  • the log conversion unit 17 creates the normal storage unit 23 at the next opportunity in the free normal storage unit 23 behind the normal storage unit 23 used last time.
  • the external storage device 20 of the present embodiment includes a normal storage management information holding unit 24 as a management information storage area of each normal storage unit 23.
  • the normal storage management information holding unit 24 holds a start address of each normal storage unit 23, an unused or in-use status display, and a list of stored keys.
  • the list of keys can be compressed with a technique called Bloom Filter.
  • the state display of unused or in use stored in the normal storage management information holding unit 24 is initially “empty”, and the log conversion unit 17 is changed to “in use” at the time of writing. Return to 'empty' when the latest data is gone.
  • the storage unit reading unit 16 uses the information stored in the normal storage management information holding unit 24 to access the normal storage unit 23 that stores the latest data of the corresponding key, thereby acquiring the data of the corresponding key. For example, the storage unit reading unit 16 can speed up reading by caching the information stored in the normal storage management information holding unit 24 in the computing device 10.
  • the computing device 10 for example, the log conversion unit 17, needs to periodically execute a process similar to the garbage collection in the normal storage unit 23.
  • This garbage collection is similar to the processing performed in a general database system.
  • FIG. 3 is a configuration diagram of the computing device 10 according to the second embodiment.
  • the computing device 10 includes a reading unit 18 and a log conversion unit 17.
  • the log conversion unit 17 receives the identifier of the updated data item from the log storage unit 21 that stores the update log of the data item stored in the normal storage unit 23 that stores a plurality of data items that are randomly accessed by the identifier. Extract update data. Thereafter, the log conversion unit 17 collectively writes the extracted identifier and update data in the new storage unit 22.
  • the reading unit 18 acquires the data item of the specified identifier from the new storage unit 22 if stored in the new storage unit 22 and from the normal storage unit 23 if not stored.
  • the computing device 10 of the present embodiment suppresses the performance degradation of the storage system using the device while extending the life of the nonvolatile memory device.
  • the reason is that the log writing unit 13 stores the data update of the normal storage unit 23 such as a database in the log storage unit 21 in a log format, and the log conversion unit 17 extracts the data update recorded in the log. This is because the new storage unit 22 is sequentially written.
  • the computing device 10 suppresses write amplification that occurs during random writing to the normal storage unit 23, and realizes a life extension of the nonvolatile memory device.
  • the controller of the storage device does not require special control for extending the life, and suppresses an increase in the load on the controller.

Abstract

不揮発性メモリデバイスの寿命延長を実現しつつ、当該デバイスを用いたストレージシステムの性能低下を抑制する計算装置は、識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶手段に格納されているデータ項目の更新ログを格納するログ記憶手段から、更新されたデータ項目の識別子と更新データを抽出して集め、新記憶手段にシーケンシャルに書き込む、ログ変換手段と、指定された識別子のデータ項目を、新記憶手段に格納されていれば新記憶手段から、格納されていなければ通常記憶手段から取得する読み込み手段と、を備える。

Description

計算装置、方法、及び、プログラム
 本発明は、不揮発性メモリデバイスを活用したデータストアシステムにおいて、不揮発性メモリデバイスの寿命を延長する計算装置、方法、及び、プログラムに関する。
 記憶装置及び記憶システムに対するデータアクセスの制御に関するさまざまな技術が知られている。
 例えば、単一あるいは複数の計算機によって構成されるデータストアシステム、例えば、データベースシステムやファイルシステム、キャッシュシステム、がある。分散ストレージシステムが、そのようなシステムに、しばしば適用されている。その分散ストレージシステムは、ネットワークを介して接続された複数の汎用的な計算機を含む。
 その分散ストレージシステムは、それらの計算機に搭載された記憶装置を用いて、データの格納及びデータの提供を行う。記憶装置は、例えば、HDD(Hard disk drive)、不揮発性メモリ、または、DRAM(Dynamic random access memory)である。
 クラスタベースの分散ストレージシステムや分散データベースシステムの技術は、伝統的なサーバアーキテクチャを前提に発展してきている。このサーバアーキテクチャに基づく分散データベースシステムにおいては、各サーバは、他のサーバのリソースにアクセスするには、該当するサーバを経由しなければならない。一方、リソース分離型アーキテクチャに基づくシステムでは、CPU(Central Processing Unit)と各リソース、例えば、メモリや、ストレージは、インターコネクトネットワークを経由して直接接続されている。そのため、各CPUから各リソースを物理的に共有することが可能であり、CPUはリソースを他のサーバを経由せずアクセスすることができる。このようなサーバアーキテクチャの変化は、分散ストレージシステムや分散データベースシステムの技術にも変化を与える。
 フラッシュメモリに代表される不揮発性メモリは、その物理的特性から記憶素子への書き込み回数に制限がある。また、不揮発性メモリは、一般的に、削除のサイズや書き込みサイズにも制約を有する。例えば、256キロバイトのブロック単位でしか削除処理できない不揮発メモリにおいて4キロバイトのデータを書き換える場合、サーバはその4キロバイトの領域を含む256キロバイトを一旦削除してから、再度書き直す。
 単純に更新処理を実行すると、サーバは、実際に書き換える4キロバイトの他にフラッシュメモリデバイスに対して256キロバイトのデータを書き込むことになる。このような書き込み量の増加は、書き込み回数の増加を招き、不揮発性メモリの寿命を低下させる。このような書き込み量の増加分は、一般的に、ライト・アンプリケーションと呼ばれる。
 このような書き込み量の増大を抑制するために、不揮発性メモリデバイスのコントローラや、不揮発性メモリデバイスを利用するストレージソフトウェアは、様々に工夫されたアクセス機能を備えている。
 例えば、特許文献1は、事前消去済みで実容量として見えない書き込み用領域を備えたオーバー・プロビジョニングと呼ばれる技術を開示している。
 また、特許文献2は、ソフトウェア側とフラッシュメモリデバイス側の連携技術を開示している。この技術は、データの削除要求が有った時に、ファイルシステムなどのソフトウェアで管理上の削除をするだけで、実際の削除は削除用のコマンドを別途発行した時にフラッシュメモリデバイス側の実際の削除を行う。この技術は、このようにソフトウェアとフラッシュメモリデバイスを連携させることでデバイスの寿命を延ばす。
 ファイルシステムや、データベースシステムは、ランダムアクセス性能の低いフラッシュメモリデバイスに対し、書き込みが必要な処理の高速化を図るために、ログ形式で書き込みを行う。このような方式は、古く無効になったデータ領域を回収するガベージコレクションと呼ばれる処理や、データベースシステムソフトウェアから見たときに参照しやすい順序で格納するための変換処理を必要とする。
 また、フラッシュメモリデバイスへの書き込みは、ランダム書き込みで指定された論理アドレスが物理アドレスに変換されて、物理的にはシーケンシャルに行われる。この変換は、FTL(Flash Transaction Layer)と呼ばれるレイヤで行われる。ただし、フラッシュメモリデバイス側のコントローラの計算能力、メモリ量は限られているため、ソフトウェアから何も顧慮せずにランダム書き込みが行われると、ガベージコレクションの処理コストが問題になる。通常性能に影響を及ぼすリスクが高いのである。
国際公開第2013/046464号 特開2014-232543号公報
 上述したように、 データストアシステムは、ジャーナルログのようなシーケンシャルに書き込まれたデータを通常のファイル格納形式に変換するとき、記憶デバイスに対してランダム書き込みを行う。そのため、記憶デバイスは、様々な領域のデータ更新を行ってしまい、上述のライト・アンプリケーションを発生する。その結果、記憶デバイスの寿命が短くなってしまう。
 ランダム書き込みに対して、記憶デバイスのコントローラが、寿命延長のための制御を行った場合、コントローラの負荷を増大させ性能劣化を招く。
 本発明は、上述の問題点を低減させるための計算装置、方法、及び、プログラムを提供することを目的とする。
 本発明の1実施の形態の計算装置は、識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶手段に格納されているデータ項目の更新ログを格納するログ記憶手段から、更新されたデータ項目の識別子と更新データを抽出して集め、新記憶手段にシーケンシャルに書き込む、ログ変換手段と、指定された識別子のデータ項目を、前記新記憶手段に格納されていれば前記新記憶手段から、格納されていなければ前記通常記憶手段から取得する読み込み手段と、を備える。
 本発明の1実施の形態の方法は、識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶手段に格納されているデータ項目の更新ログを格納するログ記憶手段から、更新されたデータ項目の識別子と更新データを抽出して集め、新記憶手段にシーケンシャルに書き込み、指定された識別子のデータ項目を、前記新記憶手段に格納されていれば前記新記憶手段から、格納されていなければ前記通常記憶手段から取得する。
 本発明にかかる計算装置は、不揮発性メモリデバイスの寿命延長を実現しつつ、当該デバイスを用いたストレージシステムの性能低下を抑制する。
図1は、本発明の第1の実施の形態におけるデータストアシステム90の構成を示す。 図2は、計算装置10および外部記憶装置20の内部構成を示す。 図3は、計算装置10のハードウェア構成を示す装置である。 図4は、ログ管理情報記録部14の構成図である。 図5は、データストアシステム90の読み込み処理のフローチャートである。 図6Aは、ログ読み込み部15の処理フローチャート(その1)である。 図6Bは、ログ読み込み部15の処理フローチャート(その2)である。 図7は、記憶部読み込み部16の処理フローチャートである。 図8は、データストアシステム90の書き込み処理のフローチャートである。 図9は、ログ変換部17の処理フローチャートである。ロ 図10は、ログ記憶部21に対する読み込み集約の概要を示す図である。 図11は、ログ読み込み部15によるログ読み込み命令の発行要否判断を説明する図である。 図12は、本実施の形態における外部記憶装置20の構成を示す図である。 図3は、第2の実施の形態にかかる計算装置10の構成図である。
 <第1の実施の形態>
[構成]
図1は、本発明の第1の実施の形態におけるデータストアシステム90の構成を示す。データストアシステム90は、例えば、データベースシステム、KVS(Key Value Store)、ファイルシステムである。データストアシステム90は、X個の計算装置10(計算装置10-1から計算装置10-Xまで)と、Y個の外部記憶装置20(外部記憶装置20-1から外部記憶装置20-Yまで)と、図示されないZ個のその他リソースと、それらを結合するインターコネクトネットワーク30を包含する。ここで、X及びYは1以上、Zは0以上の数である。リース分離型アーキテクチャを採用するデータストアシステム90は、計算装置10、外部記憶装置20、および、必要に応じてそれ以外のリソースを組み合わせて、単一あるいは複数の計算機サーバを構築する。
 図2は、計算装置10および外部記憶装置20の内部構成を示す。図面を簡単にするため、本図は、計算装置10および外部記憶装置20を各々1台だけ包含するデータストアシステム90を例示している。データストアシステム90が、複数の計算装置10および複数の外部記憶装置20を包含する場合も、それらの内部構成は図2に示す通りであって良い。
 計算装置10は、要求受付部11、要求処理部12、ログ書き込み部13、ログ管理情報記録部14、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17を備える。外部記憶装置20は、ログ記憶部21、新記憶部22、および、通常記憶部23を備える。これらの各部が連携して動作することで、データストアシステム90は、ユーザに対してデータアクセス機能を提供することが出来る。なお、例えば、ログ読み込み部15、記憶部読み込み部16は、まとめて、読み込み部18として実装されても良い。
 要求受付部11、要求処理部12、ログ書き込み部13、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17は、それぞれ論理回路で構成される。
 要求受付部11、要求処理部12、ログ書き込み部13、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17は、プログラムで実現されても良い。当該プログラムは、例えば、計算装置10、計算装置10とインターコネクトネットワーク30と外部記憶装置20から構成される計算機サーバ、あるいは、インターコネクトネットワーク30に接続される他のコンピュータ上で実行される。
 ログ管理情報記録部14は、例えば、計算装置10が備える半導体記憶装置、ディスク装置である。ログ管理情報記録部14は、インターコネクトネットワーク30あるいはその他のネットワークに接続された、計算装置10あるいは他のハードウェアによって実現されてもよい。
 以降、要求受付部11、要求処理部12、ログ書き込み部13、ログ管理情報記録部14、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17は、同一の計算装置10で動作することを前提とする。
 要求受付部11、要求処理部12、ログ書き込み部13、ログ管理情報記録部14、ログ読み込み部15、記憶部読み込み部16、 ログ変換部17は、計算装置10ごとに複数動作しても良い。以降、特に断りが無ければ、計算装置10ごとに要求受付部11、要求処理部12、ログ書き込み部13、ログ管理情報記録部14、ログ読み込み部15、記憶部読み込み部16が1つずつ動作することを前提とする。
 また、ログ変換部17は、外部記憶装置20のうちのログ記憶部21ごとに計算装置10上で1つ動作するものとする。
 要求受付部11、要求処理部12、ログ書き込み部13、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17が、計算装置10上で実行されるプログラムで実現される場合、計算装置10は、例えば、図3に示すハードウェア構成を有する装置である。
 計算装置10は、例えば、CPU81、主記憶装置82、および、ネットワークインタフェース83を備える。CPU81は、中央処理装置と呼ばれる演算装置であり、一般的にはプロセッサによって実現される。主記憶装置82は、例えば、DRAMで実装される記憶装置である。ネットワークインタフェース83はインターコネクトネットワーク30へのインタフェースである。
 計算装置10は、図示されていない部位、例えば、他の記憶装置や、インターコネクトネットワーク30以外のネットワークに対するインタフェースのデバイスを備えても良い。さらに、計算装置10は、レジスタのような高速な記憶回路、CPUキャッシュ、あるいは、計算装置10内に閉じたネットワークを別途保持し、その中にHDDやフラッシュメモリなどの記憶装置を備えても良い。
 外部記憶装置20は、例えば、計算装置10と結合するためのインターコネクトネットワーク30へのインタフェースと、記憶装置と、記憶装置へのアクセス部、電力制御部を備える装置である。記憶装置は、例えば、フラッシュメモリメモリ、DRAM、MRAM(Magneto resistive Random Access Memory)、HDDである。
 ログ記憶部21、 新記憶部22、および、通常記憶部23は、外部記憶装置20が備える記憶装置である。
 インターコネクトネットワーク30は、計算装置10、外部記憶装置20間で、例えば、データ、制御メッセージ、および、その他のメッセージをやりとりする為の通信網である。インターコネクトネットワーク30は、例えば、光ケーブルとスイッチによって実現される。また、インターコネクトネットワーク30は、PCI Express(登録商標)規格のケーブルで実現されても良い。
 また、計算装置10は、従来のアーキテクチャによる計算機(以降、単に計算機)であっても良い。このとき、インターコネクトネットワーク30は、例えば、イーサネット(登録商標)やPCI Expressネットワークなどよって実現される。ExpEther(登録商標)技術が、計算機のインターコネクトネットワークであるPCI Express規格を拡張できる。このため、計算機にExpEther機能を備えたインタフェースを保持させることで、計算機を用いてリソース分離型アーキテクチャに類似したアーキテクチャを実現できる。
 このとき、外部記憶装置20は、ExpEther機能を備えるカード、PCI Express規格のデバイスを備える。PCI Express規格のデバイスは、何らかの記憶装置を持つのであれば、如何なる手段で実現されても良い。外部記憶装置20は、例えば、PCI Express規格のフラッシュメモリ、 RAID(Redundant Arrays of Independent Disks)カードを経由して接続された複数のHDDやSSD(Slid State Drive)で良い。さらに、外部記憶装置20は、GPGPU(Graphical-Purpose computing on graphics processing units )機能と記憶装置を備えるカード、Intel Xeon PhiのようなMIC(Many Integrated Core)アーキテクチャに基づく演算ボードでも良い。
 また、分離されるリソースが従来のストレージシステムに限定されれば、インターコネクトネットワーク30はファイバチャネルやFCoE(Fiber Channel over Ethernet(登録商標))で実現されても良い。計算装置10は、計算機にホストバスアダプタ、あるいは、イーサネットカードを備え、外部記憶装置20はこれらのネットワークへのインタフェースを備えるストレージ装置またはストレージシステムである。このようなアーキテクチャのデータストアシステム90は、計算装置10間のネットワークは別に備えることが多い。例えば、計算機間がイーサネットで接続され、計算機とストレージ間はファイバチャネルで接続される。
 また、電力は、計算装置10、外部記憶装置20のそれぞれが備える電源から供給されても良いし 複数の計算装置10、外部記憶装置20に対して電源を別に用意してケーブルを介して供給されてもよい。
 {各部の概要}
 以降の説明は、要求受付部11、要求処理部12、ログ書き込み部13、ログ読み込み部15、記憶部読み込み部16、および、ログ変換部17が、計算装置10上で実行されるプログラムで実現される場合についてのものである。各部が、論理回路で実現される場合も、基本的に動作は同じである。
 要求受付部11は、例えば、計算装置10で動作するアプリケーションプログラムから外部記憶装置20に格納されているデータに対するアクセスリクエストを受け付けるモジュールである。要求受付部11は、独立したプロセスとして動作することもあれば、ライブラリとしてアプリケーションプログラムに組み込まれることによって動作することもある。要求受付部11は、アクセスリクエストを受け付け、解釈して要求処理部12に渡す。
 アクセスリクエストの種類はデータストアシステム90によって異なるが、例えば、ファイルシステムならREAD/WRITE、KVSシステムならPUT/GET、データベースシステムならSQL(Structured Query Language)命令である。
 以降、KVSシステムを例に説明する。KVSシステムは、識別子(キー)に対して値(バリュー)を取得したり、書き込みしたりするデータストアシステムである。KVSシステムのPUT/GETのアクセスリクエストは、書き込みたい、または、取得したい値の識別子を含む。KVSシステムは、識別子に対応した値を記憶媒体の特定のアドレス領域に格納する仕組みを持つことで、アクセス処理を行う。KVSシステムは、そのアドレス領域を何らかの方法で算出する仕組みを備えている。例えば、計算装置10が主記憶装置82に識別子とアドレスのマップ情報を持ち、ハッシュ値によって機械的に物理アドレスを算出する。また、外部記憶装置20だけでなく計算装置10の主記憶装置82に値を格納するKVSシステムもあるが、以降の説明は、主記憶装置82に値を格納しないKVSシステムについてのものである。
 要求処理部12は、要求受付部11が受け取ったアクセスリクエストを実際に該当デバイスの必要領域に対してアクセスするモジュールである。前述した通り、KVSシステムは、アクセスリクエストで指定される識別子に基づいて、アクセスすべき外部記憶装置20の特定と、外部記憶装置20内のアドレスを算出する仕組みを持つ。要求処理部12がその仕組みを備える。
 要求処理部12は、識別子に対する値が複数の外部記憶装置20の何れに格納されているかを、コンシステント・ハッシングの手法で決定する。なお、ログ書き込み部13、ログ読み込み部15、記憶部読み込み部16が、同様の方法で外部記憶装置20を決定してもよい。識別子に対する値は、外部記憶装置20内部のログ記憶部21、新記憶部22、通常記憶部23のいずれか、または、複数に格納される。
 識別子に対する値がログ記憶部21内のどのアドレスに格納されているかを決定する為の情報は、ログ管理情報記録部14が保持する。なお、記憶部読み込み部16が、新記憶部22および通常記憶部23内の物理アドレスの算出を行う。
 要求処理部12は概略次のように動作する。更新系(PUT等)の処理では、要求処理部12は、ログ書き込み部13にアクセスリクエストの情報を渡し、ログ記憶部21への書き込みを依頼する。更新系処理において、ログ書き込みの前に該当の値を読みこむ必要がある場合、要求処理部12は事前に参照処理を行う。このようなシステムにおいては、値のバージョン情報を読み込んだり、比較書き込みのような現在の値と比較してから処理したりするコマンドが提供される。
 参照系(GET等)の処理では、要求処理部12は、ログ読み込み部15、および、記憶部読み込み部16に対してリクエストに指定された識別子の値の読み込みを依頼する。要求処理部12は、これらの要求を同時に行っても良いし、ログ読み込み部15に依頼して該当識別子の値が見つからない時に、記憶部読み込み部16に依頼しても良い。 
 ログ書き込み部13は、要求処理部12により指定された識別子と値、またその他のメタ情報をログ記憶部21に書き込む。ここで、その他のメタ情報は、システムによって異なるが、例えば、バージョン情報や、時刻である。ログ記憶部21は、開始アドレスから連続した領域を利用するため、基本的には常にデータが書かれている末尾のアドレスに新しいログ情報を書き込む。要求処理部12は、末尾のアドレスをログ管理情報記録部14から取得する。
 ログ書き込み部13は、更に、ログ管理情報記録部14に該当識別子とログ記憶部21内の物理アドレスの関係情報を記録する。これらの処理完了後、ログ書き込み部13は要求処理部12に完了通知を送り、それを受けた要求処理部12が、要求受付部11に該アクセスリクエスト処理の完了を通知する。なお、システムの動作ポリシーによっては、要求処理部12は、ログ書き込み部13に依頼した後に、要求受付部11に完了通知を送っても良い。また、ログ書き込み部13は、外部記憶装置20が保持する比較書き込み命令を用いて書き込み命令を行う。この比較書き込み命令は、CAW(Compare and Write)命令、または、CAS(Compare and Swap)命令と呼ばれる。その際、ログ書き込み部13は、比較元のデータはブランク状態とする。つまり、ログ書き込み部13は、ブランクであったら書き込みを行う、という命令を発行する。このような命令を発行する理由は、他の計算装置10によってログが追記される可能性があるためである。
 ログ管理情報記録部14は、識別子と該識別子に対応する値が格納されているログ記憶部21のアドレス(ポインタなどでもよい)情報と、ログ記憶部21の末尾アドレス情報を保持する。
 図4は、ログ管理情報記録部14の構成図である。ログ管理情報記録部14は、末尾アドレス管理部41、および、ログ記憶部アドレス管理部42を包含する。末尾アドレス管理部41は、計算装置10が知るログ書き込み部13が書き込むべきログの末尾のアドレスを保持すし、ログ読み込み部15によって更新される。データストアシステム90が、図1に示したように複数の計算装置10を包含する場合、他の計算装置10が更新ログを追記する可能性がある。そのため、ログ書き込み部13だけではログの最新の末尾アドレスを特定できず、ログ読み込み部15が末尾アドレス管理部41の情報を更新する必要がある。なお、1つのログ記憶部21に対して書き込み出来るログ書き込み部13を1つに限定するように動作させても良く、その場合、このような仕組みは不要である。
 ログ記憶部アドレス管理部42は、ログ記憶部21に格納された更新情報について、指定されたキーに対する更新情報の格納場所を記録する。例えば、キーAに対する更新情報がアドレス0番に格納されている、といった情報を記録する。ログ記憶部アドレス管理部42は、必要に応じてその他の情報をキャッシュしてもよい。
 ログ読み込み部15は、ログ記憶部21から該当キーの更新情報を取得する。その為、ログ読み込み部15は、ログ管理情報記録部14から情報を取得した上で、該当キーの更新情報の格納されているアドレスに対して読み込み命令を実行する。また、ログ読み込み部15は、ログの末尾領域に対して更新されていないか読み込み命令を実行する。ログ読み込み部15は、この末尾に対する読み込み命令を、リクエストを処理するたびに実行してもよいし、投機的に実行してもよい。この詳細は、後述する。
 記憶部読み込み部16は、要求処理部12からのリクエストに応じて該当キーに対応するデータを新記憶部22あるいは通常記憶部23から読み込む。記憶部読み込み部16は、該当キーから格納先のアドレスを算出する方法として、種々の方法を採用することができる。また、記憶部読み込み部16は値取得のための読み込み要求を、理新記憶部22と通常記憶部23に対して同時並行で発行しても良いし、逐次的に発行しても良い。新記憶部22と通常記憶部23の双方に該当キーに対するデータが格納されている場合、記憶部読み込み部16は、新記憶部22に格納されている値を出力する。
 ログ変換部17は、ログ記憶部21に格納されている情報を変換して新記憶部22へ書き込む。またログ変換部17は、新記憶部22に格納されている情報を通常記憶部23に書き込む。ログ変換部17は、ある時間周期で定期的に処理を実行しても良いし、ログ記憶部21の利用容量が一定値を超えたときに行っても良い。
 外部記憶装置20は、データストアシステム90のデータを格納する記憶媒体であり、ログ記憶部21、新記憶部22、および、通常記憶部23の3つの領域を包含する。
 ログ記憶部21は、外部記憶装置20が担当するキー群の更新情報をジャーナルログ形式で格納する。ログ書き込み部13が、逐次的に更新情報をログ記憶部21に格納する。更新情報は、少なくとも、レコードのキーと、更新されたデータを格納する。また、更新情報は、バージョン情報や、それに類するベクタークロック、時刻情報を共に包含しても良い。それらの情報は、耐障害性のためにデータの複製を保持する際に複製間の整合性を確保するために用いられる。また、ログ記憶部21は、ウェアレベリングと呼ばれる技術による、書き込み対象の物理アドレスが平滑的に使われるような制御を行っても良い。
 新記憶部22は、ログ変換部17がログ記憶部21のログ情報を変換して格納する領域である。通常記憶部23は、最終的に識別子(キー)に対応するデータを保持する領域である。通常記憶部23は、いわゆる、データファイル形式、データベース形式のデータが格納される領域である。
[動作] 
{読み込み動作について}
 図5は、データストアシステム90の読み込み処理のフローチャートである。図5は、KVSシステムにおけるGET処理フローの例であるが、他のデータストアシステム90の参照処理も、ほぼ同種の処理となる。
 まず、データストアシステム90の利用者であるアプリケーションプログラム(あるいはユーザ)が、要求受付部11にリクエストを発行する(S11)。例えば、アプリケーションプログラムが要求受付部11であるライブラリを使用してリクエストを発行する。
 次に、要求処理部12は、該リクエストを受信して解釈する(S12)。要求処理部12は、要求受付部11が提供するAPI(Application Program Interface)の、どのAPIを通じて呼ばれたかによって異なる処理を実行する。GET処理であれば、引数としてデータのキーが指定されており、要求処理部12がこのキーを認識する。KVSシステム以外のデータベースシステムではSQLで命令を受け付けるため、要求処理部12は、SQLを解釈して実行処理に落とし込む。本ステップの処理は、例えば、クエリパーサーや、エクゼキューターが行う処理である。
 S12でGET処理であることを特定した後、要求処理部12は、ログ読み込み部15および記憶部読み込み部16に対して、指定されたキーのデータの取得を依頼する(S13)。次に、ログ読み込み部15および記憶部読み込み部16はそれぞれ該当キーのデータ取得処理を実行する(S14、S17)。要求処理部12は、ログ読み込み部15および記憶部読み込み部16を並列に起動しても良いし、ログ読み込み部15を先に起動しログ記憶部21からデータが得られなかったとき(S15でNO)、記憶部読み込み部16を起動しても良い。この選択は、例えば、データストアシステム90の設計者が、アプリケーションプログラムのレイテンシとデバイスへの負荷量とのトレードオフを考慮して、行えば良い。S14、S17の詳細については後述する。
 S14においてログ読み込み部15のGET処理が完了したら、要求処理部12は、この結果として該当キーに対する値(データ)を取得できたかどうかを判定する(S15)。ログ記憶部21内に該当キーに対するデータが含まれない場合(S15でNO)、要求処理部12は記憶部読み込み部16の結果を取得する(S18)。ログ読み込み部15が該当キーに対する値を取得できた場合(S15でYES)、要求処理部12は、ログ読み込み部15の結果を要求受付部11に対して応答する(S16)。
 S17では、記憶部読み込み部16が該当キーの値の取得処理を行う。要求処理部12は、記憶部読み込み部16が得た結果を、ログ読み込み部15により該キーのデータが取得されなかった場合に限り(S15でNO)、要求受付部11へ応答する(S18)。
 なお、ログ読み込み部15と記憶部読み込み部16がまとめて、読み込み部18として、実装された場合、読み込み部18は、S14乃至S16のステップを実行する。この場合、読み込み部18は、S14、S17相当の処理を、並列にも、上述の順番でも実行して良い。
{ログ読み込み部15の動作}
 図6A及びBは、ログ読み込み部15の処理フローチャートである。ログ読み込み部15は、図5のS14で起動されて以降の処理を実行する。なお、図6の例では、ログ読み込み部15はS21から始まるフローおよびS26から始まるフローを並行的に実行するが、この2つのフローを逐次的に実行しても良い。
 まず、S21から始まる処理フローについて説明する。このフローは、ログの最新データを取得するフローである。ログ読み込み部15は、データの最新値を応答する必要がある。データストアシステム90内の他の計算装置10(図1参照)がデータを書き変えている可能性が有るため、最新値を得るためには、ログ読み込み部15は他の計算装置10が追加した最新のログまでを取得する必要がある。
 まず、ログ読み込み部15は、ログ管理情報記録部14内の末尾アドレス管理部41から、ログの末尾アドレス情報を取得する(S21)。この末尾アドレスは、ログ管理情報記録部14が認識している情報であり、実際のログ記憶部21における末尾アドレスとは異なる可能性がある。その理由は、データストアシステム90内の他の計算装置10が、ログを追加しているかもしれないからである。
 次に、ログ読み込み部15は、ログ記憶部21内の末尾アドレスから一定サイズ分のデータの読み込み命令を発行し、データを取得する(S22)。このサイズは、不揮発性デバイスの最小書き込みサイズの定数倍とする。次に、ログ読み込み部15は、読み込んだデータの中身をチェックして、ログ情報が書き込まれているかどうか判定する(S23)。読み込んだデータに有効なログ情報が格納されている場合(S23でYES)、ログ読み込み部15はS24に進み、格納されていない場合(S23でNO)、S25へ進む。
 有効なログ情報が確認出来た場合(S23でYES)、ログ読み込み部15は最新ログまで読み込んだかどうか確認する(S24)。ログ読み込み部15は、読み込んだデータの途中までしか有効なログ情報が格納されていなければ、最新ログまで読み込んだと判断する。読み込んだデータの末尾まで有効ログが格納されている場合には、後続のログが有る可能性が有り、必ずしも最新ログまで読んだとは限らない。
 最新ログまで読み込んだと判断できない場合(S24でNO)、ログ読み込み部15は、S22に戻り後続のログを再度読む。読み込み対象は、前回のS22で読んだデータの続き(末尾アドレス以降)である。
 最新ログまで読み込んだことを確認できた場合(S24でYES)、ログ読み込み部15は、末尾アドレスが変わっている場合には、末尾アドレス管理部41およびログ記憶部アドレス管理部42の情報を更新する(S25)。なお、ログ読み込み部15は、本ステップを実行する代わりに、S22乃至24でログを読み込む度に末尾アドレス管理部41を更新しても良い。
 なお、読み込んだデータの最初から有効なログ情報が格納されていない場合も(S23でNO)、ログ読み込み部15は、最新ログまで読み込んだと判断してS25に進む。
 ログ読み込み部15は、S25の後、S29に進む。
 次に、S26から始まる動作フローについて説明する。まず、ログ読み込み部15は該当キーの格納先アドレスをログ記憶部アドレス管理部42から取得する(S26)。ログ読み込み部15は、ログ記憶部アドレス管理部42の情報からログ中に該当キーが含まれているかどうかを判定する(S27)。ログが該当キーを含む場合(S27でYES)、ログ読み込み部15はS28へ進み、含まない場合にはS29へ進む。該当キーを含む場合(S27でYES)、ログ読み込み部15は、ログ記憶部アドレス管理部42から得たアドレス情報を用いて読み込み命令をログ記憶部21に発行し、該当キーに対応するデータを取得する(S28)。
 S21から始まるフローと、S26から始まるフローの後に、ログ読み込み部15は、これまで取得したデータから要求受付部11へ応答すべき情報を特定する(S29)。まず、S21からS25までで得られた最新ログ(以降、差分ログ)情報が、該当キーに対応するデータを含む場合には、この差分ログ内の最新のデータを要求受付部11へ応答する(S2A、および、図5のS15およびS16)。この場合、ログ読み込み部15は、S26からS28までのフローの動作完了を待つ必要が無い。このように動作することで、ログ読み込み部15はレイテンシを短縮することが可能である。
 ここで、該当キーに対応する情報が、差分ログ内に含まれていないがログ記憶部21内のいずれかに含まれる場合には、ログ読み込み部15は、S26からS28までで得られたデータを要求受付部11へ応答する(S2B、及び、図5のS15およびS16)。また、該当キーに対応する情報が差分ログにもログ記憶部21にも含まれない場合には、ログ読み込み部15は、該当キーに対応する情報はログ記憶部21には含まれないと要求処理部12へ応答する(S2C)。この場合、要求処理部12は、記憶部読み込み部16の結果を要求受付部11へ応答する(図5のS18)。
{記憶部読み込み部16の動作}
 図7は、記憶部読み込み部16の処理フローチャートである。記憶部読み込み部16は、図5のS17で起動されて以降の処理を実行する。
 記憶部読み込み部16は、新記憶部22および通常記憶部23に対して読み込み命令を発行する(S31およびS34)。これら2つの読み込み命令は同時並行的に行われる。こうすることで、読み込みリクエストに対する応答時間(レイテンシ)が短縮される。なお、読み込みは逐次的に行っても良く、S31から始まる処理を行った後に、S34の処理を行っても良い。このような順にすることによって、不要なS34の処理を省略することができるために、外部記憶装置20への負荷が軽減される。
 記憶部読み込み部16は、同時並行的な読み込み(S31とS34)を行うかどうかを、データへのアクセスパターンに基づいて決めても良い。これらの同時並行的な読み込みは、キーに対するアクセスの偏りが大きいアプリケーションでは効果が比較的少なく、逆に偏りが小さい(均等にアクセスされる)場合には、効果が大きい。この事情は、ログ読み込み部15が行う、同時並行的な読み込み(S21とS26)にも当てはまる。なお、記憶部読み込み部16およびログ読み込み部15は、S21とS26、および、S31とS34の一方の組だけを並行的に処理し、他方は逐次的に処理しても良い。
 S31において、記憶部読み込み部16は、ハッシュ値計算などの手法を用いて、対象とするキーが新記憶部22の中のどのアドレスに格納されているかを算出する。S34においても、記憶部読み込み部16は、同様に、対象とするキーが通常記憶部23の中のどのアドレスに格納されているかを算出する。
 対象とするキーが新記憶部22の中に格納されている場合(S32でYES)、記憶部読み込み部16は、新記憶部22から取得したデータを出力する(S33)。対象とするキーが新記憶部22の中に格納されておらず(S32でNO)、通常記憶部23の中に格納されている場合(S35でYES)、記憶部読み込み部16は、通常記憶部23から取得したデータを出力する(S36)。対象とするキーが新記憶部22の中にも、通常記憶部23の中にも格納されていない場合(S32でNO、かつ、S35でNO)、記憶部読み込み部16は、対象とするキーのデータ無を報告する(S37)。
 {書き込み動作について}
 図8は、データストアシステム90の書き込み処理のフローチャートである。図8は、KVSシステムにおけるPUT処理フローの例であるが、他のデータストアシステム90の更新処理も、ほぼ同種の処理となる。
 まず、アプリケーションプログラムが要求受付部11を介してリクエストを発行し(S11)、要求処理部12がリクエストを解釈する(S12)。この2つのステップは、図5と同様である。
 次に、要求処理部12は、書き込み処理に必要なデータを取得する(S41)。このデータは、例えば、障害に備えて取得する複製間の整合をとるために必要となる、バージョン情報やベクタークロック情報である。すなわち、要求処理部12はここで、例えば、キーに対応したバージョン情報を取得する。
 要求処理部12は、バージョン情報をGET処理により得る。または、ログ管理情報記録部14内のログ記憶部アドレス管理部42にキーに対応したアドレスと共にバージョン情報を保持しておき、要求処理部12はバージョン情報をログ記憶部アドレス管理部42から得ても良い。
 また、CAW命令は、古いデータと比較した上で更新するかどうかを決める命令であり、例えば、ログ書き込み部13がCAS命令を使用するときは、データの古い値が必要となる。要求処理部12は、この値も事前にGET処理で得る。計算装置10の主記憶装置82が、このデータを保持していても良い。
 次に、要求処理部12は、ログ書き込み部13に更新情報を渡す(S42)。更新情報には、S41で得られた、例えば、バージョン情報と、要求受付部11が受け付けたリクエスト内の新しく書き込むデータが少なくとも含まれる。
 ログ書き込み部13は、ログ管理情報記録部14の末尾アドレス管理部41から末尾アドレスを取得し、ログ記憶部21の該アドレスに対し更新情報を書き込む(S43)。
 ログ書き込み部13は、この更新情報をバッファリングして、書き込みサイズを不揮発性記憶媒体であるログ記憶部21の最小書き込みサイズの定数倍(定数は、自然数)にして行っても良い。ログ書き込み部13は、例えば、不揮発性記憶媒体の最小書き込みサイズが4キロバイトのとき、更新情報が4キロバイトになるまで複数の書き込み命令を集約してから書き込みを実行する。このバッファリングは、不揮発性記憶媒体への書き込みデータ量を抑え、不揮発性記憶媒体の寿命を延長することが出来る。
 不揮発性記憶媒体の最小書き込みサイズより小さい書き込み命令は、実際には大きな容量の書き込みとなってしまう。例えば、更新情報が512キロバイトであっても、最小書き込みサイズが4キロバイトである場合には、記憶媒体には4キロバイトの書き込みが行われてしまう。
 なお、ログ書き込み部13は、このようなバッファリングを、外部記憶装置20に揮発性メモリを備えることで行っても良い。
 前述した通り、ログ書き込み部13は、ログ記憶部21への書き込みはCAW命令で行う。この時、CAW命令の比較データはログ記憶部21の初期化状態データ、あるいは、削除された状態を示すデータとする。このような比較を行う理由は、他の計算装置10によってログ書き込みが行われている可能性があるためである。CAW命令が失敗した場合、ログ書き込み部13は、新たに末尾アドレスを取得し再度CAW命令を行う。ログ書き込み部13は、これを成功するまで繰り返す(S43)。
 次に、ログ書き込み部13は、ログ管理情報記録部14の末尾アドレス管理部41およびログ記憶部アドレス管理部42の情報を更新する(S44)。最後に、ログ書き込み部13は要求処理部12へログ書き込み完了を通知し、これを受けて要求処理部12が要求受付部11へ処理の完了を通知する(S45)。S43において複数の書き込み命令をバッファリングして書き込みした場合、ログ書き込み部13は、バッファリングされたログ情報の書き込み命令が完了した後で通知する。
 {ログ変換部17の動作}
 図9は、ログ変換部17の処理フローチャートである。ログ変換部17は、ログ記憶部21のログデータを、新記憶部22、および、通常記憶部23のデータへ変換する。ログ変換部17は、一定期間ごと、あるいは、ログ記憶部21の利用容量が閾値を超えたとき起動される。
 まず、ログ変換部17は、ログ記憶部21の更新ログを先頭から変換容量分読み込む(S51)。変換対象ログは、変換処理開始時点のログ記憶部21に格納されている全ログでもよいし、所定割合のログ、例えば、全ログの80%、であっても良いし、所定容量のログであっても良い。
 次に、ログ変換部17は、読み込んだログ情報から、データ更新が有ったキー(被更新キー)、被更新キーに対応する更新データ、および、被更新キーに対するバージョン情報などのメタデータを抽出する(S52)。
 ログ変換部17は、新記憶部22に格納されているキーのリストを抽出する(S53)。ログ変換部17は、新記憶部22をこの契機で読み込んでも良いし、前回のログ変換処理にそのリスト情報を作成して、例えば、主記憶装置82に保存しておいても良い。
 続いてログ変換部17は、通常記憶部23に書き込むキーのリストを抽出する(S54)。ここで抽出するリストは、新記憶部22に書き込まれているキーのリストのうち、S52で抽出された被更新キーのリストに含まれないものである。
 次に、ログ変換部17は、S54で抽出されたキー群のデータを通常記憶部23に書き込み(S55)、被更新キー群とそれらに対応するデータを新記憶部22に一括のシーケンシャル書き込みとして書き込む(S56)。このとき、ログ変換部17は、書き込む更新情報が格納される十分な大きさを決定し、当該容量の新記憶部22を確保する。このサイズは、通常記憶部23に比べて小さく、不揮発性記憶媒体の最小書き込みサイズ、削除単位の定数倍であることが望ましい。
 なお、予め決定されたサイズの新記憶部22が固定的に確保されていても良い。この場合、ログ変換部17は、新記憶部22の容量が足りないときは、被更新キーの一部のキーについて、更新データを通常記憶部23へ書き込んでも良い(S55)。逆に、ログ変換部17は、新記憶部22の容量に余裕が有るときは、S54で抽出したリストのうち、幾つかを新記憶部22に残してもよい。その場合、残すキーは通常記憶部23へ書き込むリストからは取り除く。
 最後に、ログ変換部17は、ログ記憶部21から、今回変換されたログのデータを削除し、その領域を解放する(S57)。
{読み込みの集約}
 ログ記憶部21の末尾アドレスに対する読み込み命令(図6のS22)は、リクエスト毎に発行する必要がある。この読み込み命令の増大は、データストアシステム90の性能悪化を招く。これを防止する為、ログ読み込み部15は、複数のリクエストに対してこの読み込み命令を1度に集約しても良い。この集約を、読み込み集約と呼ぶ。
 図10は、ログ記憶部21に対する読み込み集約の概要を示す図である。本図のa)は、リクエストごとに読み込み命令を発行する場合の様子を示す。b)は、読み込み集約を行った場合の様子を示す。
 a)とb)の両方のケースで、要求処理部12は、4つのリクエスト(リクエスト1からリクエスト4まで)をログ読み込み部15に発行している。a)の場合、ログ読み込み部15は、これら4つのリクエストの各々に対し、ログ記憶部21に対する読み込み命令を発行している。一方、b)において、ログ読み込み部15は、最初のリクエスト1を受け付けてログ末尾読み込み命令を発行した後に、当該読み込みが完了する迄に受け取ったリクエスト2とリクエスト3に対してログ末尾読み込み命令を発行しない。リクエスト4はリクエスト1の結果を受け付けた後に受け取っているため、ログ読み込み部15は、再度ログの読み込み命令を発行しその返値を待つ。
 確実に最新状態のログを読み込むために、ログ読み込み部15は、インターコネクトネットワーク30の遅延を考慮して、ログ読み込み命令を発行するかどうかを決める。図11は、ログ読み込み部15によるログ読み込み命令の発行要否判断を説明する図である。
 本図のa)は、インターコネクトネットワーク30の遅延が小さい場合を示す。この場合、ログ読み込み部15は、リクエストを受け付けた時点でログ読み込み発行の要否を決定できる。一方、b)は、インターコネクトネットワーク30の遅延が大きな場合を示す。この場合、ログ記憶部21の状態とログ管理情報記録部14の情報とに差がある可能性が有るため、リクエスト4を受け付けた時点では、ログ読み込み部15はログ読み込み発行の要否を決定できない。そこで、ログ読み込み部15は、システムの遅延に基づいて返値が返ってきた時点以前で遅延時間分以内に到着した、即ち、b)における時間tが遅延時間以内である、リクエストに対してはログ読み込み命令を発行しても良い。
 具体的には、ログ読み込み部15は、以下のようにして、ログ記憶部21から応答が帰ってきた時点で、ログ読み込み発行の要否をチェックする。
1)ログ読み込み部15は、要求処理部12から受信してキューイングするリクエストに到着時刻を入れておく。
2)ログ読み込み部15は、ログ記憶部21から返値を受け取った時刻と,キューに含まれているリクエストの到着時刻を比較する。 
3)ログ読み込み部15は、リクエスト到着時刻が返値時刻の前であって一定時間以内ならば、即ち、b)における時間tが一定間以内ならば、新たな読み込み命令を発行する。
4)上述の一定時間は、パラメータで与えられる。この値は、インターコネクトネットワーク30の遅延時間+α程度の時間である。
 なお、上述した処理の一部は、計算装置10内の各部が実行するのではなく、外部記憶装置20に論理回路やプロセッサを設け、それらが実行しても良い。
[効果]
 本実施の形態の計算装置10は、不揮発性メモリデバイスの寿命延長を実現しつつ、当該デバイスを用いたストレージシステムの性能低下を抑制する。その理由は、ログ書き込み部13が、データベースなどである通常記憶部23のデータ更新をログ形式でログ記憶部21に格納し、ログ変換部17が、そのログに記録されたデータ更新を抽出してまとめ、新記憶部22にシーケンシャルに書き込むからである。これにより、計算装置10は、通常記憶部23へのランダム書き込みで発生するライト・アンプリケーションを抑制し、不揮発性メモリデバイスの寿命延長を実現する。計算装置10では、記憶デバイスのコントローラが、寿命延長のための特別な制御が必須ではなく、コントローラの負荷増大を抑制する。
 <第2の実施形態>
 本実施の形態のデータストアシステム90は、通常記憶部23を、第1の実施の形態とは異なる方法で管理する。その他の基本的な動作、構成は第1の実施の形態と同一であるため、当該部分の説明は省略する。
 図12は、本実施の形態における外部記憶装置20の構成を示す図である。本実施の形態における外部記憶装置20は、W個(Wは2以上の数)の通常記憶部23(通常記憶部23-1から通常記憶部23-Wまで)、を備える。さらに、外部記憶装置20は、通常記憶管理情報保持部24を備える。
 第1の発明の実施の形態においては、通常記憶部23への書き込みがランダム書き込みになり、不揮発性記憶媒体の寿命に悪影響を与える。これを防止するために、本実施の形態の外部記憶装置20は、複数の通常記憶部23を備えてデータを記録する。
 ログ変換部17は、新記憶部22に入っていたデータを通常記憶部23に移す際に、その契機で変換されるデータが全て格納できるサイズの通常記憶部23を作成する。そしてログ変換部17は、新記憶部22から通常記憶部23への書き込みをシーケンシャル書き込みとして実行する。ログ変換部17は、次の契機の通常記憶部23は前回に使用した通常記憶部23の後ろの空き通常記憶部23に作成する。
 また、本実施の形態の外部記憶装置20は、各通常記憶部23の管理情報格納域として通常記憶管理情報保持部24を備える。通常記憶管理情報保持部24は、各通常記憶部23の開始アドレス、未使用または使用中の状態表示、および、記憶しているキーのリストを保持する。キーのリストは、はブルームフィルタと呼ばれる技術で容量を圧縮できる。通常記憶管理情報保持部24が記憶する、未使用または使用中の状態表示は、初期状態は‘空き’で、ログ変換部17が、書き込み時に‘使用中’に変更し、後述するガベージコレクションで最新のデータが無くなったとき‘空き’に戻す。
 記憶部読み込み部16は、通常記憶管理情報保持部24の情報を用いて、該当キーの最も新しいデータを格納する通常記憶部23にアクセスすることで、該当キーのデータを取得する。なお、例えば、記憶部読み込み部16は、通常記憶管理情報保持部24に格納されている情報を計算装置10内にキャッシュすることで、読み込みを高速化できる。
 なお、計算装置10、例えば、ログ変換部17は、定期的に通常記憶部23のガベージコレクションに類する処理を実行する必要が有る。このガベージコレクションは、一般的なデータベースシステムで実施されている処理と類似する。
 <第3の実施形態>
 図3は、第2の実施の形態にかかる計算装置10の構成図である。この計算装置10は、読み込み部18とログ変換部17を備える。
 ログ変換部17は、識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶部23に格納されているデータ項目の更新ログを格納するログ記憶部21から、更新されたデータ項目の識別子と更新データを抽出する。その後、ログ変換部17は、抽出した識別子と更新データをまとめて、新記憶部22にシーケンシャルに書き込む。
 読み込み部18は、指定された識別子のデータ項目を、新記憶部22に格納されていれば新記憶部22から、格納されていなければ通常記憶部23から取得する。
 本実施の形態の計算装置10は、不揮発性メモリデバイスの寿命延長を実現しつつ、当該デバイスを用いたストレージシステムの性能低下を抑制する。その理由は、ログ書き込み部13が、データベースなどである通常記憶部23のデータ更新をログ形式でログ記憶部21に格納し、ログ変換部17が、そのログに記録されたデータ更新を抽出してまとめ、新記憶部22にシーケンシャルに書き込むからである。これにより、計算装置10は、通常記憶部23へのランダム書き込みで発生するライト・アンプリケーションを抑制し、不揮発性メモリデバイスの寿命延長を実現する。計算装置10では、記憶デバイスのコントローラが、寿命延長のための特別な制御が必須ではなく、コントローラの負荷増大を抑制する。
 以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
 この出願は、2015年05月11日に出願された日本出願特願2015-096308を基礎とする優先権を主張し、その開示の全てをここに取り込む。
 10  計算装置
 11  要求受付部
 12  要求処理部
 13  ログ書き込み部
 14  ログ管理情報記録部
 15  ログ読み込み部
 16  記憶部読み込み部
 17  ログ変換部
 20  外部記憶装置
 21  ログ記憶部
 22 新記憶部
 23 通常記憶部
 24 通常記憶管理情報保持部
 30 インターコネクトネットワーク
 41 末尾アドレス管理部
 42 ログ記憶部アドレス管理部
 81 CPU
 82 主記憶装置
 83 ネットワークインタフェース
 90 データストアシステム

Claims (10)

  1.  識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶手段に格納されている前記データ項目の更新ログを格納するログ記憶手段から、更新された前記データ項目の前記識別子と更新データを抽出して集め、新記憶手段にシーケンシャルに書き込む、ログ変換手段と、
     指定された前記識別子の前記データ項目を、前記新記憶手段に格納されていれば前記新記憶手段から、格納されていなければ前記通常記憶手段から取得する読み込み手段と、を備える計算装置。
  2.  前記ログ変換手段は、前記新記憶手段に格納されていた前記データ項目のうち、前記ログ記憶手段から抽出されなかった前記データ項目の一部分について、前記識別子と前記更新データを集めて前記新記憶手段にシーケンシャルに書き込み、その他の部分について、前記識別子をキーとするランダムアクセスにより前記通常記憶域の前記データ項目を前記更新データで更新する、請求項1の計算装置。
  3.  前記ログ変換手段は、前記新記憶手段に格納されていた前記データ項目のうち、前記ログ記憶手段から抽出されなかった前記データ項目について、前記識別子と前記更新データを集めて、複数ある前記通常記憶手段のうちの未使用な前記通常記憶手段にシーケンシャルに書き込んで、当該通常記憶手段を使用中とし、
     前記読み込み手段は、指定された前記識別子の前記データ項目のデータを、当該データ項目の最新データを格納する前記通常記憶手段から読み込む、請求項1乃至2の何れか1項の計算装置。
  4.  前記ログ記憶手段は、不揮発性記録媒体上に設けられており、
     前記更新ログをバッファに一時保存して、前記不揮発性記録媒体の書き込みサイズの倍数単位に前記ログ記憶手段に書き込むログ書き込み手段を備える、請求項1乃至3の何れか1項の計算装置。
  5.  前記更新ログ末尾へのポインタ情報を格納するログ管理情報記録手段を、さらに備え、
     前記読み込み手段は、前記ポインタ情報が示す前記ログ記憶手段の領域の読み込みが必要な時、先行する読み込み要求によって前記ポインタ情報が示す前記ログ記憶手段の領域が読み込み中であれば、新たな読み込み要求の発行を行わず、前記先行する読み込み要求で読み込まれた情報を参照する、請求項1乃至4の何れか1項の計算装置。
  6.  前記読み込み手段は、前記ログ記憶領域、前記新記憶手段、前記通常記憶手段に、読み込み要求を並行して発行し、指定された前記識別子の前記データ項目を、前記ログ記憶領域に格納されていれば前記ログ記憶領域から、前記ログ記憶領域に格納されていなくて前記新記憶手段に格納されていれば前記新記憶手段から、前記ログ記憶領域にも前記新記憶手段にも格納されていなければ前記通常記憶手段から取得する、請求項1乃至5の何れか1項の計算装置。
  7.  識別子によるランダムアクセスをされるデータ項目を複数格納する通常記憶手段に格納されている前記データ項目の更新ログを格納するログ記憶手段から、更新された前記データ項目の前記識別子と更新データを抽出して集め、新記憶手段にシーケンシャルに書き込み、
     指定された前記識別子の前記データ項目を、前記新記憶手段に格納されていれば前記新記憶手段から、格納されていなければ前記通常記憶手段から取得する、方法。
  8.  前記新記憶手段に格納されていた前記データ項目のうち、前記ログ記憶手段から抽出されなかった前記データ項目の一部分について、前記識別子と前記更新データを集めて前記新記憶手段にシーケンシャルに書き込み、その他の部分について、前記識別子をキーとするランダムアクセスにより前記通常記憶域のデータ項目を更新データで更新する、請求項7の方法。
  9.  前記新記憶手段に格納されていた前記データ項目のうち、前記ログ記憶手段から抽出されなかった前記データ項目について、前記識別子と前記更新データを集めて、複数ある前記通常記憶手段のうちの未使用な前記通常記憶手段にシーケンシャルに書き込んで、当該通常記憶手段を使用中とし、
     指定された前記識別子の前記データ項目のデータを、当該データ項目の最新データを格納する前記通常記憶手段から読み込む、請求項7乃至8の何れか1項の方法。
  10.  コンピュータに、請求項7乃至9の何れか1項の方法を実行させる、プログラムを記録した記録媒体。
PCT/JP2016/002262 2015-05-11 2016-05-09 計算装置、方法、及び、プログラム WO2016181640A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015-096308 2015-05-11
JP2015096308 2015-05-11

Publications (1)

Publication Number Publication Date
WO2016181640A1 true WO2016181640A1 (ja) 2016-11-17

Family

ID=57248939

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/002262 WO2016181640A1 (ja) 2015-05-11 2016-05-09 計算装置、方法、及び、プログラム

Country Status (1)

Country Link
WO (1) WO2016181640A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011515727A (ja) * 2008-02-12 2011-05-19 ネットアップ,インコーポレイテッド ハイブリッド媒体ストレージシステムアーキテクチャ
JP2013513186A (ja) * 2009-12-07 2013-04-18 マイクロソフト コーポレーション ハイブリッドストレージを使用したssdの寿命の延長
JP2014013562A (ja) * 2012-04-30 2014-01-23 Sap Ag 統合テーブルクエリ処理

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011515727A (ja) * 2008-02-12 2011-05-19 ネットアップ,インコーポレイテッド ハイブリッド媒体ストレージシステムアーキテクチャ
JP2013513186A (ja) * 2009-12-07 2013-04-18 マイクロソフト コーポレーション ハイブリッドストレージを使用したssdの寿命の延長
JP2014013562A (ja) * 2012-04-30 2014-01-23 Sap Ag 統合テーブルクエリ処理

Similar Documents

Publication Publication Date Title
US20090132621A1 (en) Selecting storage location for file storage based on storage longevity and speed
US20070162692A1 (en) Power controlled disk array system using log storage area
US10521345B2 (en) Managing input/output operations for shingled magnetic recording in a storage system
US9098209B2 (en) Communication via a memory interface
JP4464378B2 (ja) 同一データを纏める事で格納領域を節約する計算機システム、ストレージシステム及びそれらの制御方法
JP7135162B2 (ja) 情報処理システム、ストレージシステム及びデータ転送方法
WO2017025039A1 (zh) 一种面向闪存存储的数据访问方法及其装置
JP6713934B2 (ja) 記憶装置及びその動作方法並びにシステム
CN105897859B (zh) 一种存储系统
US11500572B2 (en) Method of optimizing performance of a data storage system
US7725654B2 (en) Affecting a caching algorithm used by a cache of storage system
US10346077B2 (en) Region-integrated data deduplication
US20140188824A1 (en) Reducing fragmentation in compressed journal storage
US11010091B2 (en) Multi-tier storage
JP7011156B2 (ja) ストレージ制御装置およびプログラム
US8799429B1 (en) Boot acceleration by consolidating client-specific boot data in a data storage system
US10430287B2 (en) Computer
US10235053B1 (en) Method and system for using host driver for flexible allocation fast-sideways data movements
US11315028B2 (en) Method and apparatus for increasing the accuracy of predicting future IO operations on a storage system
WO2016181640A1 (ja) 計算装置、方法、及び、プログラム
WO2018055686A1 (ja) 情報処理システム
JP6200100B2 (ja) 計算機システム
US20230297575A1 (en) Storage system and data cache method
CN117130565B (zh) 数据处理方法、装置、磁盘阵列卡及介质
JP7310110B2 (ja) ストレージ及び情報処理システム。

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: 16792369

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16792369

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP