WO2019030883A1 - 計算機システムおよびデータ処理方法 - Google Patents

計算機システムおよびデータ処理方法 Download PDF

Info

Publication number
WO2019030883A1
WO2019030883A1 PCT/JP2017/029031 JP2017029031W WO2019030883A1 WO 2019030883 A1 WO2019030883 A1 WO 2019030883A1 JP 2017029031 W JP2017029031 W JP 2017029031W WO 2019030883 A1 WO2019030883 A1 WO 2019030883A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
data
capacity
master
write request
Prior art date
Application number
PCT/JP2017/029031
Other languages
English (en)
French (fr)
Inventor
健太 藤山
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2017/029031 priority Critical patent/WO2019030883A1/ja
Priority to JP2019502821A priority patent/JP6663534B2/ja
Priority to US16/327,583 priority patent/US11030218B2/en
Publication of WO2019030883A1 publication Critical patent/WO2019030883A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3442Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for planning or managing the needed capacity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/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
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2035Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant without idle spare hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/82Solving problems relating to consistency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5014Reservation

Definitions

  • the present invention relates to an information system for multiplexing data.
  • KVS distributed key-value store
  • KVS is a type of distributed database.
  • an arbitrary "Key” is combined with "Value” of data to be stored, and Key and Value are stored as a pair. You can retrieve Value by specifying Key when retrieving saved data.
  • KVS it is easy to scale out the system because Value can be distributed and stored in multiple servers according to the Key. You can easily speed up the process by adding a server.
  • Replication is a technology for multiplexing data.
  • master data and replica data that is a replica of the master data are stored in different servers, and data is replicated between the servers.
  • Patent Document 1 discloses a method of dynamically changing the range range using server load information in order to improve the use efficiency of the storage capacity of the server in a hetero machine environment.
  • Patent No. 5853109 gazette
  • Patent Document 1 can not completely suppress the difference in free space between servers.
  • a data write request for requesting data registration may succeed in one of the master server and the slave server, and the data write request may fail in the other server. In that case, the master data and the replica data become inconsistent.
  • An object of the present invention is to provide a technique for suppressing inconsistencies in data stored in a plurality of servers performing replication.
  • a computer system is a computer system in which master data and replica data, which is a copy of the master data, are distributed and arranged in a plurality of server devices, and the storage area across the plurality of server devices
  • a management range is a range, and for each range, a master server which is a server apparatus in which the master data is arranged, and a slave server which is a server apparatus in which the replica data is arranged, control the total capacity dynamically.
  • An area is secured in advance, the usage status of the temporary area of the master server and the slave server is managed in a capacity management table, and the data write request is requested by a data write request for requesting data write.
  • a data processing unit which causes a write request to be executed by both the master server and the slave server, and when it is determined that the data write request is not executable, the data write request is not executed by either the master server or the slave server; And.
  • requests can be made equally successful or fail based on the determination result, and data consistency is improved, and multiple servers perform replication. Inconsistencies in data stored in can be suppressed.
  • FIG. 1 is a diagram for explaining replication of data in a computer system according to the present embodiment.
  • the information system has a plurality of server devices 200.
  • a cluster of storage devices is configured by a plurality of server devices 200 included in the information system.
  • Cluster management information 2B0 for managing a cluster is set in each server device 200.
  • Each server device 200 is provided with a distributed KVS data store 280 that combines a key of an arbitrary key (Key) with the value (Value) of data to be stored and stores the Key and the Value as a pair.
  • KVS KVS data store 280 that combines a key of an arbitrary key (Key) with the value (Value) of data to be stored and stores the Key and the Value as a pair.
  • master data and replica data are distributed and stored in different server apparatuses 200 as replication.
  • a management range of storage areas straddling a plurality of server devices 200 included in a cluster is set as a range.
  • Each range includes a temporary area 720 which is a storage area secured by each server device 200.
  • Master data and replica data are distributed and arranged in temporary areas 720 of a plurality of server devices 200 for each range.
  • One of the server devices 200 in the range is a master server, and the other server devices 200 are slave servers.
  • the master server receives a request from the client device 100 and plays a role of causing each server device 200 in the range to execute the request.
  • Master data is stored in the temporary area 720 of the master server, and replica data corresponding to the master data is stored in the temporary area 720 of the slave server.
  • the master server is provided with a capacity management table 290 for managing the storage capacity of the temporary area 720 of each server device 200 in the range.
  • the capacity management table 290 is set in the server device 200 (1).
  • the replica data is stored in the temporary area 720 (11) of 1), and the replica data is stored in the temporary area 720 (21) of the server device 200 (2).
  • the capacity management table 290 is set in the server device 200 (2), and the master data is stored in the server device 200.
  • the replica data is stored in the temporary area 720 (22) of (2), and the replica data is stored in the temporary area 720 (32) of the server device 200 (3).
  • capacity management table 290 is set in server device 200 (3), and master data is a server device.
  • the replica data is stored in the temporary area 720 (33) of 200 (3), and the replica data is stored in the temporary area 720 (13) of the server device 200 (1).
  • Each server device 200 is provided with a server management table 2A0 that manages information on temporary areas secured by the server device 200 for each range.
  • FIG. 2 is a block diagram showing the configuration of the information system and the server apparatus according to the present embodiment.
  • FIG. 3 is a block diagram showing the hardware configuration of the server device of this embodiment.
  • the information system includes a client device 100 and a server device 200.
  • a plurality of server devices 200 are connected to one another via a communication network 300.
  • the client device 100 is also connected to the server device 200 via the communication network 300.
  • the client device 100 can access each server device 200 via the communication network 300, and can record data or retrieve the recorded data.
  • the client device 100 has a data transmission / reception unit 110.
  • the data transmission / reception unit 110 transmits / receives data via the communication network 300.
  • the server apparatus 200 includes a data transmission / reception unit 210, a capacity management unit 220, an order distribution unit 230, a data processing unit 240, a start processing unit 250, a failover unit 260, a statistical information output unit 270, and a data store 280. It manages a table 290, a server management table 2A0, and cluster management information 2B0.
  • the capacity management unit 220 includes a capacity reservation unit 221, a reservation cancellation unit 222, a capacity supplementation unit 223, a correction result reflection unit 224, a capacity response unit 225, and a capacity adjustment unit 226.
  • the capacity management table 290 includes a server device ID 291, a temporary area size 292, and an in-use size 293.
  • the server management table 2A0 includes range ID 2A1, temporary area size upper limit 2A2, temporary area size 2A3, in-use size 2A4, number of requests 2A5, and maximum size 2A6 used by the request.
  • the cluster management information 2B0 includes a failure detection time 2B1.
  • the data store 280 stores master data and / or replica data on a temporary area (not shown).
  • master data A 281 and replica data C 282 are stored in the data store 280 of the server device 200 (1).
  • master data B 283 and replica data A 284 are stored in the data store 280 of the server device 200 (2).
  • master data C 285 and replica data B 286 are stored in the data store 280 of the server device 200 (3).
  • the processing performed by each of the data transmission / reception unit 210, the capacity management unit 220, the order distribution unit 230, the data processing unit 240, the activation processing unit 250, the failover unit 260, and the statistical information output unit 270 will be described later using flowcharts.
  • the capacity management table 290, the server management table 2A0, the cluster management information 2B0, and the statistical information 2C0 will also be described later.
  • the server device 200 includes a CPU 510, a network interface 520, a main storage 530, a secondary storage 540, and a bus 550 as hardware.
  • the CPU 510, the network interface 520, the main storage 530, and the secondary storage 540 are connected to the bus 550.
  • the CPU 510 can execute processing using the network interface 520, the main storage 530, and the secondary storage 540.
  • the data transmission / reception unit 210, the capacity management unit 220, the order distribution unit 230, the data processing unit 240, the activation processing unit 250, the failover unit 260, and the statistical information output unit 270 are stored in the main storage device 530 as software programs.
  • the functions of the respective units are realized by the CPU 510 executing the software program.
  • the data store 280 is provided on the main storage device 530, and the capacity management table 290, the server management table 2A0, and the cluster management information 2B0 are stored in the main storage device 530.
  • the data store 280 may provide part or all of the data on the secondary storage device 540 for the purpose of data backup.
  • the data store 280 may provide part or all of the data in the secondary storage device 540 when the capacity of the data increases.
  • FIG. 4 is a diagram for explaining the data structure in the data store.
  • the data is stored in the data store 280 of the server apparatus 200 by the distributed KVS.
  • KVS a value of data to be stored (value) is combined with an arbitrary key (key), and a pair of pairs is stored in the data store 280. It is possible to determine which of a plurality of server devices 200 stores data in the data store 280 based on the distribution function.
  • key and value pairs are recorded.
  • the value value1 is combined with the key key1, and they are recorded as a pair in the data store 280.
  • the value value2 is combined with the key key2 and they are recorded as a pair in the data store 280.
  • a value of value3 is combined with a key of key3 and they are recorded in the data store 280 as a pair.
  • FIG. 5 is a diagram showing an example of the capacity management table.
  • the capacity management table 290 is a table that is provided for each range and stores information related to the storage capacity of the temporary area provided for the range.
  • the capacity management table 290 is arranged in the server apparatus 200 which is the master of the range.
  • the server apparatus 200 in which the master data of the range is stored is the master of the range.
  • the capacity management table 290 includes a server device ID 291 for identifying each server providing a temporary area in the range, a size (temporary area size) 292 of the temporary area provided in the range by the server, The size (in-use size) 293 of the storage area already in use in the temporary area is recorded in association with it.
  • a temporary area (temporary area 720 (11) in FIG. 1) of 10 MB is secured for range 1 in the server apparatus with the server apparatus ID of 1 (server apparatus 200 (1) in FIG. 1).
  • the in-use size of the temporary area 720 (11) is 0 MB, that is, the temporary area 720 (11) is not used yet.
  • a temporary area (temporary area 720 (21) in FIG. 1) of 10 MB is secured for the range 1 in the server apparatus with the server apparatus ID 2 (server apparatus 200 (2) in FIG. 1).
  • the in-use size of the temporary area 720 (21) is 0 MB, that is, the temporary area 720 (21) is not used yet.
  • FIG. 6 is a diagram showing an example of the server management table.
  • the server management table 2A0 is provided for each server apparatus 200, and stores information on temporary areas provided by the server apparatus 200 to each range.
  • the server management table 2A0 has a range ID 2A1 identifying the range in which the server provides the temporary area 720, and the upper limit value of the size that can be provided as the temporary area 720 in the range (temporary area size upper limit) 2.) 2A2, size (temporary area size) 2A3 of temporary area 720 actually provided to the range, size (in-use size) 2A4 of storage area used in temporary area 720, and its temporary area
  • the number of requests dealt with at 720 (number of requests) 2A5 and the maximum size of the storage area used by one request (maximum size used by requests) 2A6 are recorded in association with each other.
  • the server apparatus 200 (1) can provide up to 10 MB of temporary area 720 to the range with a range ID of 1 (range 1), and actually 10 MB of temporary area 720 (temporary area 720 (11) in FIG. ) Is provided.
  • the in-use size of the temporary area 720 (11) is zero.
  • the temporary area 720 (11) has dealt with 1000 requests from the time of the previous statistical information output processing performed by the statistical information output unit 270. Further, among the requests that the temporary area 720 (11) has dealt with up to now, the maximum value of the size of the storage area used by the request is 1 KB.
  • the server apparatus 200 (1) can provide up to 20 MB of temporary area 720 in the range of the range ID of 3 (range 3), and the temporary area 720 of 20 MB (see FIG. ))).
  • the in-use size of the temporary area 720 (13) is zero.
  • the temporary area 720 (13) has dealt with 2000 requests from the time of the previous statistical information output processing performed by the statistical information output unit 270. Further, among the requests that the temporary area 720 (13) has dealt with up to now, the maximum value of the size of the storage area used by the request is 1 KB.
  • the statistical information output process performed by the statistical information output unit 270 will be described later.
  • FIG. 7 is a diagram showing an example of cluster management information.
  • the cluster management information 2B0 is disposed in each server device 200 that configures a cluster.
  • parameters used in the server device 200 configuring a cluster are set.
  • a time (fault detection time) 2B1 required to detect a fault is set.
  • Temporary area 720 has a size sufficient to handle the request requested within fault detection time 2B1.
  • the failure detection time 2B1 is set to 10 seconds as an example.
  • FIG. 8 is a diagram showing an example of statistical information.
  • the statistical information 2C0 is statistical information acquired regarding processing performed for each range in the server apparatus 200.
  • the statistical information 2C0 the number of processed requests of one second for each range in the server device 200 is acquired.
  • FIG. 8 exemplifies statistical information 2C0 acquired by the server device 200 (1).
  • the data transmission / reception unit 110 of the client device 100 determines the server device 200 of the transmission destination of the request from among the plurality of server devices 200 in which the data is distributed and stored in the distributed KVS, and makes a request to the determined server device 200 Send At that time, the data transmitting / receiving unit 110 can calculate the server apparatus 200 of the transmission destination of the request based on the output value of the distributed function obtained by inputting the key to the distributed function.
  • the request transmitted from the data transmission / reception unit 110 is received by the data transmission / reception unit 210 of the server device 200 and processed by the server device 200. Thereafter, a response is transmitted from the data transmitting / receiving unit 210 of the server device 200 to the client device 100.
  • the data transmission / reception unit 110 receives the response transmitted from the data transmission / reception unit 210 of the server device 200.
  • FIG. 9 is a flowchart of data transmission / reception processing by the data transmission / reception unit of the server device.
  • the data transmission / reception process is a process executed by the data transmission / reception unit 210 of the master server.
  • step S101 the data transmission / reception unit 210 of the master server receives a request from the data transmission / reception unit 110 of the client apparatus 100.
  • step S102 the data transmission / reception unit 210 requests the capacity reservation unit 221 of the capacity management unit 220 to execute a request.
  • the capacity reservation process performed by the capacity reservation unit 221 at this time will be described later.
  • step S103 the data transmitting / receiving unit 210 receives a response corresponding to the request from the capacity reservation unit 221 that has finished executing the request.
  • step S104 the data transmitting / receiving unit 210 transmits the received response to the data transmitting / receiving unit 110 of the client apparatus 100.
  • FIG. 10 is a flowchart of capacity reservation processing by the capacity reservation unit.
  • the capacity reservation process is a process executed by the capacity reservation unit 221 of the master server.
  • step S 201 the capacity reservation unit 221 receives a request execution request from the data transmission / reception unit 210.
  • step S202 the capacity reservation unit 221 obtains the key data and the value data in the request, measures the size thereof, and obtains the size of the storage area used to execute the request.
  • step S203 the capacity reservation unit 221 determines whether or not the request can be executed based on the size obtained in step S202 and the information registered in the capacity management table 290. Specifically, in step S204, the capacity reservation unit 221 determines whether the size obtained in step S202 is smaller than the temporary area size 292 of all the server apparatuses 200 included in the range. If the size obtained in step S202 is smaller than the temporary area size 292 of all the server devices 200, the request is executable. If the request can be executed, in step S205, the capacity reservation unit 221 determines whether the size obtained in step S202 is smaller than the free space of the temporary area 720 of all the server devices 200. The free space of the temporary area 720 can be calculated by equation (1).
  • step S206 (Temporary area size 292)-(Used size 293) ... (1) If there is any one server apparatus 200 where the free space in the temporary area is smaller than the size calculated in step S202 (no in step S205), the capacity reservation unit 221 determines in step S206 that the preceding request has been made. It waits for the execution to be completed, and returns to step S204. If the size obtained in step S202 is smaller than the free space of the temporary area 720 of all the server devices 200 (yes in step S205), the capacity reservation unit 221 is obtained in step S202 in step S207. The size is added to the in-use size 293 of the capacity management table 290. This is processing for reserving the storage area of the temporary area 720 on the capacity management table 290 in order to use it for executing the request. Next, in step S208, the capacity reservation unit 221 stores the information of the size obtained in step S202 in the request.
  • the capacity reservation unit 221 causes the order distribution unit 230 to execute order distribution processing in step S209.
  • the order delivery unit 230 delivers the request to the data processing unit 240 by full order delivery.
  • the order delivery unit 230 returns a response to the capacity reservation unit 221 based on the delivery result without waiting for the completion of the data processing unit 240.
  • the full order delivery is delivery in which the order of processing requests is aligned by a plurality of server devices 200.
  • the server apparatus 200 agrees with the other server apparatuses 200 on the processing order of requests according to a distributed agreement algorithm such as Paxos algorithm, and processes the requests in the agreed order. Data processing by the data processing unit 240 will be described later.
  • the capacity reservation unit 221 returns a response to the data transmission / reception unit 210 based on the processing result of the order distribution unit 230.
  • FIG. 11 is a flowchart of data processing by the data processing unit. Data processing is processing executed by the data processing unit 240 of both the master server and the slave server.
  • step S401 the data processing unit 240 first acquires information of the size stored in the request and obtained by the capacity reservation unit 221 in step S202.
  • step S402 the data processing unit 240 adds the size obtained by the capacity reservation unit 221 obtained in step S401 to the in-use size 2A4 of the server management table 2A0.
  • step S403 if the size determined by the capacity reservation unit 221 obtained in step S401 is larger than the maximum size 2A6 used by the request, the data processing unit 240 steps the maximum size 2A6 used by the request.
  • the size reserved by the capacity reservation unit 221 obtained in S401 is updated.
  • step S404 the data processing unit 240 increments (+1) the number of requests 2A5 in the server management table 2A0. Furthermore, in step S405, the data processing unit 240 registers the data distributed from the order distribution unit 230 in the data store 280. At this time, if the server apparatus 200 stores master data within the range where the data is stored, the data is stored as master data. If the server apparatus 200 itself stores replica data within the range in which the data is stored, the data is stored as replica data.
  • step S406 the data processing unit 240 subtracts the size used for the request execution from both the temporary area size 2A3 and the in-use size 2A4 of the server management table 2A0.
  • step S407 the data processing unit 240 notifies the reservation cancellation unit 222 of the server apparatus 200, which is the master server, that the data registration has been completed, that is, that the execution of the request has been completed.
  • the reservation cancellation process performed by the reservation cancellation unit 222 will be described later.
  • step S408 the data processing unit 240 requests the capacity compensating unit 223 of the server 200 to compensate the temporary area 720 for the storage area of the size used in the execution of the request.
  • the volume compensation process performed by the volume compensation unit 223 will be described later.
  • FIG. 12 is a flowchart of reservation cancellation processing by the reservation cancellation unit.
  • the reservation cancellation process is a process executed by the reservation cancellation unit 222 of the master server.
  • step S501 the reservation release unit 222 receives a notification of completion of request execution from the data processing unit 240 of the server apparatus 200 for which data registration has been completed.
  • step S 502 the reservation release unit 222 subtracts the size used for the request execution from both the temporary area size 292 and the in-use size 293 of the capacity management table 290. This is processing for releasing the storage area reserved on the capacity management table 290 for use in the execution of the request on the capacity management table 290 in step S207.
  • FIG. 13 is a flowchart of volume compensation processing by the volume compensation unit.
  • the capacity compensating process is a process executed by the capacity compensating unit 223 of both the master server and the slave server.
  • step S601 the capacity compensating unit 223 receives a request for securing the temporary area 720 from the data processing unit 240 of the server apparatus 200 or the capacity adjusting unit 226 of the server apparatus 200 which is a master server.
  • step S602 the capacity compensating unit 223 secures an area for the size requested to be secured in step S601.
  • To reserve an area means to fill (add) a storage area of the requested size from the data store 280 to the temporary area 720.
  • step S603 the capacity compensating unit 223 determines whether or not the compensation (securement) of the storage area of the size requested in step S601 has succeeded. If the area is successfully secured (yes in step S603), the capacity compensating unit 223 is the size in which the area is secured in the temporary area size 2A3 of the server management table 2A0 in step S604, that is, the storage area compensated in the temporary area 720. Add the size of Further, in step S605, the capacity supplementing unit 223 notifies the compensation result reflecting unit 224 of the server apparatus 200, which is the master server, that the area has been secured and the size of the secured area. The compensation result reflecting process performed by the compensation result reflecting unit 224 will be described later.
  • FIG. 14 is a flowchart of the compensation result reflecting process by the compensation result reflecting unit.
  • the compensation result reflecting process is a process executed by the compensation result reflecting unit 224 of the master server.
  • the filling result reflecting unit 224 receives the size (filling size) of the storage area compensated in the temporary area 720 from the capacity compensating unit 223 of the server apparatus 200 that has compensated the storage area in the temporary area 720 in step S701. .
  • the compensation result reflecting unit 224 adds the compensation size to the temporary area size 292 of the capacity management table 290.
  • FIG. 15 is a flowchart of activation processing by the activation processing unit.
  • the activation process is a process executed by the activation processing unit 250 of both the master server and the slave server.
  • step S801 the activation processing unit 250 activates a server process.
  • the server process is a process for operating as the server apparatus 200.
  • step S802 the start processing unit 250 secures a unique storage area of the range from the entire area of the main storage device 530 for each range including the storage area of the server apparatus 200.
  • the storage area is mainly secured from the main storage device 530, part or all may be secured from the secondary storage device 540.
  • step S803 the activation processing unit 250 generates a capacity management table 290 and a server management table 2A0, and reflects information on the size of the secured storage area on each table. Specifically, information on the size of the storage area secured in step S802 may be registered in the temporary area size 292 of the capacity management table 290 and the temporary area size 2A3 of the server management table 2A0.
  • step S804 the activation processing unit 250 starts acceptance of a request in the server device 200.
  • FIG. 16 is a flowchart of failover processing by the failover unit.
  • the failover process is a process that is executed by the failover unit 260 of the server device 200 that newly becomes the master server when a failure occurs in the master servers belonging to the same range.
  • step S901 the failover unit 260 detects a failure of the master server.
  • step S902 the failover unit 260 executes failover. Failover means that the own server device 200 becomes a master server instead of the master server where a failure occurs.
  • step S 903 the failover unit 260 transmits an acquisition request requesting acquisition of the temporary area size 2 A 3 and the in-use size 2 A 4 to the capacity response unit 225 of each server device 200 belonging to the range. At this time, the capacity response process performed by the capacity response unit 225 will be described later.
  • step S904 the failover unit 260 receives information on the temporary area size 2A3 and the in-use size 2A4 from the capacity response unit 225 of each server device 200 belonging to the range.
  • step S 905 the failover unit 260 generates the capacity management table 290, and the temporary area size 2 A 3 and the in-use size 2 A 4 received from the capacity response unit 225 of the server apparatus 200 belonging to the range are compared with those of the capacity management table 290. Reflect on temporary area size 292 and in-use size 293.
  • the failover unit 260 causes the server 200 to start accepting requests.
  • FIG. 17 is a flowchart of a capacity response process by the capacity response unit.
  • the capacity response process is a process executed by the capacity response unit 225 of both the master server and the slave server.
  • step SA01 the capacity response unit 225 receives an acquisition request for requesting acquisition of the temporary area size 2A3 and the in-use size 2A4 from the server apparatus 200 that is executing the failover process by the failover unit 260.
  • step SA02 the capacity response unit 225 acquires the temporary area size 2A3 from the server management table 2A0.
  • step SA03 the capacity response unit 225 acquires the in-use size 2A4 from the server management table 2A0.
  • step SA04 the capacity response unit 225 receives the temporary area size 2A3 and the in-use size 2A4 acquired by the server unit 200 that is executing the failover process by the failover unit 260, that is, the server that transmitted the acquisition request. Send to device 200.
  • FIG. 18 is a flowchart of statistical information output processing by the statistical information output unit.
  • the statistical information output process is a process executed by the statistical information output unit 270 of the master server.
  • the statistical information output unit 270 periodically executes statistical information output processing in a fixed cycle. In this embodiment, statistical information output processing is performed at an interval of one second.
  • the statistical information output unit 270 acquires the number of requests 2A5 in the server management table 2A0.
  • the statistical information output unit 270 records the number of requests 2A5 in the server management table 2A0 acquired in step SB01 in the number of requests (number / second) in the statistical information 2C0. Further, the statistical information output unit 270 sets (clears) the number of requests 2A5 in the server management table 2A0 to 0 in step SB03.
  • FIG. 19 is a flowchart of capacity adjustment processing by the capacity adjustment unit.
  • the capacity adjustment process is a process executed by the capacity adjustment unit 226 of the master server.
  • the capacity adjustment unit 226 periodically executes the capacity adjustment process in a fixed cycle.
  • the cycle of the capacity adjustment process is set to a time longer than the cycle of the statistical information output process.
  • the capacity adjustment unit 226 acquires the maximum value of the number of requests (number / second) in the statistical information 2C0 starting from the timing at which the previous capacity adjustment processing was performed.
  • the maximum number of requests among the number of requests recorded after the previous capacity adjustment processing may be acquired.
  • step SC02 the capacity adjustment unit 226 acquires the failure detection time 2B1 of the cluster management information 2B0. Furthermore, in step SC03, the capacity adjustment unit 226 acquires the maximum size 2A6 used by the request of the server management table 2A0.
  • step SC04 the capacity adjustment unit 226 calculates the size of the temporary area 720 that can be used within the failure detection time according to equation (2).
  • step SC05 the capacity adjustment unit 226 compares the value calculated by the above equation (2) with the temporary area size upper limit 2A2 of the server management table 2A0. If the value calculated by Expression (2) is equal to or less than the temporary area size upper limit 2A2 of the server management table 2A0 (No in step SC06), the capacity adjustment unit 226 ends the capacity adjustment process.
  • step SC06 If the value calculated by the equation (2) is larger than the temporary area size upper limit 2A2 of the server management table 2A0 (yes in step SC06), the capacity adjustment unit 226 determines in step SC07 whether or not each server device 200 belongs to the range. A securement request is issued to the capacity compensating unit 223 to secure the temporary area 720 by the difference between the value calculated by the equation (2) and the temporary area size upper limit 2A2.
  • the capacity adjustment unit 226 sets the value calculated by the equation (2) as a new value of the temporary area size upper limit 2A2 of the server management table 2A0.
  • the information system is a computer system that distributes and arranges master data and replica data, which is a copy of the master data, to a plurality of server devices, and includes a capacity management unit 220 and a data processing unit 240.
  • the capacity management unit 220 has a management range of storage areas across a plurality of server devices 200 as a range, and is a server device 200 where the master server, which is the server device 200 where master data is arranged, and replica data is arranged for each range.
  • a temporary area 720 for dynamically controlling the total capacity is secured in advance.
  • the capacity management unit 220 manages the usage status of the temporary area 720 of the master server and slave server in the capacity management table 290, and the range to which the data requested to be written by the data write request to request data write belongs. Based on the usage status of the temporary area 720 of the master server and the usage status of the temporary area 720 of the slave server in the capacity management table 290, it is determined whether or not the data write request can be executed.
  • the data processing unit 240 When it is determined by the capacity management unit 220 that the data write request is executable, the data processing unit 240 causes both the master server and the slave server to execute the data write request.
  • the temporary area of the master server to be used for master data and the temporary area of the slave server to be used for replica data of the master server and the slave server in the capacity management table 290 are collectively managed by the capacity management table 290 in the capacity management table 290. Since the determination is made based on the usage status of the temporary area, even if there is a difference in free space between the master server and the slave server, requests can be equally successful or fail based on the determination result, and data consistency is improved. Can.
  • capacity management unit 220 can execute the data write request. If there is no free space enough to write the data of the data write request in the temporary area 720 of either or both of the master server and the slave server, it is determined that the data write request is not executable.
  • the data write request can be executed when there is free space enough to write data in the temporary area of both the master server and slave server, so the judgment result even if there is a difference in free space between the master server and slave server
  • the request can be equally successful or unsuccessful based on the and the data consistency can be improved.
  • the capacity management unit 220 writes data when there is insufficient free space for a data write request in one or both of the temporary area 720 of the master server and the temporary area 720 of the slave server in the capacity management table 290. It waits for completion of the preceding request requested prior to the request, and determines that the data writing request is executable when the shortage of the free space is eliminated by the completion of the preceding request.
  • the request can be executed, and the request can be executed more often.
  • the order distribution unit 230 causes the master server and the slave server to execute the data writing request so that the execution order of the requests is aligned between the master server and the slave server.
  • the temporary area 720 of the server device 200 is secured from the main storage device 530. Consistency between the server devices 200 can be guaranteed even if the main storage device 530, which has a relatively high cost to provide sufficient capacity, runs short.
  • the capacity management unit 220 reserves a storage area of the temporary area 720 on the capacity management table 290 before using the data write request to execute the data write request.
  • the storage area reserved for using the data write request for execution is released on the capacity management table 290.
  • the capacity management unit 220 measures the storage capacity used to execute the request when the request is executed in the past, and based on the statistical information in which the information of the storage capacity is accumulated, Control the total capacity.
  • the capacity management unit 220 is a capacity obtained by multiplying the number of requests generated in the past per unit time per unit time, a predetermined time (fault detection time), and the capacity used for one request at maximum.
  • the total capacity of the temporary area 720 is controlled to be
  • the capacity management unit 220 when the slave server becomes a new master server due to a failure of the master server, the capacity management unit 220 generates a capacity management table 290 on the new master server.
  • DESCRIPTION OF SYMBOLS 100 ... Client apparatus, 110 ... Data transmission / reception part, 200 ... Server apparatus, 210 ... Data transmission / reception part, 220 ... Capacity management part, 221 ... Capacity reservation part, 222 ... Reservation cancellation part, 223 ... Capacity replenishment part, 224 ... Completion result Reflecting part 225
  • Capacity responding part 226 Capacity adjusting part 230
  • Order distributing part 240 Data processing part 250
  • Statistical information output part 280 Data store 300 ... communication network, 510 ... CPU, 520 ... network interface, 530 ... main storage, 540 ... secondary storage, 550 ... bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

