[go: up one dir, main page]

WO2015145595A1 - Computer system and method for managing computer system - Google Patents

Computer system and method for managing computer system Download PDF

Info

Publication number
WO2015145595A1
WO2015145595A1 PCT/JP2014/058400 JP2014058400W WO2015145595A1 WO 2015145595 A1 WO2015145595 A1 WO 2015145595A1 JP 2014058400 W JP2014058400 W JP 2014058400W WO 2015145595 A1 WO2015145595 A1 WO 2015145595A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
memory
data
computer system
priority thread
Prior art date
Application number
PCT/JP2014/058400
Other languages
French (fr)
Japanese (ja)
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/JP2014/058400 priority Critical patent/WO2015145595A1/en
Priority to JP2016509690A priority patent/JPWO2015145595A1/en
Publication of WO2015145595A1 publication Critical patent/WO2015145595A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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]

Definitions

  • a typical computer system of the present invention is a computer system including a plurality of processors, the processor includes a plurality of cores and a memory, and a thread for executing an application program is included in the core.
  • a low-priority thread that is a thread is assigned to a core of a different processor, and the data allocation unit accesses the memory associated with the processor to which the high-priority thread is assigned by both the high-priority thread and the low-priority thread.
  • Store common data It is realized by a computer system for assigning data.
  • the example of the computer system which this invention makes object is shown. It shows how the database management system operates on the server in the embodiment.
  • the database management system configuration information for the database management system to operate in the embodiment is shown.
  • the example of the DB instance definition file of OLTP in an Example is shown.
  • the example of the DB instance definition file of CRM in an Example is shown.
  • the example of the topology information in an Example is shown.
  • the example of the allocation information in an Example is shown.
  • the example of DB information in an example is shown.
  • the processing flow of the database management system in an Example is shown.
  • the processing flow of the database management system in an Example is shown.
  • the example of allocation of DB instance which shares the data in an Example is shown.
  • the example of allocation of DB instance which does not share the data in an Example is shown.
  • the conceptual diagram at the time of the thread which performs transaction processing in an Example accesses data is shown.
  • the processing flow of the access control part in an Example is shown.
  • FIG. 1 shows an example of a computer system targeted by the present invention.
  • the server 101 is connected to a plurality of clients (client 1 (105), client 2 (106), client N (107)) via the network 103.
  • the server 101 receives a request from an application program (APP) running on the client, and transmits the result processed by the server 101 to the client APP.
  • APP application program
  • the server 101 is mainly composed of nodes and buses that connect the nodes.
  • the bus is called a system interconnect bus.
  • the system interconnect bus may exist as one bus, or may be configured by a combination of a bus and a controller, such as system interconnect buses 190 and 191 and a controller 193 as shown in FIG.
  • a plurality of nodes (node 1 (110), node 2 (130), node 3 (150), node 4 (170)) are connected to the system interconnect buses 190 and 191.
  • a processor and a memory are directly connected in each node.
  • the processor is connected to the device via the I / O controller.
  • the processor 1 (114) has four cores, that is, a core 118, a core 119, a core 120, and a core 121. Further, the processor 1 (114) has a memory controller 1 (116) and is connected to the memory 1 (112). The secondary storage device 1 (124) and the communication device 1 (128) are connected to the I / O controller 1 (122) in the node 1 (110).
  • the secondary storage device 1 stores a part of files used in the server 101. Specifically, a program 125, data 126, and a log 127 are stored. In FIG. 1, the configuration and role of each node are the same as those of the node 1 (110).
  • the server 101 is a computer called NUMA (Non-Uniform Memory Access). Each core in each processor can access all memory.
  • NUMA Non-Uniform Memory Access
  • the access speed differs depending on which core reads or writes to which address.
  • the core 118 in the node 1 can access the memory 1 (112) at a higher speed than the memory 2 (132).
  • the core 118 can access the memory 1 via the memory controller 1 (116) of the processor 1 (114).
  • the access latency is large.
  • the memory 2 (132) can be accessed at a higher speed than the memory 3 (152) even in the memory access via the interconnect bus.
  • the core 118 accesses the memory 2 (132) via the system interconnect bus 190, whereas when accessing the memory 3 (152), in addition to the system interconnect bus 190, the system interconnect bus 191 and the controller 193 It is because it is necessary to go through.
  • the processor that executes the calculation corresponds to 270 including the processors of the respective nodes.
  • the memory corresponds to 200 including the memory of each node.
  • An execution file of the operating system 260 is stored in the secondary storage device connected to the node, although it is not explicitly shown.
  • the operating system 260 operates on the processor 270 and the memory 200, and further manages various resources for the application to operate on the processor 270 and the memory 200.
  • the operating system 260 provides processor and core affinity functions for applications. Applications can run on specific processors and cores by requesting the operating system 260 using the affinity feature.
  • the operating system 260 provides a function for designating a memory allocation policy for an application. Thereby, the application can request the operating system 260 to allocate the virtual memory area used by the application from the physical memory of the specific node.
  • FIG. 2 shows how the software, particularly the database management system, operates on the server.
  • the database management system 220 is software that guarantees atomicity, consistency, separation, and persistence of data.
  • the database management system 220 is an application program under the management of the operating system 260 and operates as a plurality of processes and threads.
  • FIG. 2 illustrates the main configuration of the database management system 220.
  • the database management system 220 includes a plurality of parts in order to accept a request from a client application described in SQL and process the request as a transaction.
  • modules for network connection management with a client and connection / communication management for transmitting and receiving data there is a transaction management unit that manages basic information for realizing a transaction such as reference and update of data requested by a client.
  • a SQL management unit that manages an SQL language analysis and execution plan used as a data operation request to the database management system 220.
  • data is generally managed as a table, and a table management unit is provided for this purpose.
  • the database management system 220 can use an index so that a transaction can access data to be operated at high speed, and has an index management unit for this purpose.
  • a database management thread 360 and a topology management thread 370 operate to manage the whole.
  • database information that operates on the database management system 220 is held in the DB information 362.
  • the allocation information 364 holds the total amount of resources such as cores and memories that can be used by the database management system 220, the usage state and the usage amount in each instance.
  • the database management thread 360 has a thread allocation unit 380 for managing threads of the database management system 220.
  • a data allocation unit 382 exists to manage allocation of data to memory.
  • the topology management thread 370 acquires configuration information of the server 101 from the operating system 260 and holds it as topology information 372.
  • the database management system 220 has an access control unit 384 for managing internal data access. Further, the database management system 220 records operation information as logs (127, 147, 167, 187) in the secondary storage of the server 101 in order to make the data operation from the client permanent.
  • the log generation unit 386 manages log data. Further, the operation information and performance information of the entire database management system 220 are held as statistical information 390 and can be referred to through a database management interface (not shown).
  • the database management system 220 operates as an in-memory database that can execute a plurality of DB instances.
  • DB instance is composed of multiple threads and has independent storage area and independent control.
  • the memory secured by the database management system 220 is allocated to each DB instance by the data allocation unit 382.
  • the memory management thread of each DB instance manages the memory required in the DB instance.
  • the log management thread of each DB instance records the database operation information in the secondary storage using the function of the log generation unit 386.
  • DB instance 1 that realizes online transaction processing (OLTP)
  • DB instance 2 330
  • CRM customer relationship management
  • OLTP is an important database in mission-critical systems, and must execute a large number of transactions at high speed.
  • the CRM is a database for performing customer management based on OLTP information.
  • the importance in the backbone system is lower than that of OLTP.
  • OLTP data used by CRM is processed by executing batch processing at a regular frequency such as once a day, extracting the change history from the OLTP database, and loading the change history into the CRM.
  • a regular frequency such as once a day
  • multiple databases such as OLTP and CRM can be executed on a single computer.
  • sharing is possible without batch processing.
  • the DB instance 1 (300) is a DB instance for OLTP, and the transaction thread 1 (302) and the transaction thread 2 (306) operate in order to execute the transaction 1 (304) and the transaction 2 (308). ing.
  • the DB instance 1 (300) manages five pieces of information including store information 310, inventory information 312, product information 314, order information 316, and customer information 318 as table data. Among these, the order information 316 and the customer information 318 can be shared with other DB instances.
  • the memory management thread 1 (320) manages the memory secured for the DB instance 1 (300) to operate.
  • the log management thread 1 (322) generates and manages a log of online transaction processing.
  • DB instance 2 (320) is an instance for CRM and has inquiry information 340, sales promotion information 342, sales information 344, order information 346, and customer information 348 as table data.
  • the order information 346 is realized by referring to the order information 316 of the DB instance 1.
  • the customer information 348 is realized by referring to the customer information 318.
  • DB instance 1 (300) is required to operate in preference to DB instance 2 (320). That is, the priority of DB instance 1 (300) is higher than the priority of DB instance 2 (320).
  • the process and thread (302, 306, 320, 322) of the DB instance 1 (300) operate with priority over the process and thread (332, 336, 350, 352) of the DB instance 2 (320).
  • the present embodiment relates to a processing method when a plurality of databases partially sharing data are used by a plurality of users.
  • OLTP and CRM are described, but the database used in combination may be ERP or OLAP (Online Analytical Processing).
  • FIG. 3 shows database management system configuration information for the database management system to operate. This data is stored as data (126, 146, 166 or 186) in the secondary storage device of the server 101 as a file, and is read by the database management thread 360 when the database management system 220 is activated.
  • the number of nodes 405 describes how many nodes of the server 101 the database management system 220 uses.
  • the number of cores 410 describes the number of cores of the processor that can be used by the database management system 220 as a whole.
  • the memory size 415 indicates a memory size secured from the operating system 260 when the database management system 220 operates.
  • the DB shared memory size 420 indicates the memory that is shared between DB instances and the amount of memory that is used for overall management when a plurality of DB instances operate on the database management system 220.
  • the DB instance definition file 425 indicates a DB instance setting file that is loaded after the database management system 220 is activated. In FIG. 3, DB instances for transaction processing (OLTP) and customer relationship management (CRM) are set.
  • FIG. 4 shows an example of an OLTP DB instance definition file in the embodiment.
  • the DB instance definition file 500 is used to start the DB instance 1 (300) of OLTP.
  • the DB instance name 505 is an identifier for the system administrator to identify the DB instance on the database management system 220.
  • the priority 510 indicates an execution priority set for each DB instance when a plurality of DB instances operate on the database management system 220. “1” set in the priority 510 indicates that the operation is performed with the highest priority.
  • the memory capacity 515 is a size allocated in the database management system 220 in order for the DB instance to operate.
  • the shared memory capacity 517 is the size of memory allocated in the database management system 220 so that the DB instance can be used for data sharing with other DB instances. Based on this information, the data allocation unit reserves memory for the DB instance.
  • the number of cores 520 is the number of cores assigned to operate the DB instance.
  • the thread assignment unit 380 of the database management system 220 assigns one DB instance to one core of the server 101 (two or more DB instances do not use the same core).
  • the maximum transaction 525 indicates the number of transactions to be processed by the DB instance per second.
  • the average response time 530 indicates a target average processing time of a transaction processed by the DB instance.
  • the management table information 535 indicates table data information that is managed by the database management system 220 as an owner among the tables used in the instance.
  • the management table 535 includes information indicating whether or not the table can be shared with other DB instances, and whether or not to partition the data using a key value such as an ID. They are defined together.
  • the management table information 535 defines that store information, inventory information, and product information cannot be shared, and that order information and inventory information can be shared.
  • the OLTP DB instance definition file 500 does not use partitioning for any table.
  • the table schema is described as being defined in another data file.
  • the reference table 540 information on tables owned by other DB instances is described in the DB instance. Since DB instance 1 (300) does not refer to the tables of other DB instances, there is no setting.
  • the port number 550 stores a port number designated when a client (client 1 (105), client 2 (106), client N (107)) issues a request to the server 101.
  • FIG. 5 shows an example of a CRM DB instance definition file in the embodiment.
  • DB instance name 605, priority 610, memory capacity 615, shared memory capacity 617, number of cores 620, maximum number of transactions 625, average response time 630, initial data file 645, and port number 650 have different values from the definition file 500. Is set.
  • management table 635 information of table data owned by the DB instance 2 (330) is set.
  • Inquiry information, sales promotion information, and sales information are defined as table data that cannot be shared and that are not partitioned.
  • the reference table 640 shows information about the table table defined by the DB instance 1 (OLTP).
  • the order information indicates a table data order of an instance activated by the identifier OLTP, and means a table table of order information defined by the management table 535. The same applies to customer information.
  • the priority of CRM is “3” defined in 610, and OLTP is processed with higher priority.
  • the OLTP data to be referred to it is defined that data that is 10 minutes old can be used.
  • FIG. 6 shows an example of topology information.
  • the node number 705 indicates which node information.
  • 1 which is the value of the node number 705 is used to mean the node 1 (110) of the server 101.
  • the number of processors 710 indicates the number of processors mounted on the node. Since the number of processors mounted on the node 1 (110) of the server 101 is 1, it is “1”.
  • the number of cores 715 indicates the number of cores existing in the node.
  • the memory 720 indicates the memory capacity installed in the node.
  • each node 32 GB of memory is installed in each node.
  • the cost for accessing each node is substituted.
  • the access cost to the node 2 is 20.
  • the access cost to the nodes 3 and 4 is 40 because it is necessary to use the controller 193 of the server 101 and the system interconnect bus 191.
  • the device 730 a device mounted on each node is recorded.
  • the communication device of each node also corresponds, but the description is omitted.
  • the distance 725 can be acquired by, for example, the topology management thread 370 of the database management system 220 inquiring the operating system 260.
  • the topology management thread 370 of the database management system 220 inquiring the operating system 260.
  • Linux (R) it is obtained by executing the numactl command.
  • the value indicates the load when data is referred / updated between the nodes, and the value indicating the load is 10 when the data is referred / updated between the nodes 1 and 1.
  • the value indicating the load when data is referred / updated between the node 1 and the node 4 is 40.
  • FIG. 7 shows an example of allocation information in the embodiment.
  • the large item 1700 is used to distinguish whether the set content is information on the entire database management system 220 or information specific to each DB instance.
  • An item 1702 indicates an element to be assigned.
  • Node 1704 is used to specify whether the assigned element is a node or the entire server.
  • the allocation 1706 indicates the total amount that can be allocated by each node or the whole.
  • the free space 1708 indicates the current free space with respect to the total amount that can be allocated.
  • the use instance ID 1710 is used to manage which DB instance is used when resources are allocated. In the case of a memory, not only the capacity but also information such as a start address and an end address is required, but it is not shown.
  • Numerals 1722 to 1730 indicate information related to core allocation of the entire database management system 220.
  • the cores of node 1 are all assigned to DB instance 1 (1722).
  • Reference numerals 1732 to 1740 indicate information related to memory allocation of the entire database management system 220.
  • the memory of the node 1 is secured by the database management system 220 by 25 GB, used by the DB instance 1, and has a free capacity of 1 GB.
  • 1742 to 1750 indicate information related to the core allocation of the DB instance 1 (300).
  • DB instance 1 (300) is assigned the core of node 1.
  • Reference numerals 1752 to 1764 denote information related to memory allocation of the DB instance 1 (300).
  • the DB instance 1 (300) reserves 20 GB from the node 1 (1752).
  • Occupancy 1762 is an area for recording a memory node to which an occupancy management table is allocated.
  • the share 1764 is an area for recording a memory node to which a shareable management table is recommended.
  • the use instance ID of the share 1764 the ID of the DB instance that uses the shareable management table of the DB instance is recorded.
  • the node 1 is allocated for both occupation and sharing, and the DB instance 2 refers to the shareable management table.
  • the allocation information is DB instance 2 (330). Since the data configuration is the same as that of 1742 to 1764 of DB instance 1 (300), the description is omitted.
  • FIG. 8 shows an example of DB information in the embodiment.
  • the ID 1800 stores a DB instance ID for which information is set.
  • An item 1802 indicates an item to be registered.
  • Value 1 (1804) and value 2 (1806) are areas for storing necessary setting values for each item.
  • the contents set in the DB information 362 are based on the DB instance definition file (500, 600) of each DB instance.
  • the 1820 to 1852 indicate DB information of DB instance 1 (300) that processes OLTP.
  • the status 1820 currently indicates the state of the DB instance.
  • This example shows that the core and memory allocation has been completed.
  • the memory capacity 1826, the shared memory capacity 1827, and the number of cores 1828 store the unallocated resource amount in the value 2 (1806) as well as the setting value of the DB instance definition file. In this example, since the allocation is completed, the unallocated resource amount is zero.
  • DB instance IDs that may be referred to are stored.
  • the reference table 1860 based on the DB instance definition file 600, the reference freshness of the customer table is set to 10 minutes. As shown in FIG. 5, this means that CRM refers to a customer table held by OLTP, but it is allowed to refer to customer data 10 minutes ago.
  • FIG. 9 shows the processing flow of the database management system.
  • Step 805 The topology management thread 370 acquires the hardware configuration information of the server 101 from the operating system 260.
  • Step 810 The topology management thread 370 generates topology information based on the acquired hardware configuration information and registers it as topology information 372.
  • Step 815 The database management thread 360 reads the database management system configuration information 400 as the configuration information of the database management system 220, and creates DB information 362.
  • Step 820 The data allocation unit 382 of the database management thread 360 determines the memory size to be allocated from the node set to the node number 405 with reference to the topology information 372 in order to secure the memory size 415 of the database management system configuration information 400. To do. For example, a size obtained by dividing the set memory size by the number of nodes to be used is set as a memory size to be secured per node.
  • the data allocation unit 382 of the database management thread 360 registers the memory size acquired from each determined node in 1732 to 1740 of the allocation information 364.
  • Step 825 The thread allocation unit 380 of the database management thread 360 determines the number of cores specified in the core number 410 of the database management system configuration information 400 with reference to the topology information 372. If the number of cores in the node used by the data allocation unit 382 is greater than or equal to the number of cores 410, the thread allocation unit 380 determines a core number to be used from among the nodes used by the data allocation unit 382.
  • the thread allocation unit 380 refers to the distance 725 of the topology information 372. The thread allocation unit 380 selects a node that is close to the node used by the data allocation unit 382 and determines the remaining cores to be used.
  • the database management thread 360 registers the determined number of cores in the allocation information 364.
  • Step 830 The database management thread 360 reads one file specified in the DB instance definition file 425 of the database management system configuration information 400.
  • Step 835 The database management thread 360 registers the information of the DB instance definition file (for example, the definition file 500) in the DB information 362.
  • the database management thread 360 registers the ID of the DB instance in the shareable management table of the DB instance to be referenced.
  • the CRM registers 2 as the CRM DB instance ID in the shared management table 1844 to refer to the OLTP customer.
  • Step 840 The database management thread 360 determines whether there is an unread file among the files written in the DB instance definition file 425 of the database management system configuration information 400. If there are other files to read, the process returns to step 830. Otherwise, go to 850.
  • FIG. 10 shows the continuation of the processing flow of FIG.
  • Step 905 The database management thread 360 refers to the DB information 362 and selects the DB instance with the highest priority from among the DB instances that are not assigned.
  • the database management thread 360 sets the status (1820, 1854) of the DB information 362 for the selected DB instance during allocation.
  • Step 910 The data allocation unit 382 refers to the partitioning 1834 or the like in the DB information 362, and determines whether or not the DB instance uses partitioning. When partitioning is not performed, allocation is determined as follows.
  • the data allocation unit 382 refers to the DB information 362 and determines whether the DB instance refers to data of another DB instance from the occupancy management table, the sharable management table, and the reference table.
  • the data allocation unit 382 determines the node to which the occupancy management table is allocated based on the priority and the presence / absence of reference to another DB instance.
  • the data allocation unit 382 refers to the entire free area (the free GB 1708 of 1732 to 1740) of the allocation information 364 and performs the allocation. Allocate memory from an unassigned node.
  • the data allocation unit 382 refers to the allocation information 364 and the topology information 372, and is a node far from the node where the allocation has already been performed. Reserve memory above.
  • the data allocation unit 382 refers to the allocation information 364 and the topology information 372, and is at a distance close to the node used by the DB instance to be referred to. Reserve memory on a node. At this time, when the priority of the DB instance is high, the memory is allocated from a node that is not allocated among the nodes at a short distance.
  • the data allocation unit 382 refers to the distance 725 of the topology information 372 and the memories 1732 to 1738 of the allocation information 364. Then, memory is allocated from a node that is close to the already selected node.
  • the data allocation unit 382 subtracts the secured memory size from the entire free area (free GB 1708 of 1732 to 1740) of the allocation information 364. Further, the secured memory size is added to the allocation of the DB instance (1752). Further, the data allocation unit 382 adds a node set in the occupation 1762 of the DB instance.
  • the data allocation unit 382 refers to the DB information 362 and confirms whether the DB instance sets a shared memory capacity and has a shareable management table. If there is free capacity in the node that secured the occupation management table, the data allocation unit 382 allocates the memory amount set in the shared memory capacity (1827) from the node. If the priority of the DB instance is high and there is no free capacity in the node that secures the occupancy management table, the data allocation unit 382 refers to the topology information 372 and the allocation information 364, and is closer to the node that secures the occupancy management table.
  • the shared memory capacity is allocated preferentially from a certain unallocated node.
  • the data allocation unit 382 refers to the topology information 372 and the allocation information 364 and is close to the node that secured the occupancy management table.
  • a shared memory capacity is allocated from a node to which data of a DB instance having a low degree is allocated.
  • the data allocation unit 382 subtracts the secured shared memory size from the entire free area of the allocation information 364 (free GB 1708 of 1732 to 1740). Further, the secured shared memory size is added to the allocation of the DB instance (1752). Further, the data allocation unit 382 adds the node set in the sharing 1764 of the DB instance.
  • the data allocation unit 382 assigns the DB instance to the memory node used for sharing in the memory information of the allocated DB instance. Set the ID.
  • the data allocation unit 382 divides the allocation into a plurality of nodes when allocating the memory area of the table for partitioning when allocating the occupancy management table and the shareable management table. .
  • Step 915 The thread allocation unit 380 gives priority to the core on the node allocated in Step 910, and allocates the number of cores (1828, etc.) specified in the DB information 362 using the allocation information 364. If the number of free cores of the node allocated by the data allocation unit 382 in step 910 is less than the number of cores required by the DB instance, the thread allocation unit 380 refers to the distance 725 of the topology information 372 and allocates data. Select a node that is close to the node and assign the core to be used from there.
  • Step 920 The database management thread 360 assigns and completely sets the status (1820, 1854) of the DB information 362 for the selected DB instance.
  • Step 925 The database management thread 360 refers to the DB information 362, and confirms whether or not the statuses of all the DB instances are completely assigned. If all DB instances have been assigned, the process proceeds to 930 and the assignment process is completed. If there is a DB instance that has not been assigned, the process returns to step 905.
  • the data allocating unit 382 and the thread allocating unit 380 realize the resource allocation considering the priority and the data sharing between the DB instances by allocating the memory and the core from the DB instance having the higher priority.
  • FIG. 11 shows an allocation example of DB instances sharing data in the embodiment.
  • the memory used by the database management system 220 has a uniform capacity on each node (1305, 1320, 1335, 1350).
  • the memory 1310 used for OLTP is secured from the memory 1 (112) of the node 1 (110) by the data allocation unit 382.
  • the memory used for CRM is secured separately for the memory 2 (132) of the node 2 (130) and the memory 3 (152) of the node 3.
  • the core used in OLTP is a core that executes a high-priority thread, and is assigned to the cores 118, 119, 120, and 121 of the node 1 (110) by the thread assignment unit 380 (1370, 1372, and 1374). 1376).
  • the core used in CRM is a core that executes a low-priority thread, and is assigned to the cores 138, 139, and 140 of the node 2 (130) (1380, 1382, and 1384).
  • a memory or core for a program such as CRM that performs data processing using data for OLTP processes the same data by assigning it to a node adjacent to the node having the memory or core assigned for OLTP. Processing that does not unnecessarily increase the load of data reference / update between multiple programs becomes possible.
  • -Data used in both OLTP and CRM should be assigned to the node to which the high-priority OLTP data is assigned so that the load is not increased when OLTP processing is performed.
  • OLTP processing is allowed depending on the data capacity and the required number of cores, data and cores allocated for OLTP and CRM may coexist in some nodes.
  • the data reference / update load is determined by referring to the topology information as shown in FIG. 6, it is possible to determine the load more accurately.
  • the node numbers are assigned in ascending order of load or in descending order, and the node numbers are as close as possible. By selecting one, it is possible to provide a simple system that does not unnecessarily increase the load of data reference / update between programs sharing data.
  • FIG. 12 shows an allocation example of DB instances that do not share data in the embodiment.
  • the cores are assigned in order from the node 1 to the node with the largest node number, and the data for CRM is the node number
  • the effect is reduced by allocating nodes 4 having a larger node number to nodes having a smaller node number. You may allocate using topology information.
  • FIG. 13 is a conceptual diagram when a thread that performs transaction processing accesses data.
  • FIG. 13 shows customer information 318 that is a table shared by transaction thread 1 (302) of DB instance 1 (300) that processes OLTP and transaction thread 3 (332) of DB instance 2 (330) that processes CRM. It shows how to access.
  • the transaction thread (302, 332) holding each transaction (304, 334) accesses the customer information 318 using the access control unit 384 of the database management system 220.
  • a transaction thread 1 (302) that executes the OLTP transaction 304 is a high-priority thread.
  • the transaction thread 3 (332) that executes the CRM transaction 332 is a low-priority thread.
  • Customer information 318 stores customer data for each row of the table.
  • the customer information 318 includes management information 1420 for managing the latest row data and actual data 1430 internally.
  • the transaction thread 302 When the data of the customer information 318 is updated in the OLTP process, the transaction thread 302 generates update log information in the log buffer 1440. In the figure, update log information 1442 in which row 2 is changed is stored.
  • the log generation unit 386 is executed by the transaction thread 1 (302) and the log management thread 1 (322), and stores the update log information in the secondary storage via the log buffer 1440.
  • update history 1450 that holds update log information of customer information 318.
  • update log information 1452 when row 1 is updated is stored.
  • the memory management thread 320 and the memory management thread 350 can write the update information of the customer information 318 written in the log buffer 1442 periodically in the update history 1450 separately from the transaction processing.
  • the access control information 1460 holds access frequency information between DB instances, the time when each DB instance last executed a transaction, the update time of referenced data, and the like.
  • the transaction thread (302, 332) and customer information (318) described in one node in the figure are arranged in a specific node, but the components described across other nodes are It does not matter where it is on the system.
  • FIG. 14 shows a processing flow of the access control unit.
  • Step 1500 The transaction thread requests the access control unit 384 to access data (read, write, etc.).
  • the access control unit 384 starts specifying data to be accessed based on the request.
  • Step 1505 The access control unit 384 confirms whether the data is data shared with other DB instances from the requested data type. If the requested data type is a database table, it is determined by searching the occupancy management table (1836), sharable management tables (1842, 1844) and reference table (1846) of the DB information 362. can do.
  • data other than tables can be determined by having information indicating whether sharing with other DB instances is possible as area management data. If the data is shared with other DB instances, the process proceeds to step 1510. If not shared, the management data and actual data are accessed (1610).
  • Step 1510 The access control unit 384 determines whether the transaction being executed is the owner of the requested data. For example, if the requested data is a table, whether or not it is the owner of the data is determined by whether or not there is information on the target table in the occupancy management table 1836 or the sharable management table 1842 of the DB information 362. Can do.
  • step 1505 the determination can be made by registering the owner's DB instance ID in the area management data. If the transaction for accessing the data is the owner, the management data and the actual data are accessed (1610). If not, go to step 1515.
  • Step 1515 The access control unit 384 determines whether the priority of a DB instance having a transaction for accessing data is higher than the priority of other DB instances accessing the data.
  • the priority of the DB instance that accesses data can be known by referring to the priority 1824 of the DB information 362, the management information of the transaction threads (302, 332), or the management information of the access data.
  • the priorities of other DB instances if the target data is a table, the DB information 362 is searched for a DB instance having a table in which the data exists in the reference table 1846, and the DB instance of the corresponding DB instance is searched. This can be known by referring to the priority 1824.
  • DB instance priority of a transaction accessing data is compared with the priorities of other DB instances. But it can be realized. If a DB instance that accesses data has a higher priority than other DB instances that are referred to, the management data and actual data are accessed (1610). Otherwise, go to step 1520.
  • Step 1520 The access control unit 384 determines whether the requested data access is an operation for newly writing or updating data. If it is write or update, the process proceeds to step 1525. If the operation is a reference only operation, the process proceeds to step 1540.
  • Step 1525 The access control unit 384 refers to the access control management information 1460, and confirms the frequency with which the DB instance executing the transaction can access the reference DB instance.
  • Step 1530 The access control unit 384 compares the accessible frequency obtained in step 1525 with the actual result and confirms whether or not the target is below the target. If it is below the target, the management data is accessed (1600).
  • Step 1535 The access control unit 384 performs the access process because the transaction is a transaction of a DB instance that does not hold the data to be referred to, and the DB instance frequently accesses the reference DB instance. Perform timing adjustment to delay.
  • a sleep function is issued by the transaction thread so as to satisfy the target value, and another transaction process can be temporarily executed by executing a busy wait loop.
  • the management data is accessed after the wait process (1600).
  • Step 1540 The access control unit 384 refers to the previous data or copied data that can be referred from the data update history, not the latest original data managed by the DB instance that owns the data, as the data reference of the transaction. Search if can see. Specifically, any or all of the following operations are performed to check whether there is target data, and the process proceeds to step 1545.
  • a search is performed as to whether there is data to be accessed as an entry of the update history 1450 managed by the DB instance executing the transaction.
  • Step 1545 If the data is found in Step 1540, the access control unit 384 proceeds to Step 1550. If not found, the process proceeds to step 1525.
  • Step 1550 The access control unit 384 obtains the difference between the current time and the update time of the found data.
  • the access control unit 384 compares the obtained DB instance reference table / frequency information (such as 1846) of the DB information 362 with the obtained difference, and determines whether the freshness of the information is within the range. Further, the access control unit 384 compares the update time of the data referenced by the previously executed transaction stored in the access control management information 1460 with the update time of the found data, and the data in which the DB instance is found is valid. It is determined whether the data is within a certain range. If it is within the range, the old data is accessed (1625). If it is not within the range, the management data is accessed (1600).
  • the determination method using time is shown, but the determination may be made using a transaction ID or a time stamp counter of the processor.
  • FIG. 15 shows the continuation of the processing flow of the access control unit.
  • Step 1610 The access control unit 384 determines access to the requested data as access to management data and actual data.
  • the transaction requests the data of the customer information 318, the management information 1420 and the actual data 1430 are accessed.
  • Step 1600 The access control unit 384 accesses the requested actual data.
  • the transaction requests the data of the customer information 318, a process for referring to the management information 1420 is performed.
  • Step 1605 The access control unit 384 refers to the management information and determines whether or not the transaction can currently operate the requested data. For example, it is confirmed whether or not a lock flag is set. If it can be operated, the process proceeds to Step 1615. If it cannot be operated, the process proceeds to step 1620.
  • Step 1615 The access control unit 384 determines that the transaction accesses the latest actual data of the requested data. When the transaction requests the data of the customer information 318, the actual data 1430 is accessed.
  • Step 1620 The access control unit 384 determines that the transaction accesses the latest actual data of the requested data. However, since the data is used by other transactions, the data is not accessed immediately, but is registered after waiting for the lock to be released.
  • Step 1625 The access control unit 384 determines that the transaction accesses the old data searched in Step 1540. When the transaction requests row 1 of the customer information 318, the entry 1542 of the update history 1450 is used. When the transaction requests line 2 of the customer information 318, the entry 1442 of the log buffer 1440 is used. If it exists in the log file, the log file data is used.
  • the database management system 220 can also be added to a query statement (SQL) using a command interface.
  • SQL query statement
  • 101 server 200 memory, 270 processor, 220 database management system, 260 operating system, 300 DB instance 1, 330 DB instance 2, 360 database management thread, 362 DB information, 364 allocation information, 370 topology management thread, 372 topology information, 380 thread allocation unit, 382 data allocation unit, 384 access control unit, 386 log generation unit, 400 database management system configuration information, 500 DB instance definition file, 600 DB instance definition file

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 Provided is a technique for avoiding a delay in the performance of a high-priority program in a computer system, configured from a multi-core processor, in which a plurality of programs operate. The core and memory that a program uses is allocated by using computer configuration information, program definition information, inter-program reference information, and the freshness of data cooperation. Furthermore, to enable a high-priority program to refer to and/or update data preferentially, access control is exerted, at the time of access, that selects data on the basis of priority and the freshness of information, the data being accessible by a low-priority program, and adjusts the frequency with which the data is accessed.

Description

計算機システム及び計算機システム管理方法Computer system and computer system management method
 計算機の管理方法に関する。 Related to computer management methods.
 計算機の技術が発展し、大容量メモリと多コアを搭載した大規模サーバが登場している。基幹系業務を支えるデータベース群(OLTP(Online Transaction Processing)、ERP(Enterprise Resource Planning)、CRM(Customer Relationship Management)など)が、メモリ量と計算処理能力の観点では、1台の大規模サーバ上で、インメモリで実現できるようになった。加えて、経営分析の高度化、ビッグデータ分析をビジネスに活かす期待が高まっており、情報系業務のデータベースで、基幹系業務データベースのデータを迅速に利用することが求められている。 Computer technology has evolved, and large-scale servers equipped with large-capacity memory and many cores have appeared. Databases that support mission-critical business (OLTP (Online Transaction Processing), ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), etc.) are one of the largest servers in terms of memory capacity and computing power. It can be realized in-memory. In addition, there is a growing expectation that business analysis will become more sophisticated and big data analysis will be utilized in business, and it is required to quickly use the data in the core business database as a database for information business.
特許第4293794号Japanese Patent No. 4293794 特許第4833590号Japanese Patent No. 4833590
 大規模計算機において単一のインメモリDBエンジンが複数DBシステム用に動作する際、各DBシステムが必要な他DBシステムのデータを参照すると、複数トランザクション実行と、メモリアクセス遅延により、高速実行が必要なDBシステムのトランザクション処理性能が低下する。 When a single in-memory DB engine is operated for multiple DB systems on a large-scale computer, high-speed execution is required due to execution of multiple transactions and memory access delays when data of other DB systems required by each DB system is referenced. The transaction processing performance of a simple DB system is degraded.
 上記課題を解決するために、代表的な本発明の計算機システムは複数のプロセッサで構成される計算機システムであって、プロセッサは複数のコアとメモリを備え、アプリケーションプログラムを実行するスレッドを前記コアに割り当てるスレッド割当て部と、アプリケーションで使用するデータをメモリへ割当てるデータ割当て部とを備え、スレッド割当て部は優先度の高いアプリケーションを実行するスレッドである高優先度スレッドと優先度の低いアプリケーションを実行するスレッドである低優先度スレッドを異なるプロセッサのコアに割り当て、前記データ割当て部は、高優先度スレッドが割り当てられたプロセッサに対応づけられたメモリへ高優先度スレッドと低優先度スレッドの両方でアクセスする共通データを格納するようデータの割り当てを行う計算機システムにより実現される。 In order to solve the above-described problems, a typical computer system of the present invention is a computer system including a plurality of processors, the processor includes a plurality of cores and a memory, and a thread for executing an application program is included in the core. A thread allocation unit for allocating and a data allocation unit for allocating data used in the application to the memory, and the thread allocation unit executes a high-priority thread that is a thread for executing a high-priority application and a low-priority application. A low-priority thread that is a thread is assigned to a core of a different processor, and the data allocation unit accesses the memory associated with the processor to which the high-priority thread is assigned by both the high-priority thread and the low-priority thread. Store common data It is realized by a computer system for assigning data.
 優先度の低いアプリケーションの処理が優先度の高いアプリケーションの処理への影響を低減できる。 処理 Lower priority application processing can reduce the impact on higher priority application processing.