レプリケーションを行う複数のサーバに保存されたデータが不整合となるのを抑制する。容量管理部は、総容量を動的に制御する一時領域を予め確保し、マスタサーバおよびスレーブサーバの一時領域の使用状況を容量管理テーブルにて管理し、データの書き込みを要求するデータ書き込みリクエストにて書き込みが要求されたデータの容量管理テーブルにおけるマスタサーバの一時領域の使用状況およびスレーブサーバの一時領域の使用状況に基づいて、データ書き込みリクエストの実行の可否を判定する。データ処理部は、容量管理部にてそのデータ書き込みリクエストが実行可能であると判定されたらそのデータ書き込みリクエストをマスタサーバおよびスレーブサーバの双方に実行させ、データ書き込みリクエストが実行可能でないと判定されたらデータ書き込みリクエストをマスタサーバおよびスレーブサーバのいずれにも実行させない。

Description

計算機システムおよびデータ処理方法
 本発明は、データを多重化する情報システムに関する。
 分散データベースの一種として分散Key-Valueストア(KVS)がある。KVSでは、保存したいデータの「値(Value)」に任意の「キー(Key)」を組み合わせ、KeyとValueを一組のペアとして保存する。保存しておいたデータを取り出すときKeyを指定すればValueを取り出すことができる。分散KVSでは、Keyに応じて、Valueを複数台のサーバに分散して保存できるためシステムのスケールアウトが容易である。サーバを追加することで容易に処理を高速化できる。
 また、分散KVSではレプリケーションが利用される。レプリケーションは、データを多重化する技術である。レプリケーションでは、マスタデータとその複製であるレプリカデータがそれぞれ異なるサーバに格納され、それらのサーバ間でデータが複製される。
 しかし、サーバ毎に容量が異なるヘテロ環境のシステムでは、マスタデータが格納されるサーバ(マスタサーバ)とレプリカデータが格納されるサーバ(スレーブサーバ)とで空き容量が異なるケースがある。
 また、データ数がサーバ間で均等でない場合にも空き容量がマスタサーバとスレーブサーバで異なるケースがある。マスタサーバとスレーブサーバで空き容量が異なる場合、データの書き込みを要求するデータ書き込みリクエストが発生したとき、マスタサーバとスレーブサーバのうち、あるサーバだけがリクエストを実行することができるだけの空き容量がない状態(容量不足)となることがある。容量不足が発生したサーバではデータ書き込みリクエストが失敗し、容量不足が発生していなかったサーバではデータ書き込みリクエストが成功するという事態が生じる。データ書き込みリクエストが失敗すると、要求されたデータがサーバに書き込まれない。データ書き込みリクエストが成功すると、要求されたデータがサーバに書き込まれる。マスタサーバとスレーブサーバのうち、あるサーバにデータが書き込まれ、他のサーバには同じデータが書き込まれないと、マスタデータとレプリカデータとが不整合となってしまう。
 特許文献1には、ヘテロなマシン環境において、サーバの記憶容量の使用効率を向上するために、サーバの負荷情報を利用してレンジ範囲を動的に変更する手法が開示されている。