本発明が対象としている計算機システムの例を示している。The example of the computer system which this invention makes object is shown. 実施例におけるサーバで、データベース管理システムが動作する様子を示している。It shows how the database management system operates on the server in the embodiment. 実施例における、データベース管理システムが動作するためのデータベース管理システム構成情報を示している。The database management system configuration information for the database management system to operate in the embodiment is shown. 実施例におけるOLTPのDBインスタンス定義ファイルの例を示している。The example of the DB instance definition file of OLTP in an Example is shown. 実施例におけるCRMのDBインスタンス定義ファイルの例を示している。The example of the DB instance definition file of CRM in an Example is shown. 実施例におけるトポロジ情報の例を示している。The example of the topology information in an Example is shown. 実施例における割当情報の例を示している。The example of the allocation information in an Example is shown. 実施例におけるDB情報の例を示している。The example of DB information in an example is shown. 実施例におけるデータベース管理システムの処理フローを示している。The processing flow of the database management system in an Example is shown. 実施例におけるデータベース管理システムの処理フローを示している。The processing flow of the database management system in an Example is shown. 実施例におけるデータを共有するDBインスタンスの割当て例を示している。The example of allocation of DB instance which shares the data in an Example is shown. 実施例におけるデータを共有しないDBインスタンスの割当て例を示している。The example of allocation of DB instance which does not share the data in an Example is shown. 実施例におけるトランザクション処理を行うスレッドがデータにアクセスする際の概念図を示している。The conceptual diagram at the time of the thread which performs transaction processing in an Example accesses data is shown. 実施例におけるアクセス制御部の処理フローを示している。The processing flow of the access control part in an Example is shown. 実施例におけるアクセス制御部の処理フローを示している。The processing flow of the access control part in an Example is shown.
 以下、実施例を図面を用いて説明する。 Hereinafter, examples will be described with reference to the drawings.
 図1は、本発明が対象としている計算機システムの例を示している。サーバ101は、ネットワーク103を介して、複数のクライアント(クライアント1(105)、クライアント2(106)、クライアントN(107))と接続されている。サーバ101は、クライアントで稼働しているアプリケーションプログラム(APP)からの要求を受け取り、サーバ101で処理した結果をクライアントのAPPへ送信する。 FIG. 1 shows an example of a computer system targeted by the present invention. The server 101 is connected to a plurality of clients (client 1 (105), client 2 (106), client N (107)) via the network 103. The server 101 receives a request from an application program (APP) running on the client, and transmits the result processed by the server 101 to the client APP.
 サーバ101は、主に、ノードと、ノードを接続するバスにより構成されている。バスは、システムインターコネクトバスと呼ばれる。システムインターコネクトバスは、1つのバスとして存在することもあれば、図1のように、システムインターコネクトバス190および191と、コントローラ193のように、バスとコントローラの組み合わせで構成されることもある。 The server 101 is mainly composed of nodes and buses that connect the nodes. The bus is called a system interconnect bus. The system interconnect bus may exist as one bus, or may be configured by a combination of a bus and a controller, such as system interconnect buses 190 and 191 and a controller 193 as shown in FIG.
 システムインターコネクトバス190、191には、複数のノード(ノード1(110)、ノード2(130)、ノード3(150)、ノード4(170))が接続されている。各ノードは、プロセッサとメモリが直接に接続される。プロセッサは、I/Oコントローラを介して、デバイスと接続されている。 A plurality of nodes (node 1 (110), node 2 (130), node 3 (150), node 4 (170)) are connected to the system interconnect buses 190 and 191. In each node, a processor and a memory are directly connected. The processor is connected to the device via the I / O controller.
 例えば、ノード1(110)では、プロセッサ1(114)は、4つのコアであるコア118、コア119、コア120、コア121を持つ。さらに、プロセッサ1(114)は、メモリコントローラ1(116)を持ち、メモリ1(112)と接続されている。またノード1(110)内のI/Oコントローラ1(122)には、2次記憶装置1(124)と通信装置1(128)が接続されている。 For example, in the node 1 (110), the processor 1 (114) has four cores, that is, a core 118, a core 119, a core 120, and a core 121. Further, the processor 1 (114) has a memory controller 1 (116) and is connected to the memory 1 (112). The secondary storage device 1 (124) and the communication device 1 (128) are connected to the I / O controller 1 (122) in the node 1 (110).
 2次記憶装置1には、サーバ101内で使うファイルの一部が格納されている。具体的には、プログラム125、データ126、ログ127が格納されている。図1において、各ノードの構成と役割は、ノード1(110)と同様である。 The secondary storage device 1 stores a part of files used in the server 101. Specifically, a program 125, data 126, and a log 127 are stored. In FIG. 1, the configuration and role of each node are the same as those of the node 1 (110).
 サーバ101は、NUMA(Non-Uniform Memory Access)と呼ばれる形態の計算機となっている。各プロセッサ内のそれぞれのコアは、すべてのメモリにアクセスすることができる。 The server 101 is a computer called NUMA (Non-Uniform Memory Access). Each core in each processor can access all memory.
 しかし、アクセスの速度は、どのコアがどのアドレスにリードまたはライトするかによって異なる。例えば、ノード1にあるコア118は、メモリ1(112)の方が、メモリ2(132)よりも高速にアクセスできる。コア118は、メモリ1に、プロセッサ1(114)のメモリコントローラ1(116)経由でアクセスできる。しかし、コア118は、メモリ2(132)には、インターコネクトバス190を介してアクセスすることになるため、アクセスのレイテンシが大きい。 However, the access speed differs depending on which core reads or writes to which address. For example, the core 118 in the node 1 can access the memory 1 (112) at a higher speed than the memory 2 (132). The core 118 can access the memory 1 via the memory controller 1 (116) of the processor 1 (114). However, since the core 118 accesses the memory 2 (132) via the interconnect bus 190, the access latency is large.
 さらに、コア118にとっては、インターコネクトバスを介するメモリアクセスでも、メモリ2(132)の方が、メモリ3(152)よりも高速にアクセスできる。コア118が、メモリ2(132)にアクセスする場合は、システムインターコネクトバス190を介するのに対し、メモリ3(152)にアクセスする場合は、システムインターコネクトバス190に加え、システムインターコネクトバス191、コントローラ193を介する必要があるためである。 Furthermore, for the core 118, the memory 2 (132) can be accessed at a higher speed than the memory 3 (152) even in the memory access via the interconnect bus. The core 118 accesses the memory 2 (132) via the system interconnect bus 190, whereas when accessing the memory 3 (152), in addition to the system interconnect bus 190, the system interconnect bus 191 and the controller 193 It is because it is necessary to go through.
 サーバ101で動作するソフトウェアからみて、計算を実行するプロセッサは、各ノードのプロセッサを合わせた270に相当する。メモリは、各ノードのメモリを合わせた200に相当する。ノードに接続された2次記憶装置には、明示されていないがオペレーティングシステム260の実行ファイルが格納されている。 From the viewpoint of software operating on the server 101, the processor that executes the calculation corresponds to 270 including the processors of the respective nodes. The memory corresponds to 200 including the memory of each node. An execution file of the operating system 260 is stored in the secondary storage device connected to the node, although it is not explicitly shown.
 オペレーティングシステム260は、プロセッサ270、メモリ200上で動作し、さらに、アプリケーションがプロセッサ270およびメモリ200上で動作するために各種資源を管理する。オペレーティングシステム260は、アプリケーションに対し、プロセッサ、コアのアフィニティ機能を提供している。アプリケーションは、アフィニティ機能を用いてオペレーティングシステム260に要求することで、特定のプロセッサおよびコア上で動作できる。 The operating system 260 operates on the processor 270 and the memory 200, and further manages various resources for the application to operate on the processor 270 and the memory 200. The operating system 260 provides processor and core affinity functions for applications. Applications can run on specific processors and cores by requesting the operating system 260 using the affinity feature.
 また、オペレーティングシステム260は、アプリケーションに対して、メモリの割当て方針を指定する機能を提供している。これにより、アプリケーションは、自身が使う仮想メモリ領域を、特定ノードの物理メモリから割り当てるようオペレーティングシステム260に要求することができる。 In addition, the operating system 260 provides a function for designating a memory allocation policy for an application. Thereby, the application can request the operating system 260 to allocate the virtual memory area used by the application from the physical memory of the specific node.
 図2は、サーバで、ソフトウェア、特にデータベース管理システムが動作する様子を示している。 FIG. 2 shows how the software, particularly the database management system, operates on the server.
 データベース管理システム220は、データの原子性、一貫性、分離性、持続性を保証するソフトウェアである。データベース管理システム220は、オペレーティングシステム260の管理下にあるアプリケーションプログラムであり、複数のプロセスおよびスレッドとして動作する。 The database management system 220 is software that guarantees atomicity, consistency, separation, and persistence of data. The database management system 220 is an application program under the management of the operating system 260 and operates as a plurality of processes and threads.
 図2には、データベース管理システム220の主要な構成を図示している。データベース管理システム220は、図2には図示されていないが、SQLで記述されたクライアントのアプリケーションからの要求を受付け、トランザクションとしてその要求を処理するために、複数の部位から構成されている。具体的には、クライアントとのネットワーク接続管理と、データを送受信する接続・通信管理のモジュールが存在する。また、クライアントから要求されたデータの参照、更新などのトランザクションを実現する基本情報を管理するトランザクション管理部がある。 FIG. 2 illustrates the main configuration of the database management system 220. Although not shown in FIG. 2, the database management system 220 includes a plurality of parts in order to accept a request from a client application described in SQL and process the request as a transaction. Specifically, there are modules for network connection management with a client and connection / communication management for transmitting and receiving data. In addition, there is a transaction management unit that manages basic information for realizing a transaction such as reference and update of data requested by a client.
 加えて、データベース管理システム220へのデータ操作要求として利用されるSQL言語の解析と実行プランを管理するSQL管理部が存在する。データベース管理システム220の内部では、データはテーブルとして管理されるのが一般的であり、このためにテーブル管理部を備える。また、データベース管理システム220は、トランザクションが操作対象のデータに高速にアクセスするためにインデックスを用いることができ、このためにインデックス管理部を持つ。 In addition, there is a SQL management unit that manages an SQL language analysis and execution plan used as a data operation request to the database management system 220. In the database management system 220, data is generally managed as a table, and a table management unit is provided for this purpose. Further, the database management system 220 can use an index so that a transaction can access data to be operated at high speed, and has an index management unit for this purpose.
 データベース管理システム220では、全体を管理するためにデータベース管理スレッド360、トポロジ管理スレッド370が動作する。データベース管理スレッド360では、データベース管理システム220上で動作するデータベースの情報をDB情報362に保持している。またデータベース管理システム220が使用可能なコア、メモリなどの資源の総量、各インスタンスでの使用状況および使用量を割当情報364に保持する。データベース管理スレッド360は、データベース管理システム220のスレッドを管理するため、スレッド割当て部380を持つ。 In the database management system 220, a database management thread 360 and a topology management thread 370 operate to manage the whole. In the database management thread 360, database information that operates on the database management system 220 is held in the DB information 362. The allocation information 364 holds the total amount of resources such as cores and memories that can be used by the database management system 220, the usage state and the usage amount in each instance. The database management thread 360 has a thread allocation unit 380 for managing threads of the database management system 220.
 また、データのメモリへの割当てを管理するために、データ割当て部382が存在する。トポロジ管理スレッド370は、サーバ101の構成情報をオペレーティングシステム260から取得し、トポロジ情報372として保持する。 Also, a data allocation unit 382 exists to manage allocation of data to memory. The topology management thread 370 acquires configuration information of the server 101 from the operating system 260 and holds it as topology information 372.
 データベース管理システム220は、内部のデータアクセスを管理するため、アクセス制御部384を持つ。さらに、データベース管理システム220は、クライアントからのデータの操作を永続化するため、サーバ101の2次記憶に、ログ(127、147、167、187)として操作情報を記録する。ログ生成部386は、ログのデータを管理する。また、データベース管理システム220全体の稼動情報、性能情報は、統計情報390として保持され、図示されていないがデータベースの管理インタフェースを通して参照できる。 The database management system 220 has an access control unit 384 for managing internal data access. Further, the database management system 220 records operation information as logs (127, 147, 167, 187) in the secondary storage of the server 101 in order to make the data operation from the client permanent. The log generation unit 386 manages log data. Further, the operation information and performance information of the entire database management system 220 are held as statistical information 390 and can be referred to through a database management interface (not shown).
 データベース管理システム220は、複数のDBインスタンスを実行することができるインメモリデータベースとして動作する。 The database management system 220 operates as an in-memory database that can execute a plurality of DB instances.
 DBインスタンスは複数のスレッドで構成され独立した記憶領域と独立した制御をもつ。データベース管理システム220が確保したメモリは、データ割当て部382によって、各DBインスタンスに割当てられる。割り当てられたメモリは、各DBインスタンスのメモリ管理スレッドがDBインスタンス内で必要なメモリを管理する。データベースのログについても、各DBインスタンスのログ管理スレッドがログ生成部386の機能を用いてデータベースの操作情報を2次記憶に記録する。 DB instance is composed of multiple threads and has independent storage area and independent control. The memory secured by the database management system 220 is allocated to each DB instance by the data allocation unit 382. For the allocated memory, the memory management thread of each DB instance manages the memory required in the DB instance. Also for the database log, the log management thread of each DB instance records the database operation information in the secondary storage using the function of the log generation unit 386.
 図2では、オンライントランザクション処理(OLTP)を実現するDBインスタンス1(300)と顧客関係管理(CRM)を実現するDBインスタンス2(330)がデータベース管理システム220上で動作している。 2, a DB instance 1 (300) that realizes online transaction processing (OLTP) and a DB instance 2 (330) that realizes customer relationship management (CRM) are operating on the database management system 220.
 OLTPは、基幹系システムの中でも重要なデータベースであり、大量のトランザクションを高速に実行しなければならない。CRMは、OLTPの情報を元に顧客管理を行うためのデータベースである。基幹系システムにおける重要度は、OLTPよりも低い。 OLTP is an important database in mission-critical systems, and must execute a large number of transactions at high speed. The CRM is a database for performing customer management based on OLTP information. The importance in the backbone system is lower than that of OLTP.
 従来は、CRMが利用するOLTPのデータは、1日に1度などの定期的な頻度でバッチ処理を実行し、OLTPのデータベースから変更履歴を抜き出し、変更履歴をCRMにロードすることで、データを共有していた。計算機技術の発展により、OLTPとCRMなどの複数のデータベースが、1台の計算機上で実行できるようになった。本実施例では、単一のインメモリデータベース管理システム上で、データベースの複数のDBインスタンスを実行することにより、バッチ処理なしで、共有することを可能とする。 Conventionally, OLTP data used by CRM is processed by executing batch processing at a regular frequency such as once a day, extracting the change history from the OLTP database, and loading the change history into the CRM. Was sharing. With the development of computer technology, multiple databases such as OLTP and CRM can be executed on a single computer. In the present embodiment, by executing a plurality of DB instances of a database on a single in-memory database management system, sharing is possible without batch processing.
 DBインスタンス1(300)は、OLTPのためのDBインスタンスであり、トランザクション1(304)とトランザクション2(308)を実行するために、トランザクションスレッド1(302)とトランザクションスレッド2(306)が動作している。 The DB instance 1 (300) is a DB instance for OLTP, and the transaction thread 1 (302) and the transaction thread 2 (306) operate in order to execute the transaction 1 (304) and the transaction 2 (308). ing.
 DBインスタンス1(300)は、表データとして、店舗情報310、在庫情報312、商品情報314、注文情報316、顧客情報318の5つの情報を管理している。このうち、注文情報316、顧客情報318については、他のDBインスタンスと共有を可能としている。メモリ管理スレッド1(320)は、DBインスタンス1(300)が動作するために確保されたメモリを管理している。ログ管理スレッド1(322)は、オンライントランザクション処理のログを生成、管理する。 The DB instance 1 (300) manages five pieces of information including store information 310, inventory information 312, product information 314, order information 316, and customer information 318 as table data. Among these, the order information 316 and the customer information 318 can be shared with other DB instances. The memory management thread 1 (320) manages the memory secured for the DB instance 1 (300) to operate. The log management thread 1 (322) generates and manages a log of online transaction processing.
 DBインスタンス2(320)は、CRMのためのインスタンスであり、表データとして、問合せ情報340、販促情報342、売上情報344、注文情報346および顧客情報348を持つ。このうち注文情報346は、DBインスタンス1の注文情報316を参照することで実現している。顧客情報348も同様に、顧客情報318を参照することで実現している。 DB instance 2 (320) is an instance for CRM and has inquiry information 340, sales promotion information 342, sales information 344, order information 346, and customer information 348 as table data. Of these, the order information 346 is realized by referring to the order information 316 of the DB instance 1. Similarly, the customer information 348 is realized by referring to the customer information 318.
 前述したように、OLTPは、CRMより重要度が高いシステムであるため、DBインスタンス1(300)の方が、DBインスタンス2(320)よりも優先して動作することが求められる。すなわち、DBインスタンス1(300)の優先度は、DBインスタンス2(320)の優先度より高い。 As described above, since OLTP is a system with higher importance than CRM, DB instance 1 (300) is required to operate in preference to DB instance 2 (320). That is, the priority of DB instance 1 (300) is higher than the priority of DB instance 2 (320).
 したがって、DBインスタンス1(300)のプロセスとスレッド(302、306、320、322)は、DBインスタンス2(320)のプロセスとスレッド(332、336、350、352)より優先して動作する。 Therefore, the process and thread (302, 306, 320, 322) of the DB instance 1 (300) operate with priority over the process and thread (332, 336, 350, 352) of the DB instance 2 (320).
 DBインスタンスを構成するプロセス、スレッドが、別のDBインスタンスよりも優先して動作するためには、共有する資源を、優先度の低いDBインスタンスに阻害されないようにする必要がある。従来より、1つのデータベースが複数のユーザから利用される場合の並行処理制御方式が考えられてきた。本実施例は、データを部分的に共有する複数のデータベースが、複数のユーザから利用される場合の処理方式に関する。なお、実施例では、OLTPとCRMについて記載しているが、組み合わせて使用するデータベースはERPやOLAP(Online Analytical Processing)でもよい。 In order for the processes and threads that make up a DB instance to operate with priority over another DB instance, it is necessary to prevent the shared resources from being obstructed by the DB instance with a lower priority. Conventionally, a parallel processing control method in the case where one database is used by a plurality of users has been considered. The present embodiment relates to a processing method when a plurality of databases partially sharing data are used by a plurality of users. In the embodiment, OLTP and CRM are described, but the database used in combination may be ERP or OLAP (Online Analytical Processing).
 図3は、データベース管理システムが動作するためのデータベース管理システム構成情報を示している。本データは、サーバ101の2次記憶装置にデータ(126、146、166または186)としてファイルで格納されており、データベース管理システム220が起動する際に、データベース管理スレッド360が読み込む。ノード数405は、データベース管理システム220が、サーバ101のノードをいくつ利用するかが記載されている。 FIG. 3 shows database management system configuration information for the database management system to operate. This data is stored as data (126, 146, 166 or 186) in the secondary storage device of the server 101 as a file, and is read by the database management thread 360 when the database management system 220 is activated. The number of nodes 405 describes how many nodes of the server 101 the database management system 220 uses.
 図3では、すべてのノードを利用する設定となっている。コア数410は、データベース管理システム220が全体で利用可能とするプロセッサのコア数が記載されている。 In FIG. 3, all nodes are set to be used. The number of cores 410 describes the number of cores of the processor that can be used by the database management system 220 as a whole.
 メモリサイズ415は、データベース管理システム220が動作する際に、オペレーティングシステム260から確保するメモリサイズを示している。DB共有メモリサイズ420は、データベース管理システム220上で複数のDBインスタンスが動作する際、DBインスタンス間で共有して使うメモリ、および全体管理に利用するメモリ量を示している。DBインスタンス定義ファイル425は、データベース管理システム220が起動後にロードするDBインスタンスの設定ファイルを示している。図3では、トランザクション処理(OLTP)と顧客関係管理(CRM)のDBインスタンスが設定されている。 The memory size 415 indicates a memory size secured from the operating system 260 when the database management system 220 operates. The DB shared memory size 420 indicates the memory that is shared between DB instances and the amount of memory that is used for overall management when a plurality of DB instances operate on the database management system 220. The DB instance definition file 425 indicates a DB instance setting file that is loaded after the database management system 220 is activated. In FIG. 3, DB instances for transaction processing (OLTP) and customer relationship management (CRM) are set.
 図4は、実施例におけるOLTPのDBインスタンスの定義ファイルの例を示している。DBインスタンス定義ファイル500は、OLTPのDBインスタンス1(300)を起動するために利用される。DBインスタンス名505は、システム管理者が当該DBインスタンスをデータベース管理システム220上で識別するための識別子である。 FIG. 4 shows an example of an OLTP DB instance definition file in the embodiment. The DB instance definition file 500 is used to start the DB instance 1 (300) of OLTP. The DB instance name 505 is an identifier for the system administrator to identify the DB instance on the database management system 220.
 優先度510は、データベース管理システム220上で複数のDBインスタンスが動作する場合、DBインスタンスごとに設定される実行優先度を示す。優先度510で設定されている「1」は、最高優先度で動作することを表している。メモリ容量515は、当該DBインスタンスが動作するために、データベース管理システム220内で割り当てるサイズである。共有メモリ容量517は、当該DBインスタンスが他のDBインスタンスとデータ共有に利用するために、データベース管理システム220内で割り当てるメモリのサイズである。この情報を元に、データ割当て部が当該DBインスタンス用にメモリを確保する。 The priority 510 indicates an execution priority set for each DB instance when a plurality of DB instances operate on the database management system 220. “1” set in the priority 510 indicates that the operation is performed with the highest priority. The memory capacity 515 is a size allocated in the database management system 220 in order for the DB instance to operate. The shared memory capacity 517 is the size of memory allocated in the database management system 220 so that the DB instance can be used for data sharing with other DB instances. Based on this information, the data allocation unit reserves memory for the DB instance.
 コア数520は、当該DBインスタンスを動作させるために割り当てるコア数である。本実施例では、データベース管理システム220のスレッド割当て部380は、サーバ101の1つのコアに、1つのDBインスタンスを割当てる(2つ以上のDBインスタンスが、同じコアを利用しない)。最大トランザクション525は、1秒間に当該DBインスタンスが処理すべきトランザクション数を示している。平均レスポンスタイム530は、当該DBインスタンスで処理されるトランザクションの目標平均処理時間を示す。 The number of cores 520 is the number of cores assigned to operate the DB instance. In this embodiment, the thread assignment unit 380 of the database management system 220 assigns one DB instance to one core of the server 101 (two or more DB instances do not use the same core). The maximum transaction 525 indicates the number of transactions to be processed by the DB instance per second. The average response time 530 indicates a target average processing time of a transaction processed by the DB instance.
 管理テーブル情報535には、当該インスタンスで利用するテーブルのうち、自身がデータベース管理システム220上で所有者となって管理する表データの情報を示す。管理テーブル535には、テーブルの名称(識別子)の他に、テーブルが他のDBインスタンスと共有できるか否かを示す情報、データをIDなどのキー値を用いてパーティショニングするかどうかについても、合わせて定義されている。管理テーブル情報535には、店舗情報、在庫情報および商品情報が共有不可として、注文情報、在庫情報が共有可として定義されている。OLTPのDBインスタンス定義ファイル500は、どのテーブルもパーティショニングを利用しない。 The management table information 535 indicates table data information that is managed by the database management system 220 as an owner among the tables used in the instance. In addition to the table name (identifier), the management table 535 includes information indicating whether or not the table can be shared with other DB instances, and whether or not to partition the data using a key value such as an ID. They are defined together. The management table information 535 defines that store information, inventory information, and product information cannot be shared, and that order information and inventory information can be shared. The OLTP DB instance definition file 500 does not use partitioning for any table.
 なお、本実施例では、テーブルのスキーマは別のデータファイル内で定義されるものとして記載している。参照テーブル540には、当該DBインスタンスが、他DBインスタンスが所有するテーブルの情報を記載する。DBインスタンス1(300)は、他のDBインスタンスのテーブルを参照しないため、設定はない。 In this embodiment, the table schema is described as being defined in another data file. In the reference table 540, information on tables owned by other DB instances is described in the DB instance. Since DB instance 1 (300) does not refer to the tables of other DB instances, there is no setting.
 初期データファイル545は、DBインスタンス1(300)が起動する際にロードすべきデータを格納したファイルが設定される。ポート番号550は、クライアント(クライアント1(105)、クライアント2(106)、クライアントN(107))が、サーバ101に要求を出す際に指定するポート番号が格納されている。 In the initial data file 545, a file storing data to be loaded when the DB instance 1 (300) is started is set. The port number 550 stores a port number designated when a client (client 1 (105), client 2 (106), client N (107)) issues a request to the server 101.
 図5は、実施例におけるCRMのDBインスタンス定義ファイルの例を示している。DBインスタンス名605、優先度610、メモリ容量615、共有メモリ容量617、コア数620、最大トランザクション数625、平均レスポンスタイム630、初期データファイル645およびポート番号650は、定義ファイル500とは異なる値が設定されている。管理テーブル635には、DBインスタンス2(330)が所有する表データの情報を設定している。 FIG. 5 shows an example of a CRM DB instance definition file in the embodiment. DB instance name 605, priority 610, memory capacity 615, shared memory capacity 617, number of cores 620, maximum number of transactions 625, average response time 630, initial data file 645, and port number 650 have different values from the definition file 500. Is set. In the management table 635, information of table data owned by the DB instance 2 (330) is set.
 問合せ情報、販促情報および売上情報は、共有不可かつパーティショニングなしの表データとして定義されている。参照テーブル640には、DBインスタンス1(OLTP)が定義した表テーブルの情報を示している。注文情報は、識別子OLTPで起動されるインスタンスの表データ注文を示しており、管理テーブル535で定義する注文情報の表テーブルを意味している。顧客情報についても同様である。CRMの優先度は、610で定義されている「3」であり、OLTPの方が優先して処理される。参照するOLTPのデータに関しても、10分古いデータでも利用可能と定義している。 Inquiry information, sales promotion information, and sales information are defined as table data that cannot be shared and that are not partitioned. The reference table 640 shows information about the table table defined by the DB instance 1 (OLTP). The order information indicates a table data order of an instance activated by the identifier OLTP, and means a table table of order information defined by the management table 535. The same applies to customer information. The priority of CRM is “3” defined in 610, and OLTP is processed with higher priority. As for the OLTP data to be referred to, it is defined that data that is 10 minutes old can be used.
 図6はトポロジ情報の例を示している。ノード番号705には、どのノードの情報かが示されている。 FIG. 6 shows an example of topology information. The node number 705 indicates which node information.
 この例では、ノード番号705の値である1は、サーバ101のノード1(110)の意味で使用している。プロセッサ数710は、ノードに搭載されたプロセッサの数を示す。サーバ101のノード1(110)に搭載されているプロセッサの数は1であるため、「1」となっている。コア数715は、ノード内に存在するコア数を示している。メモリ720は、ノードに搭載されたメモリ容量を示す。 In this example, 1 which is the value of the node number 705 is used to mean the node 1 (110) of the server 101. The number of processors 710 indicates the number of processors mounted on the node. Since the number of processors mounted on the node 1 (110) of the server 101 is 1, it is “1”. The number of cores 715 indicates the number of cores existing in the node. The memory 720 indicates the memory capacity installed in the node.
 この例では、各ノードとも32GBのメモリが搭載されている。距離725は、各ノード間をアクセスする際のコストが代入される。この例では、ノード1からみて、ノード2へのアクセスコストは20である。ノード1から見て、ノード3、4へのアクセスコストは、サーバ101のコントローラ193とシステムインターコネクトバス191を使用する必要があるため40としている。デバイス730には、各ノードに搭載される装置が記録される。サーバ101に関しては、各ノードの通信装置も該当するが、記載を省略している。 In this example, 32 GB of memory is installed in each node. For the distance 725, the cost for accessing each node is substituted. In this example, when viewed from the node 1, the access cost to the node 2 is 20. When viewed from the node 1, the access cost to the nodes 3 and 4 is 40 because it is necessary to use the controller 193 of the server 101 and the system interconnect bus 191. In the device 730, a device mounted on each node is recorded. Regarding the server 101, the communication device of each node also corresponds, but the description is omitted.
 距離725は、例えば、データベース管理システム220のトポロジ管理スレッド370がオペレーティングシステム260に問い合わせることで取得できる。Linux(R)の場合、numactlコマンドの実行により求められる。 The distance 725 can be acquired by, for example, the topology management thread 370 of the database management system 220 inquiring the operating system 260. In the case of Linux (R), it is obtained by executing the numactl command.
 この例ではノード間でデータの参照/更新を行うときの負荷を示す値となっており、ノード1とノード1の間でデータの参照/更新を行うときは負荷を示す値が10であるのに対し、ノード1とノード4の間でデータの参照/更新を行うときの負荷を示す値は40となっている。 In this example, the value indicates the load when data is referred / updated between the nodes, and the value indicating the load is 10 when the data is referred / updated between the nodes 1 and 1. On the other hand, the value indicating the load when data is referred / updated between the node 1 and the node 4 is 40.
 図7は、実施例における割当情報の例を示している。大項目1700は、設定されている内容が、データベース管理システム220全体の情報か、各DBインスタンス固有の情報かを区別するために利用される。項目1702は、割り当てられる要素を示している。ノード1704は、割当てられる要素がノードとサーバ全体のどちらかを特定するために使用される。割当て1706は、各ノードまたは全体で割当てが可能な総量を示している。空き1708は、割当てが可能な総量に対して、現在の空き容量を示す。利用インスタンスID1710は、リソースを割り当てた際、どのDBインスタンスが利用しているかを管理するために使用される。なお、メモリの場合、容量だけでなく、開始アドレスや終了アドレスなどの情報も必要となるが、図示はしていない。 FIG. 7 shows an example of allocation information in the embodiment. The large item 1700 is used to distinguish whether the set content is information on the entire database management system 220 or information specific to each DB instance. An item 1702 indicates an element to be assigned. Node 1704 is used to specify whether the assigned element is a node or the entire server. The allocation 1706 indicates the total amount that can be allocated by each node or the whole. The free space 1708 indicates the current free space with respect to the total amount that can be allocated. The use instance ID 1710 is used to manage which DB instance is used when resources are allocated. In the case of a memory, not only the capacity but also information such as a start address and an end address is required, but it is not shown.
 全体1722~1730は、データベース管理システム220全体のコア割当てに関する情報を示している。この例では、ノード1のコアは、すべてDBインスタンス1に割当てられている(1722)。全体1732~1740は、データベース管理システム220全体のメモリ割当てに関する情報を示している。この例では、ノード1のメモリは、データベース管理システム220が25GB確保しており、DBインスタンス1が利用し、空き容量は1GBとなっている。 Numerals 1722 to 1730 indicate information related to core allocation of the entire database management system 220. In this example, the cores of node 1 are all assigned to DB instance 1 (1722). Reference numerals 1732 to 1740 indicate information related to memory allocation of the entire database management system 220. In this example, the memory of the node 1 is secured by the database management system 220 by 25 GB, used by the DB instance 1, and has a free capacity of 1 GB.
 1742~1750は、DBインスタンス1(300)のコア割当てに関する情報を示している。この例では、DBインスタンス1(300)は、ノード1のコアを割り当てている。1752~1764は、DBインスタンス1(300)のメモリ割当てに関する情報を示している。DBインスタンス1(300)は、ノード1より20GB確保している(1752)。 1742 to 1750 indicate information related to the core allocation of the DB instance 1 (300). In this example, DB instance 1 (300) is assigned the core of node 1. Reference numerals 1752 to 1764 denote information related to memory allocation of the DB instance 1 (300). The DB instance 1 (300) reserves 20 GB from the node 1 (1752).
 占有1762は、占有管理テーブルを割当てるメモリのノードを記録する領域である。共有1764は、共有可能管理テーブルの割当てが推奨されるメモリのノードを記録する領域である。共有1764の利用インスタンスIDには、当該DBインスタンスの共有可能管理テーブルを利用するDBインスタンスのIDが記録される。この例では、DBインスタンス1が要求するメモリサイズが大きくないため、占有、共有ともノード1を割当て、共有可能管理テーブルはDBインスタンス2が参照する。 Occupancy 1762 is an area for recording a memory node to which an occupancy management table is allocated. The share 1764 is an area for recording a memory node to which a shareable management table is recommended. In the use instance ID of the share 1764, the ID of the DB instance that uses the shareable management table of the DB instance is recorded. In this example, since the memory size required by the DB instance 1 is not large, the node 1 is allocated for both occupation and sharing, and the DB instance 2 refers to the shareable management table.
 1780以降は、DBインスタンス2(330)の割当て情報となっている。データの構成としてはDBインスタンス1(300)の1742~1764と同様であるため、記載を割愛している。 After 1780, the allocation information is DB instance 2 (330). Since the data configuration is the same as that of 1742 to 1764 of DB instance 1 (300), the description is omitted.
 図8は、実施例におけるDB情報の例を示している。ID1800は、情報が設定されるDBインスタンスIDが格納される。項目1802は、登録される項目を示している。値1(1804)と値2(1806)は、項目ごとに必要な設定値が格納される領域となっている。DB情報362に設定される内容は、各DBインスタンスのDBインスタンス定義ファイル(500、600)が基本となっている。 FIG. 8 shows an example of DB information in the embodiment. The ID 1800 stores a DB instance ID for which information is set. An item 1802 indicates an item to be registered. Value 1 (1804) and value 2 (1806) are areas for storing necessary setting values for each item. The contents set in the DB information 362 are based on the DB instance definition file (500, 600) of each DB instance.
 1820~1852は、OLTPを処理するDBインスタンス1(300)のDB情報を示す。ステータス1820は、現在、当該DBインスタンスの状態を示している。この例では、コアおよびメモリの割当てが完了したことを示している。メモリ容量1826、共有メモリ容量1827およびコア数1828は、DBインスタンス定義ファイルの設定値だけでなく、値2(1806)に未割当てのリソース量を格納している。この例では、割当てが完了しているため未割当てのリソース量は0となっている。共有可能管理テーブル1842、1844では、参照する可能性があるDBインスタンスのIDが格納されている。 1820 to 1852 indicate DB information of DB instance 1 (300) that processes OLTP. The status 1820 currently indicates the state of the DB instance. This example shows that the core and memory allocation has been completed. The memory capacity 1826, the shared memory capacity 1827, and the number of cores 1828 store the unallocated resource amount in the value 2 (1806) as well as the setting value of the DB instance definition file. In this example, since the allocation is completed, the unallocated resource amount is zero. In the sharable management tables 1842 and 1844, DB instance IDs that may be referred to are stored.
 1854~1862は、CRMを処理するDBインスタンス2(330)のDB情報を示している。参照テーブル1860では、DBインスタンス定義ファイル600に基づき、顧客テーブルの参照鮮度が10分と設定されている。これは、図5でも示した通り、CRMは、OLTPが保持する顧客のテーブルを参照するが、10分前の顧客データを参照することが許容されていることを意味する。 1854 to 1862 indicate DB information of DB instance 2 (330) that processes the CRM. In the reference table 1860, based on the DB instance definition file 600, the reference freshness of the customer table is set to 10 minutes. As shown in FIG. 5, this means that CRM refers to a customer table held by OLTP, but it is allowed to refer to customer data 10 minutes ago.
 図9は、データベース管理システムの処理フローを示している。 FIG. 9 shows the processing flow of the database management system.
 ステップ805:トポロジ管理スレッド370は、オペレーティングシステム260からサーバ101のハードウェア構成情報を取得する。 Step 805: The topology management thread 370 acquires the hardware configuration information of the server 101 from the operating system 260.
 ステップ810:トポロジ管理スレッド370は、取得したハードウェア構成情報をもとにトポロジ情報を生成し、トポロジ情報372として登録する。 Step 810: The topology management thread 370 generates topology information based on the acquired hardware configuration information and registers it as topology information 372.
 ステップ815:データベース管理スレッド360は、データベース管理システム220の構成情報として、データベース管理システム構成情報400を読み込み、DB情報362を作成する。 Step 815: The database management thread 360 reads the database management system configuration information 400 as the configuration information of the database management system 220, and creates DB information 362.
 ステップ820:データベース管理スレッド360のデータ割当て部382は、データベース管理システム構成情報400のメモリサイズ415を確保するため、トポロジ情報372を参照し、ノード数405に設定されたノードから割り当てるメモリサイズを決定する。例えば、設定されたメモリサイズを利用するノード数で割ったサイズを、1ノードあたりで確保するメモリサイズとする。データベース管理スレッド360のデータ割当て部382は、決定した各ノードから獲得するメモリサイズを割当情報364の1732~1740に登録する。 Step 820: The data allocation unit 382 of the database management thread 360 determines the memory size to be allocated from the node set to the node number 405 with reference to the topology information 372 in order to secure the memory size 415 of the database management system configuration information 400. To do. For example, a size obtained by dividing the set memory size by the number of nodes to be used is set as a memory size to be secured per node. The data allocation unit 382 of the database management thread 360 registers the memory size acquired from each determined node in 1732 to 1740 of the allocation information 364.
 ステップ825:データベース管理スレッド360のスレッド割当て部380は、データベース管理システム構成情報400のコア数410に指定されたコア数を、トロポジ情報372を参照し、決定する。スレッド割当て部380は、データ割当て部382が利用するノード内のコア数が、コア数410より大きいか等しい場合、データ割当て部382が利用するノードの中から使用するコア番号を決定する。 Step 825: The thread allocation unit 380 of the database management thread 360 determines the number of cores specified in the core number 410 of the database management system configuration information 400 with reference to the topology information 372. If the number of cores in the node used by the data allocation unit 382 is greater than or equal to the number of cores 410, the thread allocation unit 380 determines a core number to be used from among the nodes used by the data allocation unit 382.
 スレッド割当て部380は、データ割当て部382が利用するノード内のコア数が、コア数410より少ない場合、トポロジ情報372の距離725を参照する。スレッド割当て部380は、データ割当て部382が利用するノードから近い距離にあるノードを選択し、残りの使用コアを決定する。 When the number of cores in the node used by the data allocation unit 382 is smaller than the number of cores 410, the thread allocation unit 380 refers to the distance 725 of the topology information 372. The thread allocation unit 380 selects a node that is close to the node used by the data allocation unit 382 and determines the remaining cores to be used.
 データベース管理スレッド360は、決定したコア数を割当情報364に登録する。 The database management thread 360 registers the determined number of cores in the allocation information 364.
 ステップ830:データベース管理スレッド360は、データベース管理システム構成情報400のDBインスタンス定義ファイル425に指定されたファイルをひとつ読む。 Step 830: The database management thread 360 reads one file specified in the DB instance definition file 425 of the database management system configuration information 400.
 ステップ835:データベース管理スレッド360は、DBインスタンス定義ファイル(例えば、定義ファイル500)の情報をDB情報362に登録する。DBインスタンス定義ファイルの参照テーブル/鮮度(540、640)に定義情報がある場合、データベース管理スレッド360は、参照するDBインスタンスの共有可能管理テーブルに、当該DBインスタンスのIDを登録する。たとえば、CRMは、OLTPの顧客を参照するため、共有管理テーブル1844に、CRMのDBインスタンスIDである2を登録している。 Step 835: The database management thread 360 registers the information of the DB instance definition file (for example, the definition file 500) in the DB information 362. When there is definition information in the reference table / freshness (540, 640) of the DB instance definition file, the database management thread 360 registers the ID of the DB instance in the shareable management table of the DB instance to be referenced. For example, the CRM registers 2 as the CRM DB instance ID in the shared management table 1844 to refer to the OLTP customer.
 ステップ840:データベース管理スレッド360は、データベース管理システム構成情報400のDBインスタンス定義ファイル425に書かれたファイルのうち、読み込んでいないファイルがあるか判定する。ほかに読むファイルがある場合は、ステップ830に戻る。そうでなければ、850へ進む。 Step 840: The database management thread 360 determines whether there is an unread file among the files written in the DB instance definition file 425 of the database management system configuration information 400. If there are other files to read, the process returns to step 830. Otherwise, go to 850.
 図10は、図9の処理フローの続きを示している。 FIG. 10 shows the continuation of the processing flow of FIG.
 ステップ905:データベース管理スレッド360は、DB情報362を参照し、割当て設定が行われていないDBインスタンスの中から最も優先度の高いDBインスタンスを選択する。データベース管理スレッド360は、選択したDBインスタンスについてDB情報362のステータス(1820、1854)を割当て中に設定する。 Step 905: The database management thread 360 refers to the DB information 362 and selects the DB instance with the highest priority from among the DB instances that are not assigned. The database management thread 360 sets the status (1820, 1854) of the DB information 362 for the selected DB instance during allocation.
 ステップ910:データ割当て部382は、DB情報362の中で、パーティショニング1834などを参照し、当該DBインスタンスが、パーティショニングを使用するかどうかを判定する。パーティショニングをしない場合は、以下のように割当てを決める。 Step 910: The data allocation unit 382 refers to the partitioning 1834 or the like in the DB information 362, and determines whether or not the DB instance uses partitioning. When partitioning is not performed, allocation is determined as follows.
 データ割当て部382は、DB情報362を参照し、占有管理テーブル、共有可能管理テーブル、参照テーブルより、当該DBインスタンスが他のDBインスタンスのデータを参照するかどうかを判定する。 The data allocation unit 382 refers to the DB information 362 and determines whether the DB instance refers to data of another DB instance from the occupancy management table, the sharable management table, and the reference table.
 データ割当て部382は、優先度と他のDBインスタンスの参照の有無から、占有管理テーブルを割当てるノードを確定する。DBインスタンスの優先度が高く、かつ、他のDBインスタンスのデータを参照しない場合、データ割当て部382は、割当情報364の全体の空き領域(1732~1740の空きGB1708)を参照し、割当てが行われていないノードからメモリを割り当てる。DBインスタンスの優先度が低く、かつ、他DBインスタンスのデータを参照しない場合、データ割当て部382は、割当情報364およびトポロジ情報372を参照し、割当てが既に実施されたノードから遠い距離にあるノード上のメモリを確保する。 The data allocation unit 382 determines the node to which the occupancy management table is allocated based on the priority and the presence / absence of reference to another DB instance. When the priority of the DB instance is high and data of another DB instance is not referred to, the data allocation unit 382 refers to the entire free area (the free GB 1708 of 1732 to 1740) of the allocation information 364 and performs the allocation. Allocate memory from an unassigned node. When the priority of the DB instance is low and the data of the other DB instance is not referred to, the data allocation unit 382 refers to the allocation information 364 and the topology information 372, and is a node far from the node where the allocation has already been performed. Reserve memory above.
 他DBインスタンスのデータを参照し、他DBインスタンスの割当てが完了している場合、データ割当て部382は、割当情報364およびトポロジ情報372を参照し、参照するDBインスタンスが利用するノードから近い距離にあるノード上のメモリを確保する。この際、DBインスタンスの優先度が高い場合、近い距離にあるノードのうち、割当てが行われていないノードからメモリを割り当てる。 When the data of another DB instance is referred to and the allocation of the other DB instance is completed, the data allocation unit 382 refers to the allocation information 364 and the topology information 372, and is at a distance close to the node used by the DB instance to be referred to. Reserve memory on a node. At this time, when the priority of the DB instance is high, the memory is allocated from a node that is not allocated among the nodes at a short distance.
 なお、選択したノードのみで要求されたメモリ量(メモリ容量1826に設定された容量)が確保できない場合、データ割当て部382は、トポロジ情報372の距離725と割当情報364のメモリ1732~1738を参照し、既に選択したノードから近い距離にあるノードからメモリを割当てる。 If the requested memory amount (capacity set in the memory capacity 1826) cannot be secured only by the selected node, the data allocation unit 382 refers to the distance 725 of the topology information 372 and the memories 1732 to 1738 of the allocation information 364. Then, memory is allocated from a node that is close to the already selected node.
 データ割当て部382は、確保したメモリサイズを割当情報364の全体の空き領域(1732~1740の空きGB1708)から引く。また確保したメモリサイズを当該DBインスタンスの割当てに加算する(1752)。さらに、データ割当て部382は、当該DBインスタンスの占有1762に設定したノードを追加する。 The data allocation unit 382 subtracts the secured memory size from the entire free area (free GB 1708 of 1732 to 1740) of the allocation information 364. Further, the secured memory size is added to the allocation of the DB instance (1752). Further, the data allocation unit 382 adds a node set in the occupation 1762 of the DB instance.
 次に、データ割当て部382は、DB情報362を参照し、当該DBインスタンスが共有メモリ容量を設定し、共有可能管理テーブルがあるかどうかを確認する。占有管理テーブルを確保したノードに空き容量があれば、データ割当て部382は、共有メモリ容量(1827)に設定されたメモリ量をそのノードより割当てる。DBインスタンスの優先度が高く、占有管理テーブルを確保したノードに空き容量がなければ、データ割当て部382は、トポロジ情報372と割当情報364を参照し、占有管理テーブルを確保したノードから近い距離にある未割当てのノードから優先して共有メモリ容量を割当てる。DBインスタンスの優先度が低く、占有管理テーブルを確保したノードに空き容量がなければ、データ割り当て部382は、トポロジ情報372と割当情報364を参照し、占有管理テーブルを確保したノードに近く、優先度が低いDBインスタンスのデータが割当てられているノードから共有メモリ容量を割当てる。 Next, the data allocation unit 382 refers to the DB information 362 and confirms whether the DB instance sets a shared memory capacity and has a shareable management table. If there is free capacity in the node that secured the occupation management table, the data allocation unit 382 allocates the memory amount set in the shared memory capacity (1827) from the node. If the priority of the DB instance is high and there is no free capacity in the node that secures the occupancy management table, the data allocation unit 382 refers to the topology information 372 and the allocation information 364, and is closer to the node that secures the occupancy management table. The shared memory capacity is allocated preferentially from a certain unallocated node. If the priority of the DB instance is low and there is no free capacity in the node that secures the occupancy management table, the data allocation unit 382 refers to the topology information 372 and the allocation information 364 and is close to the node that secured the occupancy management table. A shared memory capacity is allocated from a node to which data of a DB instance having a low degree is allocated.
 データ割当て部382は、確保した共有メモリサイズを割当情報364の全体の空き領域(1732~1740の空きGB1708)から引く。また確保した共有メモリサイズを当該DBインスタンスの割当てに加算する(1752)。さらに、データ割当て部382は、当該DBインスタンスの共有1764に設定したノードを追加する。 The data allocation unit 382 subtracts the secured shared memory size from the entire free area of the allocation information 364 (free GB 1708 of 1732 to 1740). Further, the secured shared memory size is added to the allocation of the DB instance (1752). Further, the data allocation unit 382 adds the node set in the sharing 1764 of the DB instance.
 データ割当て部382は、当該DBインスタンスが参照するテーブルがある場合、参照するDBインスタンスが割当て済みであれば、割当て済みのDBインスタンスのメモリ情報の中で、共有で利用するメモリノードに当該DBインスタンスのIDを設定する。DBインスタンス2(330)がDBインスタンス1(300)のデータを共有する場合、共有1764の利用インスタンスIDに2を設定する。 If there is a table to which the DB instance refers, and the DB instance to be referenced is already allocated, the data allocation unit 382 assigns the DB instance to the memory node used for sharing in the memory information of the allocated DB instance. Set the ID. When the DB instance 2 (330) shares the data of the DB instance 1 (300), 2 is set as the use instance ID of the share 1764.
 データ割当て部382は、当該DBインスタンスがパーティショニングを利用する場合は、占有管理テーブルと共有可能管理テーブルの割当てにおいて、パーティショニングを行うテーブルのメモリ領域を割当てる際、複数のノードに分割して割り当てる。 When the DB instance uses partitioning, the data allocation unit 382 divides the allocation into a plurality of nodes when allocating the memory area of the table for partitioning when allocating the occupancy management table and the shareable management table. .
 ステップ915:スレッド割当て部380は、ステップ910で割り当てたノード上のコアを優先し、DB情報362に指定されたコア数(1828など)のコアを、割当情報364を利用し割り当てる。スレッド割当て部380は、データ割当て部382がステップ910で割り当てたノードの空きコア数が、当該DBインスタンスが必要とするコア数に満たない場合、トポロジ情報372の距離725を参照し、データを割り当てるノードから近い距離にあるノードを選択し、そこから利用するコアを割り当てる。 Step 915: The thread allocation unit 380 gives priority to the core on the node allocated in Step 910, and allocates the number of cores (1828, etc.) specified in the DB information 362 using the allocation information 364. If the number of free cores of the node allocated by the data allocation unit 382 in step 910 is less than the number of cores required by the DB instance, the thread allocation unit 380 refers to the distance 725 of the topology information 372 and allocates data. Select a node that is close to the node and assign the core to be used from there.
 割り当てたコア数を、ノードおよび全体の空きコア数から減らす。当該DBインスタンスの割当てコアに加算する。 減 ら す Reduce the number of allocated cores from the number of nodes and the total number of free cores. Add to the assigned core of the DB instance.
 ステップ920:データベース管理スレッド360は、選択しているDBインスタンスについてDB情報362のステータス(1820、1854)を割当て完に設定する。 Step 920: The database management thread 360 assigns and completely sets the status (1820, 1854) of the DB information 362 for the selected DB instance.
 ステップ925:データベース管理スレッド360は、DB情報362を参照し、全てのDBインスタンスのステータスが割当て完になっているかどうかを確認する。全てのDBインスタンスが割当て完になっている場合は、930へ進み、割当て処理を完了する。割当て完になっていないDBインスタンスが存在する場合は、ステップ905へ戻る。 Step 925: The database management thread 360 refers to the DB information 362, and confirms whether or not the statuses of all the DB instances are completely assigned. If all DB instances have been assigned, the process proceeds to 930 and the assignment process is completed. If there is a DB instance that has not been assigned, the process returns to step 905.
 データ割当て部382とスレッド割当て部380は、優先度が高いDBインスタンスから、メモリとコアを割り当てることで、優先度とDBインスタンス間でのデータ共有を考慮した資源の割当てを実現する。 The data allocating unit 382 and the thread allocating unit 380 realize the resource allocation considering the priority and the data sharing between the DB instances by allocating the memory and the core from the DB instance having the higher priority.
 図11は、実施例におけるデータを共有するDBインスタンスの割当て例を示している。データベース管理システム220が使用するメモリは、各ノード上で均等な容量が確保されている(1305、1320、1335、1350)。OLTPに使用するメモリ1310は、データ割当て部382により、ノード1(110)のメモリ1(112)から確保されている。CRMに使用するメモリは、ノード2(130)のメモリ2(132)と、ノード3のメモリ3(152)に分けて確保されている。 FIG. 11 shows an allocation example of DB instances sharing data in the embodiment. The memory used by the database management system 220 has a uniform capacity on each node (1305, 1320, 1335, 1350). The memory 1310 used for OLTP is secured from the memory 1 (112) of the node 1 (110) by the data allocation unit 382. The memory used for CRM is secured separately for the memory 2 (132) of the node 2 (130) and the memory 3 (152) of the node 3.
 OLTPで使用するコアは、高優先度のスレッドを実行するコアであり、スレッド割当て部380により、ノード1(110)のコア118、119、120、121に割当てられている(1370、1372、1374、1376)。CRMで使用するコアは、低優先度のスレッドを実行するコアであり、ノード2(130)のコア138、139、140に割当てられている(1380、1382、1384)。 The core used in OLTP is a core that executes a high-priority thread, and is assigned to the cores 118, 119, 120, and 121 of the node 1 (110) by the thread assignment unit 380 (1370, 1372, and 1374). 1376). The core used in CRM is a core that executes a low-priority thread, and is assigned to the cores 138, 139, and 140 of the node 2 (130) (1380, 1382, and 1384).
 このようにOLTP等の優先度の高いプログラム用の記憶領域やデータ処理を割当てる場合には可能な限り同じノードのメモリやコアに割り当て、メモリやコアが不足する場合はデータ参照の負荷が低い隣接するノードのコアやメモリを割り当てるようにする。 In this way, when allocating a storage area or data processing for a high priority program such as OLTP, it is allocated to the memory or core of the same node as much as possible. When there is a shortage of memory or core, the data reference load is low. Allocate the core and memory of the node to be used.
 さらに、OLTP用のデータを使用してデータ処理を行うCRMのようなプログラム用のメモリやコアはOLTP用に割り当てたメモリやコアを持つノードに隣接するノードへ割当てることにより、同じデータを処理する複数のプログラム間で不必要にデータ参照/更新の負荷を上げない処理が可能となる。 Further, a memory or core for a program such as CRM that performs data processing using data for OLTP processes the same data by assigning it to a node adjacent to the node having the memory or core assigned for OLTP. Processing that does not unnecessarily increase the load of data reference / update between multiple programs becomes possible.
 OLTPとCRMの両方で使用するデータは優先度の高いOLTP用データを割当てるノードへ割り当て、OLTPの処理をするときに負荷が上がらないようにする。 -Data used in both OLTP and CRM should be assigned to the node to which the high-priority OLTP data is assigned so that the load is not increased when OLTP processing is performed.
 データの容量、コアの必要数に依存してOLTPの処理が許容する場合は一部のノードでOLTP用とCRM用に割りつけられたデータやコアが共存してもよい。 If the OLTP processing is allowed depending on the data capacity and the required number of cores, data and cores allocated for OLTP and CRM may coexist in some nodes.
 データの参照/更新負荷は図6のようなトポロジ情報を参照して判断すればより正確な負荷の判断が可能であるが、ノード番号を負荷が低い順又は高い順に割り当て、ノード番号ができるだけ近いものを選択することにより、データを共有するプログラム間で不必要にデータ参照/更新の負荷を上げない簡易なシステムを提供することが可能となる。 If the data reference / update load is determined by referring to the topology information as shown in FIG. 6, it is possible to determine the load more accurately. However, the node numbers are assigned in ascending order of load or in descending order, and the node numbers are as close as possible. By selecting one, it is possible to provide a simple system that does not unnecessarily increase the load of data reference / update between programs sharing data.
 図12は、実施例におけるデータを共有しないDBインスタンスの割当て例を示している。 FIG. 12 shows an allocation example of DB instances that do not share data in the embodiment.
 OLTP用とOLTP用,CRM用とCRM用のように同種類のアプリケーションであっても良いが、データを共有する必要の無いプログラム間ではお互いにデータ参照/更新の負荷の影響がでにくいノードにメモリとコアを割当てる。 The same type of application may be used, such as for OLTP, OLTP, CRM, and CRM, but it is difficult for the programs that do not need to share data to be affected by the load of data reference / update. Allocate memory and cores.
 この例ではノード番号がデータ参照/更新の負荷を示す距離順に割り当てられているという前提でOLTP用のデータ、コアをノード1からノード番号の大きいノードへ順に割り当て、CRM用のデータを最もノード番号の大きいノードであるノード4からノード番号の小さいノードへ順に割り当てることにより、影響を低減している。トポロジ情報を用いて割当ててもよい。 In this example, on the assumption that the node numbers are assigned in order of distance indicating the load of data reference / update, the data for OLTP, the cores are assigned in order from the node 1 to the node with the largest node number, and the data for CRM is the node number The effect is reduced by allocating nodes 4 having a larger node number to nodes having a smaller node number. You may allocate using topology information.
 この場合であっても可能な限り、一つのノードへ割り付けるメモリやノードを集中した方が良い。 Even in this case, it is better to concentrate the memory and nodes allocated to one node as much as possible.
 図13は、トランザクション処理を行うスレッドがデータにアクセスする際の概念図を示している。 FIG. 13 is a conceptual diagram when a thread that performs transaction processing accesses data.
 図13はOLTPを処理するDBインスタンス1(300)のトランザクションスレッド1(302)とCRMを処理するDBインスタンス2(330)のトランザクションスレッド3(332)が、共有しているテーブルである顧客情報318にアクセスする様子を表している。 FIG. 13 shows customer information 318 that is a table shared by transaction thread 1 (302) of DB instance 1 (300) that processes OLTP and transaction thread 3 (332) of DB instance 2 (330) that processes CRM. It shows how to access.
 各トランザクション(304、334)を保持するトランザクションスレッド(302、332)は、データベース管理システム220のアクセス制御部384を用いて顧客情報318にアクセスする。OLTPのトランザクション304を実行するトランザクションスレッド1(302)は、高優先度のスレッドである。CRMのトランザクション332を実行するトランザクションスレッド3(332)は、低優先度のスレッドである。 The transaction thread (302, 332) holding each transaction (304, 334) accesses the customer information 318 using the access control unit 384 of the database management system 220. A transaction thread 1 (302) that executes the OLTP transaction 304 is a high-priority thread. The transaction thread 3 (332) that executes the CRM transaction 332 is a low-priority thread.
 顧客情報318は、テーブルの各行ごとに顧客データが格納されている。顧客情報318は、内部では、最新の行データを管理する管理情報1420と実データ1430から構成されている。 Customer information 318 stores customer data for each row of the table. The customer information 318 includes management information 1420 for managing the latest row data and actual data 1430 internally.
 OLTPの処理において顧客情報318のデータが更新されると、トランザクションスレッド302は、ログバッファ1440に更新ログ情報を生成する。図では、行2が変更された更新ログ情報1442が格納されている。ログ生成部386は、トランザクションスレッド1(302)とログ管理スレッド1(322)により実行され、ログバッファ1440を介して更新ログ情報を2次記憶に保存する。 When the data of the customer information 318 is updated in the OLTP process, the transaction thread 302 generates update log information in the log buffer 1440. In the figure, update log information 1442 in which row 2 is changed is stored. The log generation unit 386 is executed by the transaction thread 1 (302) and the log management thread 1 (322), and stores the update log information in the secondary storage via the log buffer 1440.
 CRMの領域では、顧客情報318の更新ログ情報を保持する更新履歴1450が存在する。図では、行1が更新された際の更新ログ情報1452が格納されている。メモリ管理スレッド320とメモリ管理スレッド350は、連携して、トランザクション処理とは別に、ログバッファ1442に書かれた顧客情報318の更新情報を定期的に更新履歴1450に書くことができる。アクセス制御情報1460には、DBインスタンス間のアクセス頻度情報、各DBインスタンスが最後にトランザクションを実行した時刻および参照したデータの更新時刻などを保持する。 In the CRM area, there is an update history 1450 that holds update log information of customer information 318. In the figure, update log information 1452 when row 1 is updated is stored. The memory management thread 320 and the memory management thread 350 can write the update information of the customer information 318 written in the log buffer 1442 periodically in the update history 1450 separately from the transaction processing. The access control information 1460 holds access frequency information between DB instances, the time when each DB instance last executed a transaction, the update time of referenced data, and the like.
 図の中で一つのノードの中に記載されているトランザクションスレッド(302,332)や顧客情報(318)は特定のノードに配置されるが、その他のノードを跨って記載されている構成要素はシステム上の位置を問わない。 The transaction thread (302, 332) and customer information (318) described in one node in the figure are arranged in a specific node, but the components described across other nodes are It does not matter where it is on the system.
 図14は、アクセス制御部の処理フローを示している。 FIG. 14 shows a processing flow of the access control unit.
 ステップ1500:トランザクションスレッドは、アクセス制御部384へ、データのアクセス(リード、ライト等)を依頼する。アクセス制御部384は、依頼に基づきアクセスすべきデータの特定を開始する。 Step 1500: The transaction thread requests the access control unit 384 to access data (read, write, etc.). The access control unit 384 starts specifying data to be accessed based on the request.
 ステップ1505:アクセス制御部384は、要求されたデータの種類から、データが他のDBインスタンスと共有するデータかどうかを確認する。要求されたデータの種類は、データベースの表(テーブル)であれば、DB情報362の占有管理テーブル(1836)、共有可能管理テーブル(1842、1844)、参照テーブル(1846)を検索することで判定することができる。 Step 1505: The access control unit 384 confirms whether the data is data shared with other DB instances from the requested data type. If the requested data type is a database table, it is determined by searching the occupancy management table (1836), sharable management tables (1842, 1844) and reference table (1846) of the DB information 362. can do.
 また、表以外のデータでも、領域の管理データとして、他DBインスタンスとの共有の可否を示す情報を持つことにより判定できる。データが他DBインスタンスと共有していれば、ステップ1510へ進む。共有していなければ、管理データおよび実データにアクセスする(1610)。 In addition, even data other than tables can be determined by having information indicating whether sharing with other DB instances is possible as area management data. If the data is shared with other DB instances, the process proceeds to step 1510. If not shared, the management data and actual data are accessed (1610).
 ステップ1510:アクセス制御部384は、実行しているトランザクションが要求されたデータの所有者であるかどうかを判定する。データの所有者であるかどうかは、例えば要求されたデータが表であれば、DB情報362の占有管理テーブル1836または共有可能管理テーブル1842に対象となる表の情報があるかどうかで判断することができる。 Step 1510: The access control unit 384 determines whether the transaction being executed is the owner of the requested data. For example, if the requested data is a table, whether or not it is the owner of the data is determined by whether or not there is information on the target table in the occupancy management table 1836 or the sharable management table 1842 of the DB information 362. Can do.
 また、ステップ1505と同様に、領域の管理データに所有者のDBインスタンスIDを登録しておくことで判定できる。データにアクセスするトランザクションが所有者の場合は、管理データおよび実データにアクセスする(1610)。所有者でなければ、ステップ1515へ進む。 Also, as in step 1505, the determination can be made by registering the owner's DB instance ID in the area management data. If the transaction for accessing the data is the owner, the management data and the actual data are accessed (1610). If not, go to step 1515.
 ステップ1515:アクセス制御部384は、データをアクセスするトランザクションを持つDBインスタンスの優先度が、当該データをアクセスする他のDBインスタンスの優先度より高いかどうかを判定する。データをアクセスするDBインスタンスの優先度は、DB情報362の優先度1824、トランザクションスレッド(302、332)の管理情報またはアクセスデータの管理情報を参照することで知ることができる。また、他DBインスタンスの優先度については、対象とするデータが表であれば、DB情報362から、当該データが存在する表を、参照テーブル1846に持つDBインスタンスを検索し、該当するDBインスタンスの優先度1824を参照することで知ることができる。 Step 1515: The access control unit 384 determines whether the priority of a DB instance having a transaction for accessing data is higher than the priority of other DB instances accessing the data. The priority of the DB instance that accesses data can be known by referring to the priority 1824 of the DB information 362, the management information of the transaction threads (302, 332), or the management information of the access data. As for the priorities of other DB instances, if the target data is a table, the DB information 362 is searched for a DB instance having a table in which the data exists in the reference table 1846, and the DB instance of the corresponding DB instance is searched. This can be known by referring to the priority 1824.
 あるいは、アクセス対象となるデータの管理情報として、利用するDBインスタンスのリストと優先度を保持しておき、データをアクセスするトランザクションのDBインスタンスの優先度と他のDBインスタンスの優先度を比較することでも実現できる。データをアクセスするDBインスタンスが、他に参照するDBインスタンスより優先度が高ければ、管理データおよび実データにアクセスする(1610)。そうでなければ、ステップ1520へ進む。 Alternatively, as management information of data to be accessed, a list of DB instances to be used and priorities are held, and the DB instance priority of a transaction accessing data is compared with the priorities of other DB instances. But it can be realized. If a DB instance that accesses data has a higher priority than other DB instances that are referred to, the management data and actual data are accessed (1610). Otherwise, go to step 1520.
 ステップ1520:アクセス制御部384は、要求されているデータアクセスが、データを新たに書き込む操作または更新する操作であるかを判定する。書込みまたは更新である場合は、ステップ1525へ進む。参照のみの操作であれば、ステップ1540へ進む。 Step 1520: The access control unit 384 determines whether the requested data access is an operation for newly writing or updating data. If it is write or update, the process proceeds to step 1525. If the operation is a reference only operation, the process proceeds to step 1540.
 ステップ1525:アクセス制御部384は、アクセス制御管理情報1460を参照し、トランザクションを実行するDBインスタンスが、参照先のDBインスタンスへアクセス可能な頻度を確認する。 Step 1525: The access control unit 384 refers to the access control management information 1460, and confirms the frequency with which the DB instance executing the transaction can access the reference DB instance.
 ステップ1530:アクセス制御部384は、ステップ1525で求めたアクセス可能な頻度と実績を比較し、目標以下となっているかどうかを確認する。目標以下となっている場合は、管理データにアクセスする(1600)。 Step 1530: The access control unit 384 compares the accessible frequency obtained in step 1525 with the actual result and confirms whether or not the target is below the target. If it is below the target, the management data is accessed (1600).
 ステップ1535:アクセス制御部384は、当該トランザクションは、参照するデータを保持していないDBインスタンスのトランザクションであり、当該DBインスタンスは参照先のDBインスタンスへ頻繁にアクセスしているため、アクセスの処理を遅らせるタイミング調整を実行する。 Step 1535: The access control unit 384 performs the access process because the transaction is a transaction of a DB instance that does not hold the data to be referred to, and the DB instance frequently accesses the reference DB instance. Perform timing adjustment to delay.
 例えば、目標値を満たすように当該トランザクションスレッドでスリープ関数を発行し、ビジーウェイトのループを実行することにより一時的に他のトランザクション処理を実行できるようにする。ウェイト処理後に管理データにアクセスする(1600)。 For example, a sleep function is issued by the transaction thread so as to satisfy the target value, and another transaction process can be temporarily executed by executing a busy wait loop. The management data is accessed after the wait process (1600).
 ステップ1540:アクセス制御部384は、当該トランザクションのデータ参照として、データを所有するDBインスタンスが管理する最新のオリジナルデータではなく、データの更新履歴などから、参照可能な以前のデータまたはコピーされたデータが参照できるか検索する。具体的には、次の操作のいずれか、または、全てを行い、対象となるデータがあるかどうかを確認し、ステップ1545へ進む。 Step 1540: The access control unit 384 refers to the previous data or copied data that can be referred from the data update history, not the latest original data managed by the DB instance that owns the data, as the data reference of the transaction. Search if can see. Specifically, any or all of the following operations are performed to check whether there is target data, and the process proceeds to step 1545.
 (1)当該トランザクションを実行しているDBインスタンスが管理する更新履歴1450のエントリとして、アクセスするデータが存在するか検索する。 (1) A search is performed as to whether there is data to be accessed as an entry of the update history 1450 managed by the DB instance executing the transaction.
 (2)オリジナルのデータを管理するDBインスタンスが保持するログバッファ内に、アクセスするデータの変更記録が存在しているか検索する。 (2) Search for a change record of the data to be accessed in the log buffer held by the DB instance that manages the original data.
 (3)オリジナルのデータを管理するDBインスタンスのログが格納されている2次記憶装置にアクセスし、直近のログファイル内にアクセスするデータの更新ログデータが存在するか検索する。 (3) Access the secondary storage device storing the DB instance log that manages the original data, and search for the updated log data of the accessed data in the latest log file.
 ステップ1545:アクセス制御部384は、ステップ1540でデータが見つかったならば、ステップ1550へ進む。見つからなかった場合は、ステップ1525へ進む。 Step 1545: If the data is found in Step 1540, the access control unit 384 proceeds to Step 1550. If not found, the process proceeds to step 1525.
 ステップ1550:アクセス制御部384は、現在の時刻と、見つかったデータの更新時刻の差を求める。アクセス制御部384は、DB情報362の当該DBインスタンスの参照テーブル/頻度の情報(1846など)と、求めた差を比較し、情報の鮮度が範囲内かを判定する。さらに、アクセス制御部384は、アクセス制御管理情報1460に格納されている前に実行したトランザクションが参照したデータの更新時刻と、見つかったデータの更新時刻を比較し、DBインスタンスが見つかったデータが有効な範囲内のデータか判定する。範囲内であれば古いデータにアクセスする(1625)。範囲内でなければ、管理データにアクセスする(1600)。 Step 1550: The access control unit 384 obtains the difference between the current time and the update time of the found data. The access control unit 384 compares the obtained DB instance reference table / frequency information (such as 1846) of the DB information 362 with the obtained difference, and determines whether the freshness of the information is within the range. Further, the access control unit 384 compares the update time of the data referenced by the previously executed transaction stored in the access control management information 1460 with the update time of the found data, and the data in which the DB instance is found is valid. It is determined whether the data is within a certain range. If it is within the range, the old data is accessed (1625). If it is not within the range, the management data is accessed (1600).
 なお、本実施例では、時刻を用いた判定方法を示しているが、トランザクションIDやプロセッサのタイムスタンプカウンタを用いて判定してもよい。 In this embodiment, the determination method using time is shown, but the determination may be made using a transaction ID or a time stamp counter of the processor.
 図15は、アクセス制御部の処理フローの続きを示している。 FIG. 15 shows the continuation of the processing flow of the access control unit.
 ステップ1610:アクセス制御部384は、要求されたデータのアクセスを、管理データおよび実データへのアクセスに確定する。当該トランザクションが、顧客情報318のデータを要求した場合、管理情報1420と実データ1430にアクセスする。 Step 1610: The access control unit 384 determines access to the requested data as access to management data and actual data. When the transaction requests the data of the customer information 318, the management information 1420 and the actual data 1430 are accessed.
 ステップ1600:アクセス制御部384は、要求された実データにアクセスする。当該トランザクションが、顧客情報318のデータを要求した場合、管理情報1420を参照するための処理を行う。 Step 1600: The access control unit 384 accesses the requested actual data. When the transaction requests the data of the customer information 318, a process for referring to the management information 1420 is performed.
 ステップ1605:アクセス制御部384は、管理情報を参照し、要求されたデータを当該トランザクションが現在操作可能か否かを判定する。例えば、ロックフラグが立っていないかどうかを確認する。操作可能な場合、ステップ1615へ進む。操作できない場合はステップ1620に進む。 Step 1605: The access control unit 384 refers to the management information and determines whether or not the transaction can currently operate the requested data. For example, it is confirmed whether or not a lock flag is set. If it can be operated, the process proceeds to Step 1615. If it cannot be operated, the process proceeds to step 1620.
 ステップ1615:アクセス制御部384は、当該トランザクションが、要求されたデータの最新の実データにアクセスすることを決定する。当該トランザクションが、顧客情報318のデータを要求した場合、実データ1430へアクセスする。 Step 1615: The access control unit 384 determines that the transaction accesses the latest actual data of the requested data. When the transaction requests the data of the customer information 318, the actual data 1430 is accessed.
 ステップ1620:アクセス制御部384は、当該トランザクションが、要求されたデータの最新の実データにアクセスすることを決定する。ただし、当該データは、他トランザクションが利用しているため、すぐにアクセスはせず、ロックの解放待ちの登録をするなどして、利用可能になるまで待ってからアクセスする。 Step 1620: The access control unit 384 determines that the transaction accesses the latest actual data of the requested data. However, since the data is used by other transactions, the data is not accessed immediately, but is registered after waiting for the lock to be released.
 ステップ1625:アクセス制御部384は、当該トランザクションは、ステップ1540で検索した古いデータにアクセスすることを決定する。当該トランザクションが、顧客情報318の行1を要求した場合は、更新履歴1450のエントリ1542を利用する。当該トランザクションが、顧客情報318の行2を要求した場合は、ログバッファ1440のエントリ1442を利用する。ログファイルに存在した場合は、ログファイルのデータを利用する。 Step 1625: The access control unit 384 determines that the transaction accesses the old data searched in Step 1540. When the transaction requests row 1 of the customer information 318, the entry 1542 of the update history 1450 is used. When the transaction requests line 2 of the customer information 318, the entry 1442 of the log buffer 1440 is used. If it exists in the log file, the log file data is used.
 なお、本実施例では、設定ファイル(DBインスタンス定義ファイル)にて、鮮度を指定する例について示している。鮮度を指定する方法としては、データベース管理システム220がコマンドインタフェースを利用する、問合せ文(SQL)に付加する、ことでも実現できる。 In the present embodiment, an example in which freshness is specified in a setting file (DB instance definition file) is shown. As a method for designating the freshness, the database management system 220 can also be added to a query statement (SQL) using a command interface.
 101 サーバ、200 メモリ、270 プロセッサ、220 データベース管理システム、260 オペレーティングシステム、300 DBインスタンス1、330 DBインスタンス2、360 データベース管理スレッド、362 DB情報、364 割当情報、370 トポロジ管理スレッド、372 トポロジ情報、380 スレッド割当て部、382 データ割当て部、384 アクセス制御部、386 ログ生成部、400 データベース管理システム構成情報、500 DBインスタンス定義ファイル、600 DBインスタンス定義ファイル 101 server, 200 memory, 270 processor, 220 database management system, 260 operating system, 300 DB instance 1, 330 DB instance 2, 360 database management thread, 362 DB information, 364 allocation information, 370 topology management thread, 372 topology information, 380 thread allocation unit, 382 data allocation unit, 384 access control unit, 386 log generation unit, 400 database management system configuration information, 500 DB instance definition file, 600 DB instance definition file

Claims (15)

  1. 複数のプロセッサで構成される計算機システムであって、
    前記プロセッサは複数のコアとメモリを備え、
    アプリケーションプログラムを実行するスレッドを前記コアに割り当てるスレッド割当て部と、
    前記アプリケーションで使用するデータをメモリへ割当てるデータ割当て部とを備え、
    前記スレッド割当て部は優先度の高いアプリケーションを実行するスレッドである高優先度スレッドと優先度の低いアプリケーションを実行するスレッドである低優先度スレッドを異なるプロセッサのコアに割り当て、
    前記データ割当て部は、高優先度スレッドが割り当てられたプロセッサに対応づけられたメモリへ高優先度スレッドと低優先度スレッドの両方でアクセスする共通データを格納するようデータの割り当てを行うことを特徴とする計算機システム。
    A computer system composed of a plurality of processors,
    The processor includes a plurality of cores and a memory,
    A thread allocation unit that allocates a thread that executes an application program to the core;
    A data allocation unit that allocates data used in the application to a memory;
    The thread allocation unit allocates a high priority thread that is a thread that executes an application with a high priority and a low priority thread that is a thread that executes an application with a low priority to different processor cores,
    The data allocation unit performs data allocation so as to store common data accessed by both the high priority thread and the low priority thread in a memory associated with a processor to which the high priority thread is allocated. A computer system.
  2. 請求項1に記載の計算機システムにおいて、
    前記スレッド割当て部は単一のアプリケーションを実行するための高優先度スレッドは可能であれば単一のプロセッサのコアに割り当てることを特徴とする計算機システム。
    The computer system according to claim 1,
    The computer system according to claim 1, wherein the thread allocation unit allocates a high priority thread for executing a single application to a core of a single processor if possible.
  3.  請求項1に記載の計算機システムにおいて、
     低優先度スレッドが、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするとき、低優先度スレッドが共通データをアクセスする頻度を指定するインタフェースを備えることを特徴とする計算機システム。
    The computer system according to claim 1,
    When the low-priority thread accesses common data stored in the memory of the processor to which the high-priority thread is allocated, the low-priority thread includes an interface that specifies how often the low-priority thread accesses the common data. Computer system.
  4.  請求項1に記載の計算機システムにおいて、
     低優先度スレッドが、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするとき、低優先度スレッドが共通データをアクセスする頻度を制御するアクセス制御部を備えることを特徴とする計算機システム。
    The computer system according to claim 1,
    When the low priority thread accesses the common data stored in the memory of the processor to which the high priority thread is allocated, the low priority thread includes an access control unit that controls the frequency with which the low priority thread accesses the common data. A computer system.
  5.  請求項1に記載の計算機システムにおいて、
     高優先度スレッドが共通データを更新するとき更新ログを作成し、高優先度スレッドが割り当てられたプロセッサのメモリへ格納するログ作成部を備え、
     低優先度スレッドは前記更新ログを参照することを特徴とする計算機システム。
    The computer system according to claim 1,
    A log creation unit that creates an update log when a high priority thread updates common data and stores it in the memory of the processor to which the high priority thread is assigned,
    A computer system characterized in that a low priority thread refers to the update log.
  6.  請求項5に記載の計算機システムにおいて、
     前記更新ログはデータベースのログであり、予め定められた規則に基づいてプロセッサのメモリから外部記憶装置へ出力され、
     低優先度スレッドは前記出力されたログを参照することを特徴とする計算機システム。
    The computer system according to claim 5,
    The update log is a database log, which is output from a processor memory to an external storage device based on a predetermined rule,
    A computer system, wherein a low priority thread refers to the output log.
  7.  請求項5に記載の計算機システムにおいて、
     前記アクセス制御部は低優先度スレッドがアクセスする共通データが更新された時刻に基づいて、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするか、更新ログをアクセスするかを制御することを特徴とする計算機システム。
    The computer system according to claim 5,
    The access control unit accesses the common data stored in the memory of the processor to which the high priority thread is allocated or accesses the update log based on the time when the common data accessed by the low priority thread is updated. A computer system characterized by controlling the above.
  8.  請求項7に記載の計算機システムにおいて、
     前記優先度の高いアプリケーションはオンライントランザクションプログラムであり、前記優先度の低いアプリケーションはカスタマーリレーションシップマネージメントプログラムであることを特徴とする計算機システム。
    In the computer system according to claim 7,
    The computer system according to claim 1, wherein the high-priority application is an online transaction program, and the low-priority application is a customer relationship management program.
  9. スレッド割当て部がアプリケーションプログラムを実行するスレッドを複数のコアを持つプロセッサのコアに割り当てるとき、優先度の高いアプリケーションを実行するスレッドである高優先度スレッドと優先度の低いアプリケーションを実行するスレッドである低優先度スレッドを異なるプロセッサのコアに割り当て、
    データ割当て部が前記アプリケーションで使用するデータをメモリへ割当てるとき、高優先度スレッドが割り当てられたプロセッサのメモリへ高優先度スレッドと低優先度スレッドの両方でアクセスする共通データを格納するようデータの割り当てことを特徴とする計算機システム管理方法。
    When a thread allocation unit allocates a thread that executes an application program to a core of a processor having multiple cores, a thread that executes a high priority thread that is a thread that executes a high priority application and a thread that executes a low priority application Assign low priority threads to different processor cores,
    When the data allocation unit allocates the data used in the application to the memory, the data allocation unit stores the common data accessed by both the high priority thread and the low priority thread to the memory of the processor to which the high priority thread is allocated. A computer system management method characterized by assigning.
  10. 請求項9に記載の計算機システム管理方法において、
    前記スレッド割当て部は単一のアプリケーションを実行するための高優先度スレッドは可能であれば単一のプロセッサのコアに割り当てることを特徴とする計算機システム管理方法。
    In the computer system management method according to claim 9,
    The computer system management method according to claim 1, wherein the thread allocation unit allocates a high priority thread for executing a single application to a core of a single processor if possible.
  11.  請求項9に記載の計算機システム管理方法において、
     低優先度スレッドが、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするとき、低優先度スレッドが共通データをアクセスする頻度を指定することを特徴とする計算機管理方法。
    In the computer system management method according to claim 9,
    When the low priority thread accesses the common data stored in the memory of the processor to which the high priority thread is allocated, the computer management method is characterized by specifying the frequency with which the low priority thread accesses the common data. .
  12.  請求項9に記載の計算機システム管理方法において、
     低優先度スレッドが、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするとき、アクセス制御部が低優先度スレッドが共通データをアクセスする頻度を制御することを特徴とする計算機管理方法。
    In the computer system management method according to claim 9,
    When the low priority thread accesses the common data stored in the memory of the processor to which the high priority thread is allocated, the access control unit controls the frequency with which the low priority thread accesses the common data. Computer management method to do.
  13.  請求項9に記載の計算機システム管理方法において、
     ログ作成部が高優先度スレッドが共通データを更新するとき更新ログを作成し、高優先度スレッドが割り当てられたプロセッサのメモリへ格納し、
     低優先度スレッドは前記更新ログを参照することを特徴とする計算機管理方法。
    In the computer system management method according to claim 9,
    The log creation unit creates an update log when the high priority thread updates common data, stores it in the memory of the processor to which the high priority thread is assigned,
    A computer management method, wherein a low priority thread refers to the update log.
  14.  請求項13に記載の計算機管理方法において、
     前記更新ログはデータベースのログであり、予め定められた規則に基づいてプロセッサのメモリから外部記憶装置へ出力され、
     低優先度スレッドは前記出力されたログを参照することを特徴とする計算機管理方法。
    In the computer management method according to claim 13,
    The update log is a database log, which is output from a processor memory to an external storage device based on a predetermined rule,
    A computer management method, wherein the low priority thread refers to the output log.
  15.  請求項13に記載の計算機管理方法において、
     前記アクセス制御部は低優先度スレッドがアクセスする共通データが更新された時刻に基づいて、高優先度スレッドが割り当てられたプロセッサのメモリへ格納された共通データをアクセスするか、更新ログをアクセスするかを制御することを特徴とする計算機管理方法。
    In the computer management method according to claim 13,
    The access control unit accesses the common data stored in the memory of the processor to which the high priority thread is allocated or accesses the update log based on the time when the common data accessed by the low priority thread is updated. A computer management method characterized by controlling the above.