特許5853109号公報
 しかしながら、特許文献1の手法では、サーバ間の空き容量の差異を完全に抑止することができない。マスタサーバとスレーブサーバのうち、いずれか一方のサーバではデータの登録を要求するデータ書き込みリクエストが成功し、他方のサーバではデータ書き込みリクエストが失敗することがある。その場合、マスタデータとレプリカデータとが不整合となる。レプリケーションを利用するシステムでは、マスタサーバとスレーブサーバをなす複数のサーバ同士でデータが不整合となるのは不都合である。
 本発明の目的は、レプリケーションを行う複数のサーバに保存されたデータが不整合となるのを抑制する技術を提供することである。
 本発明の一つの実施態様に従う計算機システムは、マスタデータと前記マスタデータの複製であるレプリカデータを複数のサーバ装置に分散して配置する計算機システムであって、前記複数のサーバ装置にわたる記憶領域の管理範囲をレンジとし、該レンジ毎に、前記マスタデータが配置されるサーバ装置であるマスタサーバと前記レプリカデータが配置されるサーバ装置であるスレーブサーバとにおいて、総容量を動的に制御する一時領域を予め確保し、前記マスタサーバおよび前記スレーブサーバの一時領域の使用状況を容量管理テーブルにて管理し、データの書き込みを要求するデータ書き込みリクエストにて書き込みが要求された前記データが属するレンジの容量管理テーブルにおける前記マスタサーバの一時領域の使用状況および前記スレーブサーバの一時領域の使用状況に基づいて、前記データ書き込みリクエストの実行の可否を判定する容量管理部と、前記容量管理部にて該データ書き込みリクエストが実行可能であると判定されたら該データ書き込みリクエストを前記マスタサーバおよび前記スレーブサーバの双方に実行させ、前記データ書き込みリクエストが実行可能でないと判定されたら該データ書き込みリクエストを前記マスタサーバおよび前記スレーブサーバのいずれにも実行させないデータ処理部と、を有する。
 本発明によれば、マスタサーバとスレーブサーバで空き容量の差異があっても、判定結果に基づきリクエストを等しく成功あるいは失敗させることができ、データの一貫性を向上させ、レプリケーションを行う複数のサーバに保存されたデータが不整合となるのを抑制することができる。