PCT/JP2014/058400 2014-03-26 2014-03-26 Computer system and method for managing computer system WO2015145595A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2014/058400 WO2015145595A1 (en) 2014-03-26 2014-03-26 Computer system and method for managing computer system
JP2016509690A JPWO2015145595A1 (en) 2014-03-26 2014-03-26 Computer system and computer system management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/058400 WO2015145595A1 (en) 2014-03-26 2014-03-26 Computer system and method for managing computer system

Publications (1)

Publication Number Publication Date
WO2015145595A1 true WO2015145595A1 (en) 2015-10-01

Family

ID=54194193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/058400 WO2015145595A1 (en) 2014-03-26 2014-03-26 Computer system and method for managing computer system

Country Status (2)

Country Link
JP (1) JPWO2015145595A1 (en)
WO (1) WO2015145595A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506583A (en) * 2020-12-21 2021-03-16 北京百度网讯科技有限公司 Instance control method, device, equipment, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046689A1 (en) * 2006-08-21 2008-02-21 Tien-Fu Chen Method and apparatus for cooperative multithreading
WO2012026034A1 (en) * 2010-08-27 2012-03-01 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
JP2012247827A (en) * 2011-05-25 2012-12-13 Ricoh Co Ltd Program generation device, program generation method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046689A1 (en) * 2006-08-21 2008-02-21 Tien-Fu Chen Method and apparatus for cooperative multithreading
WO2012026034A1 (en) * 2010-08-27 2012-03-01 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
JP2012247827A (en) * 2011-05-25 2012-12-13 Ricoh Co Ltd Program generation device, program generation method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506583A (en) * 2020-12-21 2021-03-16 北京百度网讯科技有限公司 Instance control method, device, equipment, storage medium and program product