本実施形態による計算機システムにおけるデータのレプリケーションについて説明するための図である。 本実施形態による情報システムおよびサーバ装置の構成を示すブロック図である。 本実施形態のサーバ装置のハードウェア構成を示すブロック図である。 データストア内のデータ構造を説明するための図である。 容量管理テーブルの一例を示す図である。 サーバ管理テーブルの一例を示す図である。 クラスタ管理情報の一例を示す図である。 統計情報の一例を示す図である。 サーバ装置のデータ送受信部によるデータ送受信処理のフローチャートである。 容量予約部による容量予約処理のフローチャートである。 データ処理部によるデータ処理のフローチャートである。 予約解除部による予約解除処理のフローチャートである。 容量補填部による容量補填処理のフローチャートである。 補填結果反映部による補填結果反映処理のフローチャートである。 起動処理部による起動処理のフローチャートである。 フェールオーバ部によるフェールオーバ処理のフローチャートである。 容量応答部による容量応答処理のフローチャートである。 統計情報出力部による統計情報出力処理のフローチャートである。 容量調整部による容量調整処理のフローチャートである。
 以下、本発明の実施形態について図面を参照して説明する。
 図1は、本実施形態による計算機システムにおけるデータのレプリケーションについて説明するための図である。
 本実施形態による情報システムは複数のサーバ装置200を有している。情報システムに含まれる複数のサーバ装置200により記憶装置のクラスタが構成されている。クラスタを管理するためのクラスタ管理情報2B0が各サーバ装置200に設定されている。
 各サーバ装置200は、保存したいデータの値(Value)に任意のキー(Key)を組み合わせてKeyとValueをペアで保存する分散KVSのデータストア280を備えている。分散KVSにおいては、レプリケーションとして、マスタデータとレプリカデータが異なるサーバ装置200に分散して格納される。
 クラスタに含まれる複数のサーバ装置200をまたぐ記憶領域の管理範囲がレンジとして設定されている。各レンジは、各サーバ装置200にて確保された記憶領域である一時領域720を含む。レンジ毎にマスタデータとレプリカデータが複数のサーバ装置200の一時領域720に分散して配置される。
 レンジ内のいずれかのサーバ装置200がマスタサーバとなり、それ以外のサーバ装置200がスレーブサーバとなる。マスタサーバは、クライアント装置100からリクエストを受信し、レンジ内の各サーバ装置200にリクエストを実行させる役割を果たす。マスタサーバの一時領域720にはマスタデータが格納され、スレーブサーバの一時領域720にはそのマスタデータに対応するレプリカデータが格納される。マスタサーバには、そのレンジの各サーバ装置200の一時領域720の記憶容量を管理する容量管理テーブル290が設けられる。マスタサーバに障害が発生するとフェールオーバが発生し、他のサーバ装置200が新たなマスタサーバとなる。
 例えば、サーバ装置200(1)とサーバ装置200(2)にまたがるように設定されたレンジ1は、サーバ装置200(1)に容量管理テーブル290が設定されており、マスタデータがサーバ装置200(1)の一時領域720(11)に格納され、レプリカデータがサーバ装置200(2)の一時領域720(21)に格納される。
 同様に、サーバ装置200(2)とサーバ装置200(3)にまたがるように設定されたレンジ2は、サーバ装置200(2)に容量管理テーブル290が設定されており、マスタデータがサーバ装置200(2)の一時領域720(22)に格納され、レプリカデータがサーバ装置200(3)の一時領域720(32)に格納される。
 また同様に、サーバ装置200(3)とサーバ装置200(1)にまたがるように設定されたレンジ3は、サーバ装置200(3)に容量管理テーブル290が設定されており、マスタデータがサーバ装置200(3)の一時領域720(33)に格納され、レプリカデータがサーバ装置200(1)の一時領域720(13)に格納される。
 各サーバ装置200には、そのサーバ装置200が各レンジのために確保した一時領域の情報を管理するサーバ管理テーブル2A0が設けられる。
 図2は、本実施形態による情報システムおよびサーバ装置の構成を示すブロック図である。図3は、本実施形態のサーバ装置のハードウェア構成を示すブロック図である。
 図2を参照すると、情報システムでは、クライアント装置100とサーバ装置200が含まれる。複数のサーバ装置200が通信ネットワーク300を介して相互に接続されている。クライアント装置100も通信ネットワーク300を介してサーバ装置200と接続されている。クライアント装置100は通信ネットワーク300経由で各サーバ装置200にアクセスし、データを記録したり、記録したデータを取り出したりすることができる。
 クライアント装置100はデータ送受信部110を有している。データ送受信部110は通信ネットワーク300経由でデータを送受信する。
 サーバ装置200は、データ送受信部210、容量管理部220、順序配信部230、データ処理部240、起動処理部250、フェールオーバ部260、統計情報出力部270、およびデータストア280を有し、容量管理テーブル290、サーバ管理テーブル2A0、およびクラスタ管理情報2B0を管理している。容量管理部220には、容量予約部221、予約解除部222、容量補填部223、補填結果反映部224、容量応答部225、および容量調整部226が含まれている。容量管理テーブル290には、サーバ装置ID 291、一時領域サイズ292、および使用中サイズ293が含まれている。サーバ管理テーブル2A0には、レンジID 2A1、一時領域サイズ上限値2A2、一時領域サイズ2A3、使用中サイズ2A4、リクエスト件数2A5、およびリクエストが使用する最大サイズ2A6が含まれている。クラスタ管理情報2B0には、障害検知時間2B1が含まれている。
 データストア280には不図示の一時領域上にマスタデータおよび/またはレプリカデータが格納される。例えば、サーバ装置200(1)のデータストア280には、マスタデータA 281とレプリカデータC 282が格納されている。同様に、サーバ装置200(2)のデータストア280には、マスタデータB 283とレプリカデータA 284が格納されている。同様に、サーバ装置200(3)のデータストア280には、マスタデータC 285とレプリカデータB 286が格納されている。
 データ送受信部210、容量管理部220、順序配信部230、データ処理部240、起動処理部250、フェールオーバ部260、および統計情報出力部270のそれぞれが実行する処理はフローチャートを用いて後述する。容量管理テーブル290、サーバ管理テーブル2A0、クラスタ管理情報2B0、および統計情報2C0についても後述する。
 図3を参照すると、サーバ装置200は、ハードウェアとして、CPU510、ネットワークインタフェース520、主記憶装置530、二次記憶装置540、およびバス550を有している。CPU510、ネットワークインタフェース520、主記憶装置530、および二次記憶装置540がバス550に接続されている。CPU510は、ネットワークインタフェース520、主記憶装置530、および二次記憶装置540を利用して処理を実行することができる。
 データ送受信部210、容量管理部220、順序配信部230、データ処理部240、起動処理部250、フェールオーバ部260、および統計情報出力部270は、ソフトウェアプログラムとして主記憶装置530に格納されている。CPU510がそのソフトウェアプログラムを実行することにより各部の機能が実現される。
 データストア280は主記憶装置530上に設けられ、また容量管理テーブル290、サーバ管理テーブル2A0、およびクラスタ管理情報2B0は主記憶装置530に格納されている。ただし、データストア280は、データのバックアップを目的として、データの一部または全部を二次記憶装置540上に設けることにしてもよい。また、データストア280は、データの容量が大きくなってきた場合に、データの一部または全部を二次記憶装置540に設けることにしてもよい。
 図4は、データストア内のデータ構造を説明するための図である。データは分散KVSによりサーバ装置200のデータストア280内へ保存される。KVSでは、保存すべきデータの値(value)に任意のキー(key)が組み合わされ、一組のペアがデータストア280に格納される。複数あるうちのどのサーバ装置200のデータストア280にデータが保存されたかは分散関数に基づいて決定することができる。
 図4を参照すると、データストア280内では、keyとvalueのペアが記録されている。例えば、value1という値にkey1というキーが組み合わされて、それらがペアとしてデータストア280に記録されている。同様に、value2という値にkey2というキーが組み合わされて、それらがペアとしてデータストア280に記録されている。value3という値にkey3というキーが組み合わされて、それらがペアとしてデータストア280に記録されている。
 図5は、容量管理テーブルの一例を示す図である。容量管理テーブル290は、レンジ毎に設けられ、そのレンジに提供された一時領域の記憶容量に関する情報が格納されるテーブルである。容量管理テーブル290は、そのレンジのマスタであるサーバ装置200に配置される。そのレンジのマスタデータが格納されるサーバ装置200がそのレンジのマスタである。図5を参照すると、容量管理テーブル290には、レンジに一時領域を提供する各サーバを識別するサーバ装置ID 291と、そのサーバがレンジに提供する一時領域のサイズ(一時領域サイズ)292と、その一時領域の中で既に使用中となっている記憶領域のサイズ(使用中サイズ)293とが対応づけて記録されている。
 例えば、サーバ装置IDが1のサーバ装置(図1のサーバ装置200(1))には10MBの一時領域(図1の一時領域720(11))がレンジ1のために確保されている。その一時領域720(11)の使用中サイズが0MBであり、つまり一時領域720(11)はまだ使用されていない。また、サーバ装置IDが2のサーバ装置(図1のサーバ装置200(2))には10MBの一時領域(図1の一時領域720(21))がレンジ1のために確保されている。その一時領域720(21)の使用中サイズが0MBであり、つまり一時領域720(21)はまだ使用されていない。
 図6は、サーバ管理テーブルの一例を示す図である。サーバ管理テーブル2A0は、サーバ装置200毎に設けられ、そのサーバ装置200が各レンジに提供する一時領域に関する情報が格納される。図6を参照すると、サーバ管理テーブル2A0には、当該サーバが一時領域720を提供するレンジを識別するレンジID 2A1と、そのレンジに一時領域720として提供できるサイズの上限値(一時領域サイズ上限値)2A2と、実際にそのレンジに提供している一時領域720のサイズ(一時領域サイズ)2A3と、一時領域720の中で使用された記憶領域のサイズ(使用中サイズ)2A4と、その一時領域720で対処したリクエストの件数(リクエスト件数)2A5と、1つのリクエストが使用する記憶領域の最大のサイズ(リクエストが使用する最大サイズ)2A6とが対応づけて記録されている。
 例えば、サーバ装置200(1)はレンジIDが1のレンジ(レンジ1)に、一時領域720を10MBまで提供することができ、実際に10MBの一時領域720(図1の一時領域720(11))を提供している。一時領域720(11)の使用中サイズは0である。一時領域720(11)は、統計情報出力部270によって実行された前回の統計情報出力処理時点から、リクエスト1000件に対処している。また、一時領域720(11)がこれまでに対処したリクエストのうち、リクエストが使用する記憶領域のサイズの最大値は1KBである。同様に、サーバ装置200(1)はレンジIDが3のレンジ(レンジ3)に、一時領域720を20MBまで提供することができ、実際に20MBの一時領域720(図1の一時領域720(13))を提供している。一時領域720(13)の使用中サイズは0である。一時領域720(13)は、統計情報出力部270によって実行された前回の統計情報出力処理時点から、リクエスト2000件に対処している。また、一時領域720(13)がこれまでに対処したリクエストのうち、リクエストが使用する記憶領域のサイズの最大値は1KBである。統計情報出力部270が実行する統計情報出力処理については後述する。
 図7は、クラスタ管理情報の一例を示す図である。クラスタ管理情報2B0は、クラスタを構成する各サーバ装置200に配置される。クラスタ管理情報2B0は、クラスタを構成するサーバ装置200にて使用されるパラメータが設定される。図7を参照すると、障害を検知するのに要する時間(障害検知時間)2B1が設定されている。一時領域720には、障害検知時間2B1内に要求されるリクエストに対処できだけのサイズが確保される。図7では、具体的には、一例として、障害検知時間2B1が10秒と設定されている。
 図8は、統計情報の一例を示す図である。統計情報2C0は、サーバ装置200においてレンジ毎に行った処理に関して取得した統計情報である。本実施形態では、統計情報2C0として、サーバ装置200におけるレンジ毎の一秒毎のリクエストの処理件数が取得される。図8には、サーバ装置200(1)にて取得された統計情報2C0が例示されている。
 例えば、時刻2017/1/1 00:00:01に取得された情報によれば、レンジIDが1であるレンジ(レンジ1)におけるリクエストが1秒間に1000件処理されたことが示されている。また、時刻2017/1/1 00:00:01に取得された情報によれば、レンジIDが3であるレンジ(レンジ3)におけるリクエストが1秒間に2000件処理されたことが示されている。また、時刻2017/1/1 00:00:02に取得された情報によれば、レンジ1におけるリクエストが1秒間に1500件処理されたことが示されている。また、時刻2017/1/1 00:00:02に取得された情報によれば、レンジ3におけるリクエストが1秒間に500件処理されたことが示されている。
 <データ送受信>
 クライアント装置100のデータ送受信部110は、分散KVSでデータが分散して格納されている複数のサーバ装置200中からリクエストの送信先のサーバ装置200を決定し、決定したサーバ装置200に対してリクエストを送信する。その際、データ送受信部110は、キーを分散関数に入力して得られる分散関数の出力値に基づいて、リクエストの送信先のサーバ装置200を算出することができる。データ送受信部110から送信されたリクエストは、サーバ装置200のデータ送受信部210にて受信され、サーバ装置200にて処理される。その後、サーバ装置200のデータ送受信部210からレスポンスがクライアント装置100に送信される。データ送受信部110は、サーバ装置200のデータ送受信部210から送信されたレスポンスを受信する。
 図9は、サーバ装置のデータ送受信部によるデータ送受信処理のフローチャートである。データ送受信処理はマスタサーバのデータ送受信部210が実行する処理である。
 まず、マスタサーバのデータ送受信部210は、ステップS101にて、クライアント装置100のデータ送受信部110からリクエストを受信する。次に、データ送受信部210は、ステップS102にて、容量管理部220の容量予約部221に対して、リクエストの実行を要求する。このとき容量予約部221が実行する容量予約処理については後述する。
 その後、データ送受信部210は、ステップS103にて、リクエストの実行を終えた容量予約部221から、そのリクエストに対応するレスポンスを受信する。次に、ステップS104にて、データ送受信部210は、受信したレスポンスをクライアント装置100のデータ送受信部110に送信する。
 図10は、容量予約部による容量予約処理のフローチャートである。容量予約処理はマスタサーバの容量予約部221が実行する処理である。
 ステップS201にて、容量予約部221は、データ送受信部210からリクエストの実行要求を受け付ける。ステップS202にて、容量予約部221は、リクエスト内のKeyデータとValueデータを取得し、そのサイズを測定することで、リクエストを実行するのに使用する記憶領域のサイズを求める。
 更に、ステップS203にて、容量予約部221は、ステップS202にて求めたサイズと、容量管理テーブル290に登録されている情報とに基づいて、リクエストを実行することができるか否か判定する。具体的には、ステップS204にて、容量予約部221は、ステップS202にて求めたサイズが、レンジに含まれる全てのサーバ装置200の一時領域サイズ292よりも小さいか否か判定する。ステップS202にて求めたサイズが、全てのサーバ装置200の一時領域サイズ292よりも小さければ、リクエストは実行可能である、
 リクエストが実行可能であれば、ステップS205にて、容量予約部221は、ステップS202にて求めたサイズが、全てのサーバ装置200の一時領域720の空き容量より小さいか否か判定する。一時領域720の空き容量は式(1)で算出することができる。
(一時領域の空き容量)=(一時領域サイズ292)-(使用中サイズ293) …(1)
 いずれか1つでも、一時領域の空き容量がステップS202で算出されたサイズよりも小さいサーバ装置200があれば(ステップS205のno)、容量予約部221は、ステップS206にて、先行するリクエストの実行が完了するのを待ち、ステップS204に戻る。ステップS202にて求められたサイズが全てのサーバ装置200の一時領域720の空き容量よりも小さければ(ステップS205のyes)、容量予約部221は、ステップS207にて、ステップS202にて求められたサイズを、容量管理テーブル290の使用中サイズ293に加算する。これは、リクエストの実行に使用するために一時領域720の記憶領域を容量管理テーブル290上で予約する処理である。次に、容量予約部221は、ステップS208にて、ステップS202にて求められたサイズの情報をリクエスト内に格納する。
 更に、容量予約部221は、ステップS209にて、順序配信部230に順序配信処理を実行させる。順序配信部230は、データ処理部240に全順序配信でリクエストを配信する。配信が完了すると、順序配信部230は、データ処理部240の完了を待たずに、配信結果に基づいて、容量予約部221にレスポンスを返す。全順序配信とはリクエストを処理する順序を複数のサーバ装置200で揃える配信である。例えば、サーバ装置200は、Paxosアルゴリズム等の分散合意アルゴリズムによりリクエストの処理順序を他のサーバ装置200と合意し、合意した順序でリクエストを処理する。データ処理部240によるデータ処理については後述する。次に、容量予約部221は、ステップS210にて、順序配信部230の処理結果に基づいて、データ送受信部210にレスポンスを返す。
 <データ処理>
 図11は、データ処理部によるデータ処理のフローチャートである。データ処理はマスタサーバおよびスレーブサーバの両方のデータ処理部240が実行する処理である。
 データ処理部240は、まずステップS401にて、リクエスト内に格納されている、容量予約部221がステップS202にて求めたサイズの情報を取得する。次にステップS402にて、データ処理部240は、ステップS401で取得した、容量予約部221が求めたサイズをサーバ管理テーブル2A0の使用中サイズ2A4に加算する。更に、ステップS403にて、データ処理部240は、ステップS401で取得した、容量予約部221が求めたサイズが、リクエストが使用する最大サイズ2A6よりも大きければ、リクエストが使用する最大サイズ2A6をステップS401で取得した、容量予約部221が求めたサイズに更新する。
 次に、データ処理部240は、ステップS404にて、サーバ管理テーブル2A0のリクエスト件数2A5をインクリメント(+1)する。更に、データ処理部240は、ステップS405にて、順序配信部230から配信されたデータをデータストア280に登録する。その際、自サーバ装置200が当該データの格納されるレンジ内でマスタデータを格納するサーバ装置200であれば、データはマスタデータとして格納されることになる。自サーバ装置200が当該データの格納されるレンジ内でレプリカデータを格納するサーバ装置200であれば、データはレプリカデータとして格納されることになる。
 次に、データ処理部240は、ステップS406にて、サーバ管理テーブル2A0の一時領域サイズ2A3と使用中サイズ2A4の両方から、リクエスト実行で使用したサイズを減算する。次に、データ処理部240は、ステップS407にて、マスタサーバであるサーバ装置200の予約解除部222にデータ登録が完了したこと、つまり、リクエストの実行が完了したことを通知する。予約解除部222が実行する予約解除処理については後述する。
 更に、データ処理部240は、ステップS408にて、自サーバ装置200の容量補填部223に対し、一時領域720にリクエストの実行で使用したサイズの分の記憶領域を補填するよう要求する。容量補填部223が実行する容量補填処理については後述する。
 図12は、予約解除部による予約解除処理のフローチャートである。予約解除処理はマスタサーバの予約解除部222が実行する処理である。
 まず、予約解除部222は、ステップS501にて、データ登録が完了したサーバ装置200のデータ処理部240からリクエスト実行の完了の通知を受信する。次に、予約解除部222は、ステップS502にて、容量管理テーブル290の一時領域サイズ292と使用中サイズ293の両方から、リクエストの実行で使用したサイズを減算する。これは、ステップS207で、リクエストの実行に使用するために容量管理テーブル290上で予約した記憶領域を容量管理テーブル290上で解放する処理である。
 図13は、容量補填部による容量補填処理のフローチャートである。容量補填処理はマスタサーバおよびスレーブサーバの両方の容量補填部223が実行する処理である。
 容量補填部223は、ステップS601にて、自サーバ装置200のデータ処理部240、またはマスタサーバであるサーバ装置200の容量調整部226から一時領域720を確保する要求を受け付ける。次にステップS602にて、容量補填部223は、ステップS601で確保するように要求されたサイズ分の領域を確保する。領域を確保するとは、データストア280から一時領域720へ、要求されたサイズの記憶領域を補填(追加)することである。
 次にステップS603にて、容量補填部223は、ステップS601にて要求されたサイズの記憶領域の補填(確保)に成功したか否か判定する。領域の確保に成功したら(ステップS603のyes)、容量補填部223は、ステップS604にて、サーバ管理テーブル2A0の一時領域サイズ2A3に、領域を確保したサイズ、つまり一時領域720に補填した記憶領域のサイズを加算する。更に、容量補填部223は、ステップS605にて、マスタサーバであるサーバ装置200の補填結果反映部224に、領域の確保を行った旨と確保した領域のサイズを通知する。補填結果反映部224が実行する補填結果反映処理については後述する。
 図14は、補填結果反映部による補填結果反映処理のフローチャートである。補填結果反映処理はマスタサーバの補填結果反映部224が実行する処理である。
 補填結果反映部224は、ステップS701にて、一時領域720に記憶領域の補填を行ったサーバ装置200の容量補填部223から、一時領域720に補填した記憶領域のサイズ(補填サイズ)を受信する。次に、補填結果反映部224は、ステップS702にて、容量管理テーブル290の一時領域サイズ292に補填サイズを加算する。
 <起動処理>
 図15は、起動処理部による起動処理のフローチャートである。起動処理はマスタサーバおよびスレーブサーバの両方の起動処理部250が実行する処理である。
 起動処理部250は、ステップS801にて、サーバプロセスを起動する。サーバプロセスとは、サーバ装置200として動作するためのプロセスである。更に、起動処理部250は、ステップS802にて、主記憶装置530の全体領域から、自サーバ装置200の記憶領域が含まれる各レンジについて、そのレンジの固有の記憶領域を確保する。ここでは主に主記憶装置530から記憶領域を確保するが、一部または全部を二次記憶装置540から確保してもよい。
 次にステップS803にて、起動処理部250は、容量管理テーブル290およびサーバ管理テーブル2A0を生成し、確保した記憶領域のサイズの情報を各テーブルに反映する。具体的には、容量管理テーブル290の一時領域サイズ292およびサーバ管理テーブル2A0の一時領域サイズ2A3に、ステップS802にて確保した記憶領域のサイズの情報を登録すればよい。次に、ステップS804にて、起動処理部250は、サーバ装置200におけるリクエストの受付を開始する。