Also Published As

Publication number Publication date
JPWO2015145595A1 (en) 2017-04-13

Similar Documents

Publication Publication Date Title
US10146580B2 (en) Lazy persistent storage volume provisioning
JP3882930B2 (en) Managing virtual machines to use shared resources
US10915365B2 (en) Determining a quantity of remote shared partitions based on mapper and reducer nodes
KR100600925B1 (en) Dynamic allocation of computer resources based on thread type
US9558207B1 (en) Versioning of database partition maps
US7370029B2 (en) Method of changing system configuration in shared-nothing database management system
US12204496B2 (en) Metadata control in a load-balanced distributed storage system
US7805706B1 (en) Process for optimizing software components for an enterprise resource planning (ERP) application SAP on multiprocessor servers
US8386540B1 (en) Scalable relational database service
US5687372A (en) Customer information control system and method in a loosely coupled parallel processing environment
CN112052068A (en) Method and device for binding CPU (central processing unit) of Kubernetes container platform
US10191663B1 (en) Using data store accelerator intermediary nodes and write control settings to identify write propagation nodes
US8458396B2 (en) Sharing resources within a robotic media library amongst a plurality of connected servers
WO2024230416A1 (en) Method for binding processor core to application program instance and related device
CN111580951A (en) Task allocation method and resource management platform
Ungureanu et al. Kubernetes cluster optimization using hybrid shared-state scheduling framework
CN110119308B (en) System for managing large-scale container applications
US10082978B2 (en) Distributed shared log storage system having an adapter for heterogenous big data workloads
CN107528871B (en) Data analysis in storage systems
CN112114958A (en) Resource isolation method, distributed platform, computer device, and storage medium
EP3602309B1 (en) A memory allocation manager and method performed thereby for managing memory allocation
US20180046664A1 (en) Shared resource update apparatus and shared resource update method
CN113360455A (en) Data processing method, device, equipment and medium of super-fusion system
US20240160487A1 (en) Flexible gpu resource scheduling method in large-scale container operation environment
WO2015145595A1 (en) Computer system and method for managing computer system

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016509690

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14887455

Country of ref document: EP

Kind code of ref document: A1