<フェールオーバ処理>
 図16は、フェールオーバ部によるフェールオーバ処理のフローチャートである。フェールオーバ処理は、同じレンジに属するマスタサーバに障害が発生したとき新たにマスタサーバになるサーバ装置200のフェールオーバ部260が実行する処理である。
 フェールオーバ部260は、ステップS901にて、マスタサーバの障害を検知する。フェールオーバ部260は、次にステップS902にて、フェールオーバを実行する。フェールオーバとは、障害が発生したマスタサーバに代わり、自サーバ装置200がマスタサーバになることである。次にステップS903にて、フェールオーバ部260は、レンジに属する各サーバ装置200の容量応答部225に対し、一時領域サイズ2A3および使用中サイズ2A4を取得することを要求する取得要求を送信する。その際に、容量応答部225が実行する容量応答処理については後述する。
 次に、ステップS904にて、フェールオーバ部260は、レンジに属する各サーバ装置200の容量応答部225から一時領域サイズ2A3および使用中サイズ2A4の情報を受信する。次にステップS905にて、フェールオーバ部260は、容量管理テーブル290を生成し、レンジに属するサーバ装置200の容量応答部225から受信した一時領域サイズ2A3および使用中サイズ2A4を、容量管理テーブル290の一時領域サイズ292および使用中サイズ293に反映する。それらの処理が終わると、ステップS906にて、フェールオーバ部260は、自サーバ装置200にリクエストの受付を開始させる。
 図17は、容量応答部による容量応答処理のフローチャートである。容量応答処理はマスタサーバおよびスレーブサーバの両方の容量応答部225が実行する処理である。
 容量応答部225は、ステップSA01にて、フェールオーバ部260によるフェールオーバ処理を実行しているサーバ装置200から、一時領域サイズ2A3および使用中サイズ2A4の取得を要求する取得要求を受信する。次に、容量応答部225は、ステップSA02にて、一時領域サイズ2A3をサーバ管理テーブル2A0から取得する。続いて、容量応答部225は、ステップSA03にて、使用中サイズ2A4をサーバ管理テーブル2A0から取得する。最後に、容量応答部225は、ステップSA04にて、取得した一時領域サイズ2A3および使用中サイズ2A4を、フェールオーバ部260によるフェールオーバ処理を実行しているサーバ装置200、つまり、取得要求を送信したサーバ装置200に送信する。
<統計情報出力処理>
 図18は、統計情報出力部による統計情報出力処理のフローチャートである。統計情報出力処理はマスタサーバの統計情報出力部270が実行する処理である。
 統計情報出力部270は統計情報出力処理を一定周期で定期的に実行する。本実施形態では1秒間隔に統計情報出力処理を実行するものとする。
 統計情報出力部270は、ステップSB01にて、サーバ管理テーブル2A0のリクエスト件数2A5を取得する。次に、統計情報出力部270は、ステップSB02にて、ステップSB01で取得したサーバ管理テーブル2A0のリクエスト件数2A5を、統計情報2C0のリクエスト件数(件/秒)に記録する。更に、統計情報出力部270は、ステップSB03にて、サーバ管理テーブル2A0のリクエスト件数2A5を0に設定(クリア)する。
 図19は、容量調整部による容量調整処理のフローチャートである。容量調整処理はマスタサーバの容量調整部226が実行する処理である。
 容量調整部226は容量調整処理を一定周期で定期的に実行する。容量調整処理の周期は統計情報出力処理の周期よりも長い時間に設定される。
 容量調整部226は、まずステップSC01にて、前回の容量調整処理を実行したタイミングを起点として統計情報2C0におけるリクエスト件数(件/秒)の最大値を取得する。本実施形態では、1秒毎に統計情報2C0におけるリクエスト件数が記録されているので、前回の容量調整処理を実行して以降に記録されたリクエスト件数の中で最大の件数を取得すればよい。
 次に、容量調整部226は、ステップSC02にて、クラスタ管理情報2B0の障害検知時間2B1を取得する。更に、容量調整部226は、ステップSC03にて、サーバ管理テーブル2A0のリクエストが使用する最大サイズ2A6を取得する。
 次に、容量調整部226は、ステップSC04にて、障害検知時間内に使用されうる一時領域720のサイズを式(2)により算出する。
(障害検知時間内に使用されうる一時領域720のサイズ)=(最大リクエスト件数(件/秒))*(障害検知時間(秒))*(リクエストが使用する最大サイズ) …(2)
 次に、容量調整部226は、ステップSC05にて、上記式(2)で算出した値とサーバ管理テーブル2A0の一時領域サイズ上限値2A2とを比較する。式(2)で算出した値がサーバ管理テーブル2A0の一時領域サイズ上限値2A2以下であれば(ステップSC06のno)、容量調整部226は容量調整処理を終了する。
 式(2)で算出した値がサーバ管理テーブル2A0の一時領域サイズ上限値2A2よりも大きければ(ステップSC06のyes)、容量調整部226は、ステップSC07にて、レンジに属する各サーバ装置200の容量補填部223に対し、式(2)で算出した値と一時領域サイズ上限値2A2との差の分だけ一時領域720を確保することを要求する確保要求を送る。
 更に、容量調整部226は、ステップSC08にて、式(2)で算出した値を、サーバ管理テーブル2A0の一時領域サイズ上限値2A2の新たな値として設定する。
<全体の流れ>
 以上、説明した本実施形態における情報システムのサーバ装置200の構成および動作を以下のように整理することもできる。
 情報システムは、マスタデータと前記マスタデータの複製であるレプリカデータを複数のサーバ装置に分散して配置する計算機システムであって、容量管理部220とデータ処理部240を有している。
 容量管理部220は、複数のサーバ装置200にわたる記憶領域の管理範囲をレンジとし、レンジ毎に、マスタデータが配置されるサーバ装置200であるマスタサーバとレプリカデータが配置されるサーバ装置200であるスレーブサーバとにおいて、総容量を動的に制御する一時領域720を予め確保する。そして、容量管理部220は、マスタサーバおよびスレーブサーバの一時領域720の使用状況を容量管理テーブル290にて管理し、データの書き込みを要求するデータ書き込みリクエストにて書き込みが要求されたデータが属するレンジの容量管理テーブル290におけるマスタサーバの一時領域720の使用状況およびスレーブサーバの一時領域720の使用状況に基づいて、データ書き込みリクエストの実行の可否を判定する。
 データ処理部240は、容量管理部220にてデータ書き込みリクエストが実行可能であると判定されたらデータ書き込みリクエストをマスタサーバおよびスレーブサーバの双方に実行させる。
 マスタデータに使用するマスタサーバの一時領域とそのレプリカデータに使用するスレーブサーバの一時領域を容量管理テーブル290にて一括で管理し、リクエストの実行可否を容量管理テーブル290におけるマスタサーバおよびスレーブサーバの一時領域の使用状況に基づいて判定するので、マスタサーバとスレーブサーバで空き容量の差異があっても、判定結果に基づきリクエストを等しく成功あるいは失敗させることができ、データの一貫性を向上させることができる。
 また、容量管理部220は、容量管理テーブル290において、マスタサーバおよびスレーブサーバの双方の一時領域720にデータ書き込みリクエストのデータを書き込めるだけの空き容量があれば、データ書き込みリクエストが実行可能であると判定し、マスタサーバおよびスレーブサーバのいずれか一方または両方の一時領域720にデータ書き込みリクエストのデータを書き込めるだけの空き容量がなければ、データ書き込みリクエストが実行可能でないと判定する。
 マスタサーバとスレーブサーバの両方の一時領域にデータを書き込めるだけの空き容量があるときにデータ書き込みリクエストを実行可能と判定するので、マスタサーバとスレーブサーバに空き容量の差異があっても、判定結果に基づきリクエストを等しく成功あるいは失敗させることができ、データの一貫性を向上させることができる。
 また、容量管理部220は、容量管理テーブル290にて、マスタサーバの一時領域720とスレーブサーバの一時領域720のいずれか一方または両方でデータ書き込みリクエストに対して空き容量が不足するとき、データ書き込みリクエストよりも先に要求された先行リクエストが完了するのを待機し、先行リクエストの完了により空き容量の不足が解消したらデータ書き込みリクエストを実行可能と判定する。
 先行リクエストの完了で記憶領域が確保できればリクエストを実行可能となるので、リクエストを実行できる場合が増える。
 また、順序配信部230は、データ書き込みリクエストを、マスタサーバおよびスレーブサーバに、マスタサーバとスレーブサーバとでリクエストの実行順序が揃うように実行させる。
 マスタサーバとスレーブサーバのいずれか一方のサーバ装置200だけで容量が不足する状況においてもリクエストの実行順序およびサーバ装置間のデータの一貫性を維持することができる。
 また、サーバ装置200の一時領域720は主記憶装置530から確保される。容量に十分な余裕を持たせるには比較的高コストとなる主記憶装置530において容量不足が発生してもサーバ装置200間の一貫性を保証できる。
 また、容量管理部220は、データ書き込みリクエストが発生すると、データ書き込みリクエストが実行される前に、データ書き込みリクエストの実行に使用するために一時領域720の記憶領域を容量管理テーブル290上で予約し、データ書き込みリクエストが実行されると、データ書き込みリクエストを実行に使用するために予約した記憶領域を容量管理テーブル290上で解放する。
 容量管理テーブル290上で記憶容量を予約してからデータ書き込みリクエストを実行するので、データ書き込みリクエストの実行中に容量確認のためのサーバ装置200間の通信が不要であり、システム動作の高速性を維持できる。
 また、容量管理部220は、過去にリクエストを実行したときにそのリクエストを実行するのに使用された記憶容量を測定し、その記憶容量の情報を蓄積した統計情報に基づいて、一時領域720の総容量を制御する。
 レンジ毎に確保する領域について過去のデータ書き込みリクエストに使用された記憶容量に基づいて調整した値を設定するので、データ書き込みリクエストが実行不可となるのを抑制することができる。また、過剰な容量の一時領域720を確保することが抑制されるので、他のレンジにおける領域確保が妨げられるのを抑えることができる。
 また、容量管理部220は、統計情報に基づいて、過去に最大発生したリクエストの単位時間当たりの件数と、所定時間(障害検知時間)と、1つのリクエストで最大使用した容量とを乗算した容量となるように一時領域720の総容量を制御する。
 統計情報において過去に最大発生したリクエストが最大容量ずつ使用した場合に必要となる記憶容量の一時領域720を確保することができるので、一時領域720が不足する事態が生じるのを抑制することができる。
 また、マスタサーバの障害でスレーブサーバが新たなマスタサーバとなるとき、容量管理部220は新たなマスタサーバに容量管理テーブル290を生成する。
 マスタサーバに障害が発生してレンジ内でマスタサーバが交代してもレンジの容量の管理を継続できる。
 上述した本発明の実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。
100…クライアント装置、110…データ送受信部、200…サーバ装置、210…データ送受信部、220…容量管理部、221…容量予約部、222…予約解除部、223…容量補填部、224…補填結果反映部、225…容量応答部、226…容量調整部、230…順序配信部、240…データ処理部、250…起動処理部、260…フェールオーバ部、270…統計情報出力部、280…データストア、300…通信ネットワーク、510…CPU、520…ネットワークインタフェース、530…主記憶装置、540…二次記憶装置、550…バス

Claims (10)

  1.  マスタデータと前記マスタデータの複製であるレプリカデータを複数のサーバ装置に分散して配置する計算機システムであって、
     前記複数のサーバ装置にわたる記憶領域の管理範囲をレンジとし、該レンジ毎に、前記マスタデータが配置されるサーバ装置であるマスタサーバと前記レプリカデータが配置されるサーバ装置であるスレーブサーバとにおいて、総容量を動的に制御する一時領域を予め確保し、前記マスタサーバおよび前記スレーブサーバの一時領域の使用状況を容量管理テーブルにて管理し、データの書き込みを要求するデータ書き込みリクエストにて書き込みが要求された前記データが属するレンジの容量管理テーブルにおける前記マスタサーバの一時領域の使用状況および前記スレーブサーバの一時領域の使用状況に基づいて、前記データ書き込みリクエストの実行の可否を判定する容量管理部と、
     前記容量管理部にて該データ書き込みリクエストが実行可能であると判定されたら該データ書き込みリクエストを前記マスタサーバおよび前記スレーブサーバの双方に実行させるデータ処理部と、を有する計算機システム。
  2.  前記容量管理部は、前記容量管理テーブルにおいて、前記マスタサーバおよび前記スレーブサーバの双方の一時領域に前記データ書き込みリクエストの前記データを書き込めるだけの空き容量があれば、前記データ書き込みリクエストが実行可能であると判定し、前記マスタサーバおよび前記スレーブサーバのいずれか一方または両方の一時領域に前記データ書き込みリクエストの前記データを書き込めるだけの空き容量がなければ、前記データ書き込みリクエストが実行可能でないと判定する、
    請求項1に記載の計算機システム。
  3.  前記容量管理部は、前記容量管理テーブルにて、前記マスタサーバの前記一時領域と前記スレーブサーバの一時領域のいずれか一方または両方で前記データ書き込みリクエストに対して空き容量が不足するとき、前記データ書き込みリクエストよりも先に要求された先行リクエストが完了するのを待機し、前記先行リクエストの完了により前記空き容量の不足が解消したら前記データ書き込みリクエストを実行可能と判定する、請求項2に記載の計算機システム。
  4.  前記データ書き込みリクエストを、前記マスタサーバおよび前記スレーブサーバに、該マスタサーバと該スレーブサーバとでリクエストの実行順序が揃うように実行させる順序配信部を更に有する、
    請求項1に記載の計算機システム。
  5.  前記サーバ装置の一時領域は主記憶装置から確保される、請求項1に記載の計算機システム。
  6.  前記容量管理部は、前記データ書き込みリクエストが発生すると、該データ書き込みリクエストが実行される前に、該データ書き込みリクエストの実行に使用するために前記一時領域の記憶領域を前記容量管理テーブル上で予約し、前記データ書き込みリクエストが実行されると、該データ書き込みリクエストを実行に使用するために予約した前記記憶領域を前記容量管理テーブル上で解放する、請求項1に記載の計算機システム。
  7.  前記容量管理部は、過去にリクエストを実行したときに該リクエストを実行するのに使用された記憶容量を測定し、該記憶容量の情報を蓄積した統計情報に基づいて、前記一時領域の前記総容量を制御する、請求項1に記載の計算機システム。
  8.  前記容量管理部は、前記統計情報に基づいて、過去に最大発生したリクエストの単位時間当たりの件数と、所定時間と、1つのリクエストで最大使用した容量とを乗算した容量となるように前記一時領域の総容量を制御する、請求項7に記載の計算機システム。
  9.  前記マスタサーバの障害で前記スレーブサーバが新たなマスタサーバとなるとき、前記容量管理部は前記新たなマスタサーバに前記容量管理テーブルを生成する、請求項1に記載の計算機システム。
  10.  マスタデータと前記マスタデータの複製であるレプリカデータを複数のサーバ装置に分散して配置する計算機システムにおけるデータ処理方法であって
     容量管理手段が、前記複数のサーバ装置にわたる記憶領域の管理範囲をレンジとし、該レンジ毎に、前記マスタデータが配置されるサーバ装置であるマスタサーバと前記レプリカデータが配置されるサーバ装置であるスレーブサーバとにおいて、総容量を動的に制御する一時領域を予め確保し、
     前記容量管理手段が、前記マスタサーバおよび前記スレーブサーバの一時領域の使用状況を容量管理テーブルにて管理し、データの書き込みを要求するデータ書き込みリクエストにて書き込みが要求された前記データが属するレンジの容量管理テーブルにおける前記マスタサーバの一時領域の使用状況および前記スレーブサーバの一時領域の使用状況に基づいて、前記データ書き込みリクエストの実行の可否を判定し、
     データ処理手段が、前記データ書き込みリクエストが実行可能であると判定されたら該データ書き込みリクエストを前記マスタサーバおよび前記スレーブサーバの双方に実行させ、
     前記データ処理手段が、前記データ書き込みリクエストが実行可能でないと判定されたら該データ書き込みリクエストを前記マスタサーバおよび前記スレーブサーバのいずれにも実行させない、データ処理方法。
PCT/JP2017/029031 2017-08-10 2017-08-10 計算機システムおよびデータ処理方法 WO2019030883A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2017/029031 WO2019030883A1 (ja) 2017-08-10 2017-08-10 計算機システムおよびデータ処理方法
JP2019502821A JP6663534B2 (ja) 2017-08-10 2017-08-10 計算機システムおよびデータ処理方法
US16/327,583 US11030218B2 (en) 2017-08-10 2017-08-10 Computer system and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/029031 WO2019030883A1 (ja) 2017-08-10 2017-08-10 計算機システムおよびデータ処理方法

Publications (1)

Publication Number Publication Date
WO2019030883A1 true WO2019030883A1 (ja) 2019-02-14

Family

ID=65271967

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/029031 WO2019030883A1 (ja) 2017-08-10 2017-08-10 計算機システムおよびデータ処理方法

Country Status (3)

Country Link
US (1) US11030218B2 (ja)
JP (1) JP6663534B2 (ja)
WO (1) WO2019030883A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013153646A1 (ja) * 2012-04-12 2013-10-17 株式会社日立製作所 計算機システム、データ配置管理方法及びプログラム
WO2015097774A1 (ja) * 2013-12-25 2015-07-02 株式会社日立製作所 計算機システム及びデータ管理方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8250327B2 (en) * 2009-02-25 2012-08-21 Hitachi Ltd. Storage apparatus and its control method
US8954671B2 (en) * 2011-10-28 2015-02-10 Hitachi, Ltd. Tiered storage device providing for migration of prioritized application specific data responsive to frequently referenced data
JP5853109B2 (ja) 2012-12-28 2016-02-09 株式会社日立製作所 計算機、計算機システムの制御装置及び記録媒体
JP6246238B2 (ja) * 2014-02-03 2017-12-13 三菱電機株式会社 電力制御システム、健康管理機器、運動計測機器及び電力指令装置
EP3009993B1 (de) * 2014-10-14 2018-12-19 Skidata Ag Verfahren und System zur Erhöhung der Sicherheit im Einsteigebereich und zur Optimierung der Ausnutzung der Kapazität bei Transportmitteln, welche zumindest einen örtlich festgelegten Einsteigebereich aufweisen
CN106294193B (zh) * 2015-06-03 2019-10-15 杭州海康威视系统技术有限公司 存储设备及基于该存储设备的分块存储方法
TWI553477B (zh) * 2015-06-12 2016-10-11 群聯電子股份有限公司 記憶體管理方法、記憶體控制電路單元及記憶體儲存裝置
AU2017223606A1 (en) * 2016-02-23 2018-09-13 Biodelivery Sciences International, Inc. Sustained release buprenorphine microspheres (SRBM) and methods of use thereof
US20180046990A1 (en) * 2016-08-15 2018-02-15 Yung-Sheng Huang Trackable battery apparatus and method of tracking same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013153646A1 (ja) * 2012-04-12 2013-10-17 株式会社日立製作所 計算機システム、データ配置管理方法及びプログラム
WO2015097774A1 (ja) * 2013-12-25 2015-07-02 株式会社日立製作所 計算機システム及びデータ管理方法

Also Published As

Publication number Publication date
US20190179830A1 (en) 2019-06-13
JPWO2019030883A1 (ja) 2019-11-07
US11030218B2 (en) 2021-06-08
JP6663534B2 (ja) 2020-03-11

Similar Documents

Publication Publication Date Title
CN108780386B (zh) 一种数据存储的方法、装置和系统
CN109683826B (zh) 用于分布式存储系统的扩容方法和装置
JP6084624B2 (ja) 高可用性クラスタにおけるスプリット・ブレイン耐性フェイルオーバ
EP2721504B1 (en) File processing method, system and server-clustered system for cloud storage
EP2810164B1 (en) Managing partitions in a scalable environment
US9888062B2 (en) Distributed storage system including a plurality of proxy servers and method for managing objects
JP5952960B2 (ja) 計算機システム、計算機システム管理方法及びプログラム
US8572037B2 (en) Database server, replication server and method for replicating data of a database server by at least one replication server
CN106899648B (zh) 一种数据处理方法和设备
JP6492123B2 (ja) 分散キャッシングおよびキャッシュ分析
KR101959601B1 (ko) 관리 시스템 및 관리 시스템을 제어하기 위한 방법
EP2605151A1 (en) Methods and apparatus for implementing a distributed database
KR20120116774A (ko) 분산 저장 시스템의 복제 서버 장치 및 복제본 생성 방법
KR101222129B1 (ko) 메타데이터 서버 및 메타데이터 서버의 디스크볼륨 선정 방법
KR20020007994A (ko) 하나 이상의 저장 장치에 공간을 할당하기 위해서 가중할당을 사용하는 복수 개의 파일 시스템
US20160234129A1 (en) Communication system, queue management server, and communication method
CN105794182A (zh) 分布式系统中锁服务器故障的处理方法及其系统
KR101527634B1 (ko) 샤딩 서비스를 제공하는 방법 및 장치
CN108200211B (zh) 集群中镜像文件下载的方法、节点和查询服务器
CN107948229B (zh) 分布式存储的方法、装置及系统
CN113190619B (zh) 分布式kv数据库的数据读写方法、系统、设备和介质
CN111291062A (zh) 数据同步写入方法、装置、计算机设备及存储介质
WO2019030883A1 (ja) 計算機システムおよびデータ処理方法
CN114930281A (zh) 动态自适应分区分割
JP5425448B2 (ja) データベース・システム、サーバ、更新方法およびプログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019502821

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 17920629

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

Country of ref document: EP

Kind code of ref document: A1