JP2018028769A - Conversion program and conversion method - Google Patents

Conversion program and conversion method Download PDF

Info

Publication number
JP2018028769A
JP2018028769A JP2016159801A JP2016159801A JP2018028769A JP 2018028769 A JP2018028769 A JP 2018028769A JP 2016159801 A JP2016159801 A JP 2016159801A JP 2016159801 A JP2016159801 A JP 2016159801A JP 2018028769 A JP2018028769 A JP 2018028769A
Authority
JP
Japan
Prior art keywords
cpu
application
conversion
identification information
information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2016159801A
Other languages
Japanese (ja)
Inventor
寛之 亀澤
Hiroyuki Kamezawa
寛之 亀澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016159801A priority Critical patent/JP2018028769A/en
Publication of JP2018028769A publication Critical patent/JP2018028769A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a conversion program capable of converting identification information of a processor to be allocated to an application without changing the application.SOLUTION: A conversion part 16 acquires setting information D1 including first identification information of a first processor from an application 17. The conversion part 16 determines second identification information of a second processor to be allocated to the application 17 based on arrangement of processors 11a, 11b, 11c, 11d, 12a, 12b, 12c and 12d and usage situation of the processors 11a, 11b, 11c, 11d, 12a, 12b, 12c and 12d. The conversion part 16 notifies an OS 15 of conversion information D2 in which the first identification information and the second identification information are associated with each other.SELECTED DRAWING: Figure 1

Description

本発明は変換プログラムおよび変換方法に関する。   The present invention relates to a conversion program and a conversion method.

現在、様々な処理の実行に情報処理装置が利用されている。情報処理装置では、NUMA(Non-Uniform Memory Access)と呼ばれる手法によりプロセッサとメモリとが実装されることがある。NUMAでは、複数のプロセッサとメモリとを備えるノードを複数設け、各プロセッサから自ノード上のメモリ(ローカルメモリ)、および、他ノード上のメモリ(リモートメモリ)にアクセス可能にする。プロセッサは、ローカルメモリを、リモートメモリよりも高速にアクセスできる。   Currently, information processing apparatuses are used to execute various processes. In an information processing apparatus, a processor and a memory may be mounted by a technique called NUMA (Non-Uniform Memory Access). In NUMA, a plurality of nodes including a plurality of processors and memories are provided, and each processor can access a memory (local memory) on its own node and a memory (remote memory) on another node. The processor can access local memory faster than remote memory.

例えば、複数のノードがインターコネクトで接続されたシステムにおいて、ハイパーバイザが、仮想計算機に割り当てる論理CPU(Central Processing Unit)を実行する物理CPUを、論理CPUから物理メモリへのアクセス性能により決定する提案がある。   For example, in a system in which a plurality of nodes are connected by an interconnect, there is a proposal that a hypervisor determines a physical CPU that executes a logical CPU (Central Processing Unit) allocated to a virtual machine based on access performance from the logical CPU to the physical memory. is there.

また、仮想マシンに関する特性を示すリクエストを受信すると、当該特性とシステムの物理トポロジーに基づいて、仮想マシンの仮想NUMAノード数を決定し、決定した仮想NUMAノード数を有する仮想マシンをインスタンス化するシステムの提案もある。   In addition, upon receiving a request indicating characteristics related to a virtual machine, the system determines the number of virtual NUMA nodes of the virtual machine based on the characteristics and the physical topology of the system, and instantiates a virtual machine having the determined number of virtual NUMA nodes There is also a proposal.

また、仮想マシン・ブート時、バーチャライザが、ゲスト物理メモリおよびゲスト仮想プロセッサを仮想ノード中にグループ分けした後、仮想ノード背後のホスト物理メモリを変更し、当該ノード内の仮想プロセッサに適切な物理プロセッサを提供する提案もある。   Also, when the virtual machine boots, the virtualizer groups the guest physical memory and guest virtual processors into virtual nodes, then changes the host physical memory behind the virtual nodes to ensure that the physical processors appropriate for the virtual processors in the nodes There are also proposals to provide a processor.

更に、新しいプロセスに論理プロセッサを割り当てる際に、このプロセスと既に論理プロセッサを割当済のプロセスとの依存関係に応じて物理プロセッサの性能を引き出すように論理プロセッサを割り当てる計算機システムの提案もある。   Further, there is a proposal of a computer system that assigns a logical processor so as to extract the performance of a physical processor according to the dependency relationship between this process and a process that has already been assigned a logical processor when assigning a logical processor to a new process.

国際公開第2014/141419号International Publication No. 2014/141419 特表2012−521611号公報Special table 2012-521611 gazette 特開2006−178933号公報JP 2006-178933 A 特開2006−24180号公報JP 2006-24180 A

異なる情報処理装置では、NUMAの構造(例えば、1つのノードにおけるプロセッサの数や各ノード上のプロセッサに割り振られる識別情報など)が異なることがある。また、情報処理装置により実行されるアプリケーションは、ある情報処理装置におけるNUMAの構造に配慮して作成されていることがある。このため、ある情報処理装置では適切に動作していたアプリケーションでも、別の情報処理装置により実行すると、期待する性能を発揮できない、正しく動作しないなどの問題が生じ得る。別の情報処理装置への配備を見越して、アプリケーションを予め修正することも考えられるが、配備先の情報処理装置のNUMAの構造を、配備前に予め知ることは難しい。このため、アプリケーションの配備後に、ユーザは設定の修正作業を強いられることがあるという問題がある。   Different information processing apparatuses may have different NUMA structures (for example, the number of processors in one node and identification information allocated to processors on each node). An application executed by the information processing apparatus may be created in consideration of the NUMA structure of the information processing apparatus. For this reason, even if an application that has been operating properly in one information processing apparatus is executed by another information processing apparatus, problems such as inability to exhibit the expected performance or malfunction. Although it is conceivable to modify the application in advance in anticipation of deployment to another information processing apparatus, it is difficult to know the NUMA structure of the information processing apparatus at the deployment destination before deployment. For this reason, there is a problem that the user may be forced to correct the setting after the application is deployed.

1つの側面では、本発明は、アプリケーションを変更することなしに、アプリケーションに割り当てるプロセッサの識別情報を変換可能にすることを目的とする。   In one aspect, an object of the present invention is to enable conversion of identification information of a processor assigned to an application without changing the application.

1つの態様では、変換プログラムが提供される。この変換プログラムは、複数のプロセッサを有するコンピュータに、第1のプロセッサの第1の識別情報を含む設定情報をアプリケーションから取得し、複数のプロセッサの配置および複数のプロセッサの利用状況に基づいて、アプリケーションに割り当てる第2のプロセッサの第2の識別情報を決定し、第1の識別情報と第2の識別情報とを対応付けた変換情報をコンピュータのオペレーティングシステムに通知する。   In one aspect, a conversion program is provided. This conversion program acquires setting information including first identification information of a first processor from an application to a computer having a plurality of processors, and based on the arrangement of the plurality of processors and the usage status of the plurality of processors, 2nd identification information of the 2nd processor allocated to 2 is determined, and the conversion information which matched 1st identification information and 2nd identification information is notified to the operating system of a computer.

また、1つの態様では、変換プログラムが提供される。この変換プログラムは、複数のプロセッサを有するコンピュータに、アプリケーションの設定情報に含まれる第1のプロセッサの第1の識別情報とアプリケーションに割り当てる第2のプロセッサの第2の識別情報とを対応付けた変換情報を取得し、変換情報に基づいて、第1の識別情報に代えて、第2の識別情報に対応する第2のプロセッサをアプリケーションに割り当てる。   In one aspect, a conversion program is provided. The conversion program converts a computer having a plurality of processors in association with the first identification information of the first processor included in the application setting information and the second identification information of the second processor to be assigned to the application. Information is acquired, and based on the conversion information, a second processor corresponding to the second identification information is assigned to the application instead of the first identification information.

また、1つの態様では、変換方法が提供される。この変換方法では、複数のプロセッサを有するコンピュータが、第1のプロセッサの第1の識別情報を含む設定情報をアプリケーションから取得し、複数のプロセッサの配置および複数のプロセッサの利用状況に基づいて、アプリケーションに割り当てる第2のプロセッサの第2の識別情報を決定し、第1の識別情報と第2の識別情報とを対応付けた変換情報をコンピュータのオペレーティングシステムに通知し、オペレーティングシステムにより、変換情報に基づいて、第1の識別情報に代えて、第2の識別情報に対応する第2のプロセッサをアプリケーションに割り当てる。   In one aspect, a conversion method is provided. In this conversion method, a computer having a plurality of processors acquires setting information including the first identification information of the first processor from the application, and based on the arrangement of the plurality of processors and the usage status of the plurality of processors, the application 2nd identification information of the 2nd processor assigned to 2 is determined, the conversion information which matched the 1st identification information and the 2nd identification information is notified to the operating system of a computer, and it is converted into conversion information by an operating system. Based on this, instead of the first identification information, the second processor corresponding to the second identification information is assigned to the application.

1つの側面では、アプリケーションを変更することなしに、アプリケーションに割り当てるプロセッサの識別情報を変換できる。   In one aspect, processor identification information assigned to an application can be converted without changing the application.

第1の実施の形態の情報処理装置を示す図である。It is a figure which shows the information processing apparatus of 1st Embodiment. 第2の実施の形態のサーバのハードウェア例を示す図である。It is a figure which shows the hardware example of the server of 2nd Embodiment. 第2の実施の形態のソフトウェア例を示す図である。It is a figure which shows the example of software of 2nd Embodiment. 第2の実施の形態の変換テーブルの例を示す図である。It is a figure which shows the example of the conversion table of 2nd Embodiment. 第2の実施の形態のアプリ起動例を示すフローチャートである。It is a flowchart which shows the example of application starting of 2nd Embodiment. 第2の実施の形態のCPU番号の変換例を示す図である。It is a figure which shows the example of conversion of the CPU number of 2nd Embodiment. CPU番号の割り当ての比較例を示す図である。It is a figure which shows the comparative example of allocation of CPU number. 第3の実施の形態のソフトウェア例を示す図である。It is a figure which shows the example of software of 3rd Embodiment. 第3の実施の形態のプロセステーブルの例を示す図である。It is a figure which shows the example of the process table of 3rd Embodiment. 第3の実施の形態のアプリ起動例を示すフローチャートである。It is a flowchart which shows the example of application starting of 3rd Embodiment. 第3の実施の形態のCPU再設定例を示すフローチャートである。12 is a flowchart illustrating an example of CPU resetting according to the third embodiment. 第3の実施の形態のCPU割り当て変更例を示すフローチャートである。It is a flowchart which shows the example of CPU allocation change of 3rd Embodiment. 第4の実施の形態のソフトウェア例を示す図である。It is a figure which shows the example of software of 4th Embodiment. 第4の実施の形態の変換テーブルの例を示す図である。It is a figure which shows the example of the conversion table of 4th Embodiment. 第4の実施の形態のアプリ起動例を示すフローチャートである。It is a flowchart which shows the example of application starting of 4th Embodiment. 第5の実施の形態のソフトウェア例を示す図である。It is a figure which shows the example of software of 5th Embodiment. 第5の実施の形態のCPU番号の変換例を示す図である。It is a figure which shows the example of conversion of CPU number of 5th Embodiment. 仮想マシンにおけるCPU番号の割り当ての比較例を示す図である。It is a figure which shows the comparative example of allocation of CPU number in a virtual machine.

以下、本実施の形態を図面を参照して説明する。
[第1の実施の形態]
図1は、第1の実施の形態の情報処理装置を示す図である。情報処理装置10は、複数のプロセッサおよび複数のメモリを有する。ここで、メモリは、例えばRAM(Random Access Memory)である。プロセッサは、例えばCPUである。プロセッサは、複数のプロセッサの集合(マルチプロセッサ)も含み得る。情報処理装置10は、コンピュータと呼ばれてもよい。プロセッサおよびメモリは、NUMAの技術を用いて実装されている。情報処理装置10は、ノード11,12を有する。
Hereinafter, the present embodiment will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating the information processing apparatus according to the first embodiment. The information processing apparatus 10 includes a plurality of processors and a plurality of memories. Here, the memory is, for example, a RAM (Random Access Memory). The processor is, for example, a CPU. The processor may also include a set of multiple processors (multiprocessor). The information processing apparatus 10 may be called a computer. The processor and memory are implemented using NUMA technology. The information processing apparatus 10 includes nodes 11 and 12.

ノード11は、プロセッサ11a,11b,11c,11dおよびメモリ11eを有する。ノード12は、プロセッサ12a,12b,12c,12dおよびメモリ12eを有する。ノード11,12は、情報処理装置10のハードウェアである。また、ノード11,12は、NUMAノードと呼ばれてもよい。   The node 11 includes processors 11a, 11b, 11c, 11d and a memory 11e. The node 12 includes processors 12a, 12b, 12c, 12d and a memory 12e. The nodes 11 and 12 are hardware of the information processing apparatus 10. Nodes 11 and 12 may also be called NUMA nodes.

ここで、プロセッサ11aの識別情報は“1”(ID(IDentifier)=1)である。プロセッサ11bの識別情報は“2”である。プロセッサ11cの識別情報は“3”である。プロセッサ11dの識別情報は“4”である。プロセッサ12aの識別情報は“5”である。プロセッサ12bの識別情報は“6”である。プロセッサ12cの識別情報は“7”である。プロセッサ12dの識別情報は“8”である。   Here, the identification information of the processor 11a is “1” (ID (IDentifier) = 1). The identification information of the processor 11b is “2”. The identification information of the processor 11c is “3”. The identification information of the processor 11d is “4”. The identification information of the processor 12a is “5”. The identification information of the processor 12b is “6”. The identification information of the processor 12c is “7”. The identification information of the processor 12d is “8”.

情報処理装置10は、上記のハードウェアを用いて、オペレーティングシステム(OS:Operating System)15、変換部16およびアプリケーション17を実行する。OS15、変換部16およびアプリケーション17は、情報処理装置10のソフトウェアである。OS15は、情報処理装置10のOSであり、ノード11,12を用いて実行される。アプリケーション17は、ユーザの業務処理を実行する。   The information processing apparatus 10 executes an operating system (OS) 15, a conversion unit 16, and an application 17 using the hardware described above. The OS 15, the conversion unit 16, and the application 17 are software of the information processing apparatus 10. The OS 15 is an OS of the information processing apparatus 10 and is executed using the nodes 11 and 12. The application 17 executes user business processing.

変換部16は、アプリケーション17へ割り当てるプロセッサの識別情報の変換を行うための変換情報を生成する。変換部16は、ノード11,12に属する何れかのプロセッサにより実行される。変換部16は、アプリケーション17の外部の機能(例えば、動的共有ライブラリやスケジューラなど)として実装される。変換部16は、アプリケーション17の実行に用いるプロセッサを決定するために次のような処理を実行する。   The conversion unit 16 generates conversion information for converting the identification information of the processor assigned to the application 17. The conversion unit 16 is executed by any processor belonging to the nodes 11 and 12. The conversion unit 16 is implemented as a function outside the application 17 (for example, a dynamic shared library or a scheduler). The conversion unit 16 executes the following process in order to determine a processor to be used for executing the application 17.

変換部16は、第1のプロセッサの第1の識別情報を含む設定情報D1をアプリケーション17から取得する。例えば、設定情報D1は、アプリケーション17の動作方法をチューニングするために、アプリケーション17に対して予め付与される情報である。例えば、設定情報D1は、第1のプロセッサの第1の識別情報として、プロセッサ11c,11d,12a,12bそれぞれのID=3,4,5,6を含む。   The conversion unit 16 acquires the setting information D1 including the first identification information of the first processor from the application 17. For example, the setting information D1 is information given in advance to the application 17 in order to tune the operation method of the application 17. For example, the setting information D1 includes IDs = 3, 4, 5, and 6 of the processors 11c, 11d, 12a, and 12b as the first identification information of the first processor.

変換部16は、複数のプロセッサの配置および複数のプロセッサの利用状況に基づいて、アプリケーション17に割り当てる第2のプロセッサの第2の識別情報を決定する。例えば、変換部16は、ノード11,12における複数のプロセッサの配置に基づいて、同一のノードに属するプロセッサをアプリケーション17に割り当てるようにする。各プロセッサが共通のローカルメモリにアクセスした方が処理を高速化できるからである。また、変換部16は、ノード11の負荷およびノード12の負荷に偏りが生じないように、アプリケーション17にプロセッサを割り当てるようにする。   The conversion unit 16 determines second identification information of the second processor to be assigned to the application 17 based on the arrangement of the plurality of processors and the usage status of the plurality of processors. For example, the conversion unit 16 assigns processors belonging to the same node to the application 17 based on the arrangement of a plurality of processors in the nodes 11 and 12. This is because the processing speed can be increased if each processor accesses the common local memory. Further, the conversion unit 16 assigns a processor to the application 17 so that the load on the node 11 and the load on the node 12 are not biased.

例えば、設定情報D1は、プロセッサのID=3,4,5,6を含む。ID=3,4で識別されるプロセッサ11c,11dは、ノード11に属する。ID=5,6で識別されるプロセッサ12a,12bは、ノード12に属する。プロセッサ11c,11d,12a,12bは、所属先がノード11,12に跨っている。このため、変換部16は、ノード11またはノード12の何れか一方から、プロセッサを割り当てるようにする。例えば、ノード12の負荷が、ノード11の負荷よりも大きい場合、変換部16は、ノード11に属するプロセッサ11a,11b,11c,11dをアプリケーション17に割り当てると決定する。この場合、第2の識別情報は、ID=1,2,3,4である。   For example, the setting information D1 includes processor IDs = 3, 4, 5, and 6. The processors 11 c and 11 d identified by ID = 3 and 4 belong to the node 11. The processors 12 a and 12 b identified by ID = 5 and 6 belong to the node 12. The processors 11c, 11d, 12a, and 12b belong to the nodes 11 and 12, respectively. Therefore, the conversion unit 16 assigns a processor from either the node 11 or the node 12. For example, when the load on the node 12 is larger than the load on the node 11, the conversion unit 16 determines to allocate the processors 11 a, 11 b, 11 c, and 11 d belonging to the node 11 to the application 17. In this case, the second identification information is ID = 1, 2, 3, 4.

変換部16は、第1の識別情報と第2の識別情報とを対応付けた変換情報D2を情報処理装置10のOS15に通知する。上記の例では、第1の識別情報は、ID=3,4,5,6である。第2の識別情報は、ID=1,2,3,4である。すなわち、変換情報D2は、プロセッサのID=3,4,5,6を、ID=1,2,3,4に変換することを示す。   The conversion unit 16 notifies the OS 15 of the information processing apparatus 10 of conversion information D2 in which the first identification information and the second identification information are associated with each other. In the above example, the first identification information is ID = 3, 4, 5, 6. The second identification information is ID = 1, 2, 3, 4. That is, the conversion information D2 indicates that the processor ID = 3, 4, 5, 6 is converted to ID = 1, 2, 3, 4.

OS15は、変換部16から変換情報D2を取得する。OS15は、変換情報D2に基づいて、第1の識別情報に代えて、第2の識別情報に対応する第2のプロセッサをアプリケーション17に割り当てる。上記の例の場合、OS15は、プロセッサのID=3,4,5,6に代えて、ID=1,2,3,4に対応するプロセッサ11a,11b,11c,11dをアプリケーション17に割り当てる。   The OS 15 acquires conversion information D2 from the conversion unit 16. Based on the conversion information D2, the OS 15 assigns a second processor corresponding to the second identification information to the application 17 instead of the first identification information. In the case of the above example, the OS 15 assigns the processors 11a, 11b, 11c, and 11d corresponding to ID = 1, 2, 3, 4, and 4 to the application 17 instead of the processor IDs = 3, 4, 5, and 6.

情報処理装置10によれば、アプリケーション17を変更することなしに、プロセッサの識別情報を変換できる。具体的には、変換部16は、アプリケーション17から取得した設定情報D1に基づいて、変換情報D2をOS15に通知する。このため、アプリケーション17側では設定情報D1の変更を意識しなくてもよい。   According to the information processing apparatus 10, the processor identification information can be converted without changing the application 17. Specifically, the conversion unit 16 notifies the OS 15 of conversion information D2 based on the setting information D1 acquired from the application 17. For this reason, the application 17 does not need to be aware of the change of the setting information D1.

特に、NUMAを意識して作成されたアプリケーション17では、アプリケーション17の実行に用いるプロセッサの識別情報が予め定義されている。しかし、予め定義された識別情報が、実際に実行する情報処理装置10のNUMAの構造(NUMA構造)と必ずしも一致しているとは限らない。例えば、予め定義された識別情報のプロセッサが該当の情報処理装置上に存在しないこともある。また、予め定義された識別情報の組み合わせに対応するプロセッサ群が同一のノード上にない可能性もある。別の情報処理装置への配備を見越して、アプリケーションを予め修正することも考えられるが、配備先の情報処理装置のNUMAの構造を、配備前に予め知ることは難しい。このため、アプリケーションの配備後に、ユーザはアプリケーションに対する設定の修正作業を強いられることがあるという問題がある。   In particular, in the application 17 created in consideration of NUMA, processor identification information used to execute the application 17 is defined in advance. However, the predefined identification information does not necessarily match the NUMA structure (NUMA structure) of the information processing apparatus 10 that is actually executed. For example, a processor of identification information defined in advance may not exist on the corresponding information processing apparatus. Further, there is a possibility that the processor group corresponding to the combination of the identification information defined in advance is not on the same node. Although it is conceivable to modify the application in advance in anticipation of deployment to another information processing apparatus, it is difficult to know the NUMA structure of the information processing apparatus at the deployment destination before deployment. For this reason, there is a problem that the user may be forced to correct the setting of the application after the application is deployed.

変換部16は、情報処理装置10におけるNUMAの実装に応じて、アプリケーション17に割り当てるプロセッサを決定する。このため、情報処理装置10は、NUMAを意識して作成されたアプリケーション17に対して期待される性能を発揮させて、適切に動作させることができる。また、ユーザに対してアプリケーション17の変更作業を強いずに済み、ユーザの作業の負担を軽減できる。   The conversion unit 16 determines a processor to be assigned to the application 17 according to the NUMA implementation in the information processing apparatus 10. For this reason, the information processing apparatus 10 can exhibit the performance expected with respect to the application 17 created in consideration of NUMA and can operate appropriately. Further, it is not necessary to force the user to change the application 17, and the burden on the user can be reduced.

次に、アプリケーションを実行するサーバコンピュータ(単に、サーバと称することがある)を例示して、上記の機能をより詳細に説明する。
[第2の実施の形態]
図2は、第2の実施の形態のサーバのハードウェア例を示す図である。サーバ100は、NUMAの技術によりCPUやRAMが実装されている。サーバ100は、ノード101,102、HDD103、画像信号処理部104、入力信号処理部105、媒体リーダ106および通信インタフェース107を有する。各ユニットはサーバ100のバスに接続されている。
Next, the above function will be described in more detail by exemplifying a server computer (sometimes simply referred to as a server) that executes an application.
[Second Embodiment]
FIG. 2 is a diagram illustrating a hardware example of the server according to the second embodiment. The server 100 is mounted with a CPU and RAM using NUMA technology. The server 100 includes nodes 101 and 102, an HDD 103, an image signal processing unit 104, an input signal processing unit 105, a media reader 106, and a communication interface 107. Each unit is connected to the bus of the server 100.

ノード101は、CPU11p,12p,・・・およびRAM1mを有する。ノード102は、CPU21p,22p,・・・およびRAM2mを有する。ノード101,102は、NUMAノードと呼ばれてもよい。   The node 101 includes CPUs 11p, 12p,... And RAM 1m. The node 102 includes CPUs 21p, 22p,... And RAM 2m. Nodes 101 and 102 may be referred to as NUMA nodes.

CPU11p,12p,・・・およびCPU21p,22p,・・・は、サーバ100の演算装置である。
RAM1m,2mは、サーバ100の主記憶装置である。RAM1m,2mは、OSのプログラムやアプリケーションのプログラムの少なくとも一部を一時的に記憶する。また、RAM1mは、CPU11p,12p,・・・のローカルメモリである。RAM1mは、CPU21p,22p,・・・のリモートメモリである。RAM2mは、CPU21p,22p,・・・のローカルメモリである。RAM2mは、CPU11p,12p,・・・のリモートメモリである。サーバ100は、ノード101,102に加えて、更に1以上のノードを有してもよい。
CPU 11p, 12p,... And CPU 21p, 22p,.
The RAMs 1m and 2m are main storage devices of the server 100. The RAMs 1m and 2m temporarily store at least a part of the OS programs and application programs. The RAM 1m is a local memory of the CPUs 11p, 12p,. The RAM 1m is a remote memory of the CPUs 21p, 22p,. The RAM 2m is a local memory of the CPUs 21p, 22p,. A RAM 2m is a remote memory of the CPUs 11p, 12p,. The server 100 may further include one or more nodes in addition to the nodes 101 and 102.

HDD103は、サーバ100の補助記憶装置である。HDD103は、内蔵した磁気ディスクに対して、磁気的にデータの書き込みおよび読み出しを行う。HDD103は、OSのプログラム、アプリケーションのプログラム、および各種データを記憶する。サーバ100は、フラッシュメモリやSSD(Solid State Drive)などの他の種類の補助記憶装置を備えてもよく、複数の補助記憶装置を備えてもよい。   The HDD 103 is an auxiliary storage device of the server 100. The HDD 103 magnetically writes and reads data to and from the built-in magnetic disk. The HDD 103 stores an OS program, application programs, and various data. The server 100 may include other types of auxiliary storage devices such as flash memory and SSD (Solid State Drive), or may include a plurality of auxiliary storage devices.

画像信号処理部104は、各CPUからの命令に従って、サーバ100に接続されたディスプレイ21に画像を出力する。ディスプレイ21としては、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイなどを用いることができる。   The image signal processing unit 104 outputs an image to the display 21 connected to the server 100 in accordance with an instruction from each CPU. As the display 21, a CRT (Cathode Ray Tube) display, a liquid crystal display, or the like can be used.

入力信号処理部105は、サーバ100に接続された入力デバイス22から入力信号を取得し、各CPUに出力する。入力デバイス22としては、例えば、マウスやタッチパネルなどのポインティングデバイス、キーボードなどを用いることができる。   The input signal processing unit 105 acquires an input signal from the input device 22 connected to the server 100 and outputs it to each CPU. As the input device 22, for example, a pointing device such as a mouse or a touch panel, a keyboard, or the like can be used.

媒体リーダ106は、記録媒体23に記録されたプログラムやデータを読み取る装置である。記録媒体23として、例えば、フレキシブルディスク(FD:Flexible Disk)やHDD(Hard Disk Drive)などの磁気ディスク、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光ディスク、光磁気ディスク(MO:Magneto-Optical disk)を使用できる。また、記録媒体23として、例えば、フラッシュメモリカードなどの不揮発性の半導体メモリを使用することもできる。媒体リーダ106は、例えば、各CPUからの命令に従って、記録媒体23から読み取ったプログラムやデータをRAM1m,2mまたはHDD103に格納する。   The medium reader 106 is a device that reads programs and data recorded on the recording medium 23. As the recording medium 23, for example, a magnetic disk such as a flexible disk (FD) or an HDD (Hard Disk Drive), an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), a magneto-optical disk (MO) -Optical disk). Further, as the recording medium 23, for example, a non-volatile semiconductor memory such as a flash memory card can be used. For example, the medium reader 106 stores programs and data read from the recording medium 23 in the RAMs 1m and 2m or the HDD 103 in accordance with instructions from each CPU.

通信インタフェース107は、ネットワーク24を介して他の装置と通信を行う。通信インタフェース107は、有線通信インタフェースでもよいし、無線通信インタフェースでもよい。   The communication interface 107 communicates with other devices via the network 24. The communication interface 107 may be a wired communication interface or a wireless communication interface.

図3は、第2の実施の形態のソフトウェア例を示す図である。サーバ100は、記憶部110、OSカーネル120、CPU名変換部130およびアプリケーション140を有する。記憶部110は、RAM1m,2mまたはHDD103に確保された記憶領域として実現される。OSカーネル120およびCPU名変換部130は、RAM1m,2mに格納されたプログラムを、CPU11p,12p,・・・およびCPU21p,22p,・・・の少なくとも1つが実行することで実現される。アプリケーション140は、後述するように、可能な限り1つのノードに属するCPU群およびRAMを用いて実行される。   FIG. 3 is a diagram illustrating an example of software according to the second embodiment. The server 100 includes a storage unit 110, an OS kernel 120, a CPU name conversion unit 130, and an application 140. The storage unit 110 is realized as a storage area secured in the RAM 1m, 2m or the HDD 103. The OS kernel 120 and the CPU name conversion unit 130 are realized by at least one of the CPUs 11p, 12p,... And the CPUs 21p, 22p,. As will be described later, the application 140 is executed using a CPU group and a RAM belonging to one node as much as possible.

記憶部110は、変換テーブル111を記憶する。変換テーブル111は、CPU名変換部130の処理に用いられるテーブルである。変換テーブル111は、変換元のCPU名と変換先のCPU名との対応関係が記録された情報である。例えば、ユーザは、変換テーブル111を予め作成して記憶部110に格納しておける。   The storage unit 110 stores a conversion table 111. The conversion table 111 is a table used for processing by the CPU name conversion unit 130. The conversion table 111 is information in which the correspondence between the conversion source CPU name and the conversion destination CPU name is recorded. For example, the user can create the conversion table 111 in advance and store it in the storage unit 110.

ここで、CPU名は、CPUの識別情報に相当する。第2の実施の形態では、CPU名は、CPUの番号(CPU番号)である。CPU番号は、“0”を起点とした昇順の整数である。CPU番号は、CPUのファームウェアやOSにより、所定のアルゴリズムを用いて各CPUに付与される。すなわち、CPU番号の付与ルールは、サーバコンピュータに応じて異なることもある。例えば、所定数の連続の番号が同一ノードに属することもあるし、所定数の不連続の番号が同一ノードに属することもある。   Here, the CPU name corresponds to the identification information of the CPU. In the second embodiment, the CPU name is a CPU number (CPU number). The CPU number is an integer in ascending order starting from “0”. The CPU number is assigned to each CPU using a predetermined algorithm by the CPU firmware and OS. That is, the CPU number assignment rule may differ depending on the server computer. For example, a predetermined number of consecutive numbers may belong to the same node, or a predetermined number of discontinuous numbers may belong to the same node.

OSカーネル120は、サーバ100のOSのカーネルである。OSカーネル120は、サーバ100上で実行されるアプリケーション140に対してCPUを割り当てる。
CPU名変換部130は、アプリケーション140の起動時における所定のシステムコール(CPU設定用のシステムコール)を検出し、アプリケーション140からCPU番号の指定を受け付ける。CPU名変換部130は、記憶部110に記憶された変換テーブル111に基づいて、CPU番号を変換し、OSカーネル120に通知する。
The OS kernel 120 is an OS kernel of the server 100. The OS kernel 120 assigns a CPU to the application 140 executed on the server 100.
The CPU name conversion unit 130 detects a predetermined system call (system call for CPU setting) when the application 140 is activated, and accepts designation of a CPU number from the application 140. The CPU name conversion unit 130 converts the CPU number based on the conversion table 111 stored in the storage unit 110 and notifies the OS kernel 120 of it.

アプリケーション140は、ユーザの業務に関する処理を行うソフトウェアである。アプリケーション140は、NUMAを意識して作成されており、アプリケーション140の実行に用いるCPU番号が予め定義されている。ただし、予め定義されたCPU番号が必ずしも、実際に実行するサーバのNUMA構造と一致しているとは限らない。例えば、予め定義されたCPU番号が該当のサーバ上に存在しないこともあるし、予め定義されたCPU番号の組み合わせが同一ノード上にないこともある。なお、以下の説明では、「アプリケーション」を、「アプリ」と略記することがある。   The application 140 is software that performs processing related to a user's business. The application 140 is created in consideration of NUMA, and a CPU number used for executing the application 140 is defined in advance. However, the predefined CPU number does not always match the NUMA structure of the server that is actually executed. For example, a predefined CPU number may not exist on the corresponding server, or a predefined combination of CPU numbers may not exist on the same node. In the following description, “application” may be abbreviated as “application”.

図4は、第2の実施の形態の変換テーブルの例を示す図である。変換テーブル111は、記憶部110に格納される。変換テーブル111は、アプリ指定CPU番号および変換後CPU番号の項目を含む。   FIG. 4 is a diagram illustrating an example of a conversion table according to the second embodiment. The conversion table 111 is stored in the storage unit 110. The conversion table 111 includes items of an application designated CPU number and a converted CPU number.

アプリ指定CPU番号の項目には、アプリケーション140により指定されたCPU番号が登録される。変換後CPU番号の項目には、変換後のCPU番号が登録される。例えば、変換テーブル111には、アプリ指定CPU番号が“0”、変換後CPU番号が“2”という情報が登録される。これは、アプリケーション140によりCPU番号“0”が指定された場合、CPU番号“2”に変換することを示す。   In the application designation CPU number item, the CPU number designated by the application 140 is registered. The post-conversion CPU number is registered with the post-conversion CPU number. For example, in the conversion table 111, information indicating that the application designated CPU number is “0” and the converted CPU number is “2” is registered. This indicates that when the CPU number “0” is designated by the application 140, the CPU number “2” is converted.

変換テーブル111には、他のCPU番号についても同様に、アプリ指定CPU番号と、CPU番号との組み合わせが予め登録される。特に、変換後のCPU番号の項目には、同一ノード上のCPUのCPU番号が予め登録される。   Similarly, the combination of the application designated CPU number and the CPU number is registered in advance in the conversion table 111 for other CPU numbers. In particular, the CPU number of the CPU on the same node is registered in advance in the item of the converted CPU number.

次に、サーバ100によるアプリ起動時の処理手順を説明する。
図5は、第2の実施の形態のアプリ起動例を示すフローチャートである。以下、図5に示す処理をステップ番号に沿って説明する。
Next, a processing procedure at the time of application activation by the server 100 will be described.
FIG. 5 is a flowchart illustrating an application activation example according to the second embodiment. Hereinafter, the process illustrated in FIG. 5 will be described in order of step number.

(S11)CPU名変換部130は、ユーザによるアプリ指定CPU番号と変換後CPU番号との組み合わせの入力を受け付け、変換テーブル111を作成する。CPU名変換部130は、作成した変換テーブル111を記憶部110に格納する。CPU名変換部130は、アプリケーション毎に変換テーブルを作成し、アプリケーションの識別情報に対応付けて、作成した変換テーブルを記憶部110に格納する。変換テーブル111は、アプリケーション140の識別情報に対応付けられる。   (S11) The CPU name conversion unit 130 receives an input of a combination of the application designation CPU number and the converted CPU number by the user, and creates the conversion table 111. The CPU name conversion unit 130 stores the created conversion table 111 in the storage unit 110. The CPU name conversion unit 130 creates a conversion table for each application, and stores the created conversion table in the storage unit 110 in association with the identification information of the application. The conversion table 111 is associated with the identification information of the application 140.

(S12)CPU名変換部130は、アプリ起動時のCPU設定を行うシステムコールを検出する。例えば、CPU名変換部130は、アプリケーション140の起動時に、当該アプリケーション140の実行に用いるCPUを設定するためのシステムコールを検出する。   (S12) The CPU name conversion unit 130 detects a system call for performing CPU setting when the application is activated. For example, when the application 140 is activated, the CPU name conversion unit 130 detects a system call for setting a CPU used to execute the application 140.

(S13)CPU名変換部130は、システムコールをフックする。
(S14)CPU名変換部130は、記憶部110に記憶された変換テーブル111に基づいて、システムコールに含まれるCPU設定情報のCPU名を変換する。例えば、変換テーブル111は、アプリ指定CPU番号“0”を、変換後CPU番号“2”に変換する旨の情報を含む。このため、CPU名変換部130は、CPU設定情報に含まれるCPU番号“0”を、CPU番号“2”に変換する。CPU名変換部130は、CPU設定情報に含まれる他のCPU番号も、変換テーブル111に基づいて同様に変換する。
(S13) The CPU name conversion unit 130 hooks a system call.
(S14) The CPU name conversion unit 130 converts the CPU name of the CPU setting information included in the system call based on the conversion table 111 stored in the storage unit 110. For example, the conversion table 111 includes information indicating that the application designated CPU number “0” is converted to the converted CPU number “2”. For this reason, the CPU name conversion unit 130 converts the CPU number “0” included in the CPU setting information into the CPU number “2”. The CPU name conversion unit 130 similarly converts other CPU numbers included in the CPU setting information based on the conversion table 111.

(S15)CPU名変換部130は、変換後のCPU名をOSに通知する。具体的には、CPU名変換部130は、ステップS14により変換したCPU設定情報を、OSカーネル120に通知する。OSカーネル120は、CPU名変換部130から受け付けたCPU設定情報に基づいて、アプリケーション140へのCPUの割り当てを行う。   (S15) The CPU name conversion unit 130 notifies the OS of the converted CPU name. Specifically, the CPU name conversion unit 130 notifies the OS kernel 120 of the CPU setting information converted in step S14. The OS kernel 120 assigns the CPU to the application 140 based on the CPU setting information received from the CPU name conversion unit 130.

これにより、OSカーネル120は、同一ノード上のCPUを適切にアプリケーション140に割り当てることができる。
図6は、第2の実施の形態のCPU番号の変換例を示す図である。図6(A)は、アプリケーション140により複数ノードに跨るCPU番号が指定された場合を例示している。例えば、ノード101は、10個のCPUを含むCPU群P1を有するとする。CPU群P1に属するCPU番号は“0”〜“9”である(図中“0−9”と表記している。以下同様)。また、ノード102は、10個のCPUを含むCPU群P2を有するとする。CPU群P2に属するCPU番号は“10”〜“19”である。また、変換テーブル111には、CPU番号“8,9,10,11”それぞれを、CPU番号“4,5,6,7”に変換するよう定義されているものとする。
As a result, the OS kernel 120 can appropriately allocate the CPU on the same node to the application 140.
FIG. 6 is a diagram illustrating a conversion example of the CPU number according to the second embodiment. FIG. 6A illustrates a case where a CPU number that spans multiple nodes is designated by the application 140. For example, it is assumed that the node 101 has a CPU group P1 including 10 CPUs. The CPU numbers belonging to the CPU group P1 are “0” to “9” (indicated as “0-9” in the figure, and so on). Further, it is assumed that the node 102 has a CPU group P2 including 10 CPUs. The CPU numbers belonging to the CPU group P2 are “10” to “19”. Further, it is assumed that the conversion table 111 is defined to convert each of the CPU numbers “8, 9, 10, 11” to the CPU numbers “4, 5, 6, 7”.

この場合、アプリケーション140が、起動時にCPU番号“8,9,10,11”の設定を含むシステムコールを発行したとする。CPU番号“8,9,10,11”に対応する4つのCPUのうち、CPU番号“8,9”のCPUは、ノード101に属する。CPU番号“10,11”のCPUは、ノード102に属する。   In this case, it is assumed that the application 140 issues a system call including the setting of the CPU number “8, 9, 10, 11” at the time of activation. Of the four CPUs corresponding to the CPU numbers “8, 9, 10, 11”, the CPU with the CPU number “8, 9” belongs to the node 101. The CPU with the CPU number “10, 11” belongs to the node 102.

CPU名変換部130は、当該システムコールをフックし、変換テーブル111に基づいて、CPU番号“8,9,10,11”を、CPU番号“4,5,6,7”に変換する。CPU名変換部130は、当該変換後のCPU設定情報をOSカーネル120に通知する(図6では、OSカーネル120の図示を省略している)。OSカーネル120は、CPU名変換部130からの通知により、CPU番号“4,5,6,7”に対応する4つのCPUを、アプリケーション140に割り当てる。当該4つのCPUは、何れもノード101に属する。   The CPU name conversion unit 130 hooks the system call and converts the CPU number “8, 9, 10, 11” into the CPU number “4, 5, 6, 7” based on the conversion table 111. The CPU name conversion unit 130 notifies the converted OS setting information to the OS kernel 120 (the OS kernel 120 is not shown in FIG. 6). The OS kernel 120 allocates four CPUs corresponding to the CPU numbers “4, 5, 6, 7” to the application 140 based on the notification from the CPU name conversion unit 130. The four CPUs all belong to the node 101.

図6(B)は、ノード101上で、あるCPU(一例として、CPU番号“9”のCPU)で障害が発生している場合を例示している。この場合、サーバ100は、ノード101において、CPU番号“9”の利用を停止し、縮退運転を行う。変換テーブル111には、CPU番号“6,7,8,9”それぞれを、CPU番号“5,6,7,8”に変換するよう定義されているものとする。   FIG. 6B illustrates a case where a failure occurs in a certain CPU (a CPU having a CPU number “9” as an example) on the node 101. In this case, the server 100 stops the use of the CPU number “9” in the node 101 and performs the degenerate operation. It is assumed that the conversion table 111 is defined so that each of the CPU numbers “6, 7, 8, 9” is converted into the CPU numbers “5, 6, 7, 8”.

このとき、アプリケーション140が、起動時にCPU番号“6,7,8,9”の設定を含むシステムコールを発行したとする。図6(B)の例では、CPU番号“9”は、障害により利用できない。CPU名変換部130は、当該システムコールをフックし、変換テーブル111に基づいて、CPU番号“6,7,8,9”を、CPU番号“5,6,7,8”に変換する。CPU名変換部130は、当該変換後のCPU設定情報をOSカーネル120に通知する。OSカーネル120は、CPU名変換部130からの通知により、CPU番号“5,6,7,8”に対応する4つのCPUを、アプリケーション140に割り当てる。当該4つのCPUは、何れもノード101に属する。   At this time, it is assumed that the application 140 issues a system call including the setting of the CPU number “6, 7, 8, 9” at the time of activation. In the example of FIG. 6B, the CPU number “9” cannot be used due to a failure. The CPU name conversion unit 130 hooks the system call and converts the CPU number “6, 7, 8, 9” into the CPU number “5, 6, 7, 8” based on the conversion table 111. The CPU name conversion unit 130 notifies the OS kernel 120 of the CPU setting information after the conversion. The OS kernel 120 assigns four CPUs corresponding to the CPU numbers “5, 6, 7, 8” to the application 140 based on the notification from the CPU name conversion unit 130. The four CPUs all belong to the node 101.

こうして、CPU名変換部130は、単一のノード101からアプリケーション140に割り当てるCPUを決定することで、アプリケーション140による処理性能の向上を図れ、アプリケーション140を適切に動作させることができる。   In this way, the CPU name conversion unit 130 determines the CPU to be assigned to the application 140 from the single node 101, thereby improving the processing performance of the application 140 and allowing the application 140 to operate appropriately.

上記のCPU名変換部130の機能は、アプリケーション140を実行するサーバのNUMA構成が変化し得る場合に有用である。
図7は、CPU番号の割り当ての比較例を示す図である。例えば、サーバ200は、CPU名変換部130の機能を有していない。サーバ200は、CPUとRAMとを備えるノード201、および、CPUとRAMとを備えるノード202を有している。ノード201,202は、それぞれ12個のCPUを有する。ノード201のCPU群P3に属するCPU番号は“0“〜“11”である。ノード202のCPU群P4に属するCPU番号は“12”〜“23”である。サーバ200上のアプリケーション240は、実行するCPUを固定する設定がなされており、CPU番号“8,9,10,11”が予め定義されている。
The function of the CPU name conversion unit 130 is useful when the NUMA configuration of the server that executes the application 140 can change.
FIG. 7 is a diagram illustrating a comparative example of CPU number assignment. For example, the server 200 does not have the function of the CPU name conversion unit 130. The server 200 includes a node 201 that includes a CPU and a RAM, and a node 202 that includes a CPU and a RAM. Each of the nodes 201 and 202 has 12 CPUs. The CPU numbers belonging to the CPU group P3 of the node 201 are “0” to “11”. The CPU numbers belonging to the CPU group P4 of the node 202 are “12” to “23”. The application 240 on the server 200 is set to fix the CPU to be executed, and CPU numbers “8, 9, 10, 11” are defined in advance.

例えば、アプリケーション240を別のサーバ300に移動して(配備先を変更して)動作させることを考える(図7(A)のケース)。サーバ300は、ノード301,302を有する。ノード301,302は、それぞれ10個のCPUを有する。ノード301のCPU群P5に属するCPU番号は“0”〜“9”である。ノード302のCPU群P6に属するCPU番号は“10”〜“19”である。   For example, consider moving the application 240 to another server 300 (changing the deployment destination) and operating it (the case of FIG. 7A). The server 300 has nodes 301 and 302. Each of the nodes 301 and 302 has 10 CPUs. The CPU numbers belonging to the CPU group P5 of the node 301 are “0” to “9”. The CPU numbers belonging to the CPU group P6 of the node 302 are “10” to “19”.

一方、アプリケーション240では、CPU番号“8,9,10,11”が予め定義されている。サーバ300のOSカーネルがアプリケーション240の定義に従って割り当てるCPUを決定すると、アプリケーション240を実行するCPUがノード301,302に跨ることになる。前述のように、NUMAでは、リモートメモリにアクセスするよりも、ローカルメモリにアクセスする方が処理を高速化できる。逆にいえば、CPUがリモートメモリへアクセスする場合、期待する処理性能を発揮できないことになる。このため、アプリケーション240を実行する複数のCPUが複数のノードに跨ると、処理性能を十分に発揮できない。   On the other hand, in the application 240, CPU numbers “8, 9, 10, 11” are defined in advance. When the OS kernel of the server 300 determines the CPU to be assigned according to the definition of the application 240, the CPU that executes the application 240 straddles the nodes 301 and 302. As described above, in NUMA, it is possible to speed up processing by accessing local memory rather than accessing remote memory. Conversely, when the CPU accesses the remote memory, the expected processing performance cannot be exhibited. For this reason, when a plurality of CPUs executing the application 240 straddle a plurality of nodes, the processing performance cannot be sufficiently exhibited.

続いて、サーバ200でハードウェアエラーが発生し、CPU番号“9”のCPU(図中“CPU9”と表記)が縮退している場合を考える(図7(B)のケース)。この場合、サーバ200のOSカーネルは、アプリケーション240側のCPU番号“8,9,10,11”の指定に対して、CPU番号“9”のCPUの割り当てを行えない。このため、OSカーネルは、CPU番号“9”のCPUの代替となるCPUを任意に決定して、アプリケーション240に割り当てる。OSカーネルは、ノード202から代替のCPUを、アプリケーション240に割り当てることもある。この場合も、図7(A)と同様に、期待する処理性能を発揮できないことになる。   Next, consider a case where a hardware error has occurred in the server 200 and the CPU with the CPU number “9” (denoted as “CPU9” in the figure) is degenerated (case in FIG. 7B). In this case, the OS kernel of the server 200 cannot assign the CPU with the CPU number “9” in response to the designation of the CPU number “8, 9, 10, 11” on the application 240 side. For this reason, the OS kernel arbitrarily determines a CPU to be substituted for the CPU with the CPU number “9” and assigns it to the application 240. The OS kernel may assign an alternative CPU from the node 202 to the application 240. In this case as well, as in FIG. 7A, the expected processing performance cannot be exhibited.

図7(A)および図7(B)で例示した各ケースの場合、ノード上のCPUの配置が変更されるたびに、ユーザにより、アプリケーション240によるCPUの指定を変更することも考えられる。しかし、このような作業をユーザに強いると、ユーザの作業負担が増す。   In each case illustrated in FIG. 7A and FIG. 7B, it is conceivable that the user changes the designation of the CPU by the application 240 every time the arrangement of the CPU on the node is changed. However, if such a work is forced on the user, the work burden on the user increases.

一方、サーバ100では、CPU名変換部130は、変換テーブル111に基づいて、サーバ100におけるNUMAの実装に応じて、アプリケーション140に割り当てるCPUを決定する。このため、サーバ100は、NUMAを意識して作成されたアプリケーション140に対して期待される性能を発揮させて、適切に動作させることができる。また、ユーザは、変換テーブル111の設定を行えばよく、アプリケーション140の変更を行わずに済む。ユーザに対してアプリケーション140の変更を強いずに済むので、ユーザによる作業の負担を軽減できる。   On the other hand, in the server 100, the CPU name conversion unit 130 determines a CPU to be assigned to the application 140 according to the NUMA implementation in the server 100 based on the conversion table 111. For this reason, the server 100 can exhibit the performance expected with respect to the application 140 created in consideration of NUMA and can operate appropriately. Further, the user only needs to set the conversion table 111, and does not need to change the application 140. Since it is not necessary to force the user to change the application 140, the burden on the user can be reduced.

[第3の実施の形態]
以下、第3の実施の形態を説明する。前述の第2の実施の形態と相違する事項を主に説明し、共通する事項の説明を省略する。
[Third Embodiment]
Hereinafter, a third embodiment will be described. Items that differ from the second embodiment described above will be mainly described, and descriptions of common items will be omitted.

第2の実施の形態では、サーバ100は、変換テーブル111に基づいて、アプリケーション140の起動時に、アプリケーション140に割り当てるCPUを決定するものとした。一方、アプリケーション140に割り当てるCPUを、起動時および起動後にも動的に変更することも考えられる。各ノードにおいて利用可能なCPUやCPUの負荷は運用に応じて変わり得るからである。そこで、第3の実施の形態では、アプリケーション140に割り当てるCPUを動的に変更する機能を提供する。   In the second embodiment, the server 100 determines a CPU to be assigned to the application 140 when the application 140 is activated based on the conversion table 111. On the other hand, it is also conceivable to dynamically change the CPU assigned to the application 140 at the time of activation and after activation. This is because the CPU and the load on the CPU that can be used in each node can vary depending on the operation. Therefore, in the third embodiment, a function of dynamically changing the CPU assigned to the application 140 is provided.

ここで、第3の実施の形態では、サーバ100に代えて、サーバ100aを用いる。サーバ100aのハードウェアは、図2で例示した第2の実施の形態のサーバ100と同様である。このため、サーバ100aのハードウェアを、サーバ100と同様の符号・名称を用いて指し示す。   Here, in the third embodiment, a server 100 a is used instead of the server 100. The hardware of the server 100a is the same as that of the server 100 of the second embodiment illustrated in FIG. For this reason, the hardware of the server 100a is indicated using the same symbols and names as the server 100.

図8は、第3の実施の形態のソフトウェア例を示す図である。サーバ100aは、記憶部110、OSカーネル120、アプリケーション140およびスケジューラ150を有する。記憶部110は、RAM1m,2mまたはHDD103に確保された記憶領域として実現される。OSカーネル120およびスケジューラ150は、RAM1m,2mに格納されたプログラムを、CPU11p,12p,・・・およびCPU21p,22p,・・・の少なくとも1つが実行することで実現される。アプリケーション140は、後述するように、可能な限り1つのノードに属するCPU群およびRAMを用いて実行される。   FIG. 8 is a diagram illustrating an example of software according to the third embodiment. The server 100a includes a storage unit 110, an OS kernel 120, an application 140, and a scheduler 150. The storage unit 110 is realized as a storage area secured in the RAM 1m, 2m or the HDD 103. The OS kernel 120 and the scheduler 150 are realized by at least one of the CPUs 11p, 12p,... And the CPUs 21p, 22p,. As will be described later, the application 140 is executed using a CPU group and a RAM belonging to one node as much as possible.

サーバ100aは、変換テーブル111に代えてプロセステーブル112を記憶部110に格納する点がサーバ100と異なる。また、サーバ100aは、CPU名変換部130に代えてスケジューラ150を有する点がサーバ100と異なる。また、記憶部110は、サーバ100aが有するCPUのCPU番号、および、CPU番号と当該CPU番号に対応するCPUが属するノードとの対応関係を示すCPUの構成情報を記憶する。   The server 100 a is different from the server 100 in that the process table 112 is stored in the storage unit 110 instead of the conversion table 111. The server 100a is different from the server 100 in that it includes a scheduler 150 instead of the CPU name conversion unit 130. In addition, the storage unit 110 stores CPU configuration information indicating the CPU number of the server 100a and the correspondence between the CPU number and the node to which the CPU corresponding to the CPU number belongs.

プロセステーブル112は、スケジューラ150によるCPU番号の変換対象とするプロセスを識別するための情報を記録したテーブルである。プロセステーブル112は、スケジューラ150により作成され、記憶部110に格納される。   The process table 112 is a table in which information for identifying a process to be converted into a CPU number by the scheduler 150 is recorded. The process table 112 is created by the scheduler 150 and stored in the storage unit 110.

スケジューラ150は、アプリケーション140のプロセスに対して、CPU番号の再設定を行う。スケジューラ150は、各CPUのノード上の配置および各CPUの利用状況に基づいて、アプリケーション140に割り当てるCPUのCPU番号を決定する。スケジューラ150は、決定したCPU番号をOSカーネル120に通知する。   The scheduler 150 resets the CPU number for the process of the application 140. The scheduler 150 determines the CPU number of the CPU to be assigned to the application 140 based on the placement of each CPU on the node and the usage status of each CPU. The scheduler 150 notifies the OS kernel 120 of the determined CPU number.

また、スケジューラ150は、CPUの構成情報、各アプリケーションの現在のCPU割り当て状況、および、各ノードにおけるCPUおよびRAMの負荷に関する情報を収集し、記憶部110に格納する。   In addition, the scheduler 150 collects information on the CPU configuration information, the current CPU allocation status of each application, and the CPU and RAM loads in each node, and stores them in the storage unit 110.

OSカーネル120は、スケジューラ150から通知されたCPU番号に基づいて、アプリケーション140にCPUを割り当てる。
図9は、第3の実施の形態のプロセステーブルの例を示す図である。プロセステーブル112は、記憶部110に格納される。プロセステーブル112は、プロセスIDおよび指定CPU番号の項目を含む。
The OS kernel 120 assigns a CPU to the application 140 based on the CPU number notified from the scheduler 150.
FIG. 9 illustrates an example of a process table according to the third embodiment. The process table 112 is stored in the storage unit 110. The process table 112 includes items of process ID and designated CPU number.

プロセスIDの項目には、アプリケーション140のプロセスのプロセスIDが登録される。指定CPU番号の項目には、アプリケーション140により指定されたCPU番号が登録される。例えば、プロセステーブル112には、プロセスIDが“10203”、指定CPU番号が“0,1”という情報が登録されている。これは、プロセスID“10203”のプロセスに対応するアプリケーション140により指定されたCPU番号が“0,1”であることを示す。   In the process ID item, the process ID of the process of the application 140 is registered. The CPU number designated by the application 140 is registered in the designated CPU number field. For example, information that the process ID is “10203” and the designated CPU number is “0, 1” is registered in the process table 112. This indicates that the CPU number designated by the application 140 corresponding to the process with the process ID “10203” is “0, 1”.

次に、サーバ100aによるアプリ起動時の処理手順を説明する。
図10は、第3の実施の形態のアプリ起動例を示すフローチャートである。以下、図10に示す処理をステップ番号に沿って説明する。
Next, a processing procedure at the time of application activation by the server 100a will be described.
FIG. 10 is a flowchart illustrating an application activation example according to the third embodiment. In the following, the process illustrated in FIG. 10 will be described in order of step number.

(S21)スケジューラ150は、アプリ起動時にCPU情報を取得する。例えば、サーバ100aは、アプリケーション140を起動する際、次のような起動コマンドを用いてアプリケーション140を起動することができる。   (S21) The scheduler 150 acquires CPU information when the application is activated. For example, when starting the application 140, the server 100a can start the application 140 by using the following start command.

“#set−cpu−run −cpu <cpu名リスト> コマンド”
ここで、“<cpu名リスト>”の箇所は、指定CPU番号のリストが挿入される。また、“コマンド”の箇所は、アプリケーション140を起動するための任意のコマンドが挿入される。スケジューラ150は、上記の起動コマンドにより入力された指定CPU番号のリストを取得する。
"# Set-cpu-run-cpu <cpu name list>command"
Here, a list of designated CPU numbers is inserted in the place of “<cpu name list>”. In addition, an arbitrary command for starting the application 140 is inserted in the place of “command”. The scheduler 150 obtains a list of designated CPU numbers input by the start command.

(S22)スケジューラ150は、アプリケーション140のプロセスIDに対して、ステップS21で取得したCPU情報(すなわち、指定CPU番号のリスト)を記録する。例えば、スケジューラ150は、アプリケーション140のプロセスID“10203”に対して、指定CPU番号“0,1”を、記憶部110に記憶されたプロセステーブル112に登録する。なお、OSカーネル120は、アプリケーション140の起動後、内部論理にしたがってアプリケーション140に割り当てるCPUの設定を行う。   (S22) The scheduler 150 records the CPU information (that is, the list of designated CPU numbers) acquired in step S21 for the process ID of the application 140. For example, the scheduler 150 registers the designated CPU number “0, 1” for the process ID “10203” of the application 140 in the process table 112 stored in the storage unit 110. The OS kernel 120 sets the CPU to be assigned to the application 140 according to the internal logic after the application 140 is started.

(S23)スケジューラ150は、各ノードに対するCPUの配置状況やサーバ100aの各ノードのCPU負荷の監視に応じて、アプリケーション140に対して割り当てるCPUの再設定を行う。スケジューラ150は、CPUの再設定の結果をOSカーネル120に通知する。ステップS23の処理の詳細は後述される。   (S23) The scheduler 150 resets the CPU to be assigned to the application 140 in accordance with the CPU arrangement status for each node and the CPU load of each node of the server 100a. The scheduler 150 notifies the OS kernel 120 of the result of the CPU resetting. Details of the processing in step S23 will be described later.

OSカーネル120は、スケジューラ150から受け付けたCPUの再設定の結果に基づいて、アプリケーション140に対するCPUの割り当てを変更する。
図11は、第3の実施の形態のCPU再設定例を示すフローチャートである。以下、図11に示す処理をステップ番号に沿って説明する。以下の手順は、図10のステップS23に相当する。
The OS kernel 120 changes the CPU assignment to the application 140 based on the CPU reset result received from the scheduler 150.
FIG. 11 is a flowchart illustrating an example of CPU resetting according to the third embodiment. In the following, the process illustrated in FIG. 11 will be described in order of step number. The following procedure corresponds to step S23 in FIG.

(S31)スケジューラ150は、ホスト情報を取得する。ホスト情報は、サーバ100aの負荷に関する情報を含む。また、ホスト情報は、サーバ100aにおけるCPUの構成情報(各CPUが何れのノードに属しているか)を示す情報を含む。更に、ホスト情報は、各アプリケーションに対して現在割り当てられているCPUのCPU番号の情報を含む。   (S31) The scheduler 150 acquires host information. The host information includes information regarding the load on the server 100a. The host information includes information indicating the configuration information of the CPU in the server 100a (which node each CPU belongs to). Further, the host information includes information on the CPU number of the CPU currently assigned to each application.

(S32)スケジューラ150は、プロセステーブル112に記録された全てのプロセスを確認済であるか否かを判定する。全てのプロセスを確認済である場合、処理を終了する(次にCPU再設定を行うタイミングまで待機する)。全てのプロセスを確認済でない場合、処理をステップS33に進める。   (S32) The scheduler 150 determines whether all processes recorded in the process table 112 have been confirmed. If all the processes have been confirmed, the process is terminated (wait until the next CPU reset timing). If not all processes have been confirmed, the process proceeds to step S33.

(S33)スケジューラ150は、プロセステーブル112からプロセス(プロセスID)を1つ選択する。
(S34)スケジューラ150は、ステップS33で選択したプロセスに割り当てられたCPUとホスト情報とを照会する。例えば、スケジューラ150は、該当のプロセスに割り当てられたCPUのCPU番号をOSカーネル120に問い合わせることで、該当のプロセスに割り当てられたCPUを照会できる。また、スケジューラ150は、ホスト情報を照会することで、各CPUの負荷を把握する。
(S33) The scheduler 150 selects one process (process ID) from the process table 112.
(S34) The scheduler 150 inquires about the CPU and host information assigned to the process selected in step S33. For example, the scheduler 150 can inquire about the CPU assigned to the relevant process by inquiring the CPU number of the CPU assigned to the relevant process from the OS kernel 120. Further, the scheduler 150 checks the load of each CPU by inquiring host information.

(S35)スケジューラ150は、アプリケーション140に対するCPU番号の変換先を変更し、変更結果をOSカーネル120に通知する。ステップS35の処理の詳細は後述される。   (S35) The scheduler 150 changes the CPU number conversion destination for the application 140, and notifies the OS kernel 120 of the change result. Details of the processing in step S35 will be described later.

なお、スケジューラ150は、上記のステップS31〜S35の手順を定期的に(所定の周期で)実行してもよい。
図12は、第3の実施の形態のCPU割り当て変更例を示すフローチャートである。以下、図12に示す処理をステップ番号に沿って説明する。以下の手順は、図11のステップS35に相当する。
In addition, the scheduler 150 may execute the above steps S31 to S35 periodically (at a predetermined cycle).
FIG. 12 is a flowchart illustrating an example of CPU allocation change according to the third embodiment. In the following, the process illustrated in FIG. 12 will be described in order of step number. The following procedure corresponds to step S35 in FIG.

(S41)スケジューラ150は、アプリ指定のCPUが存在するか否かを判定する。アプリ指定のCPUが存在する場合、処理をステップS42に進める。アプリ指定のCPUが存在しない場合、処理をステップS44に進める。ここで、スケジューラ150は、プロセステーブル112およびサーバ100aにおけるCPUの構成情報(CPU番号やCPU番号のノードへの所属を示す情報)を照合することで、アプリ指定のCPUが存在するか否かを判定する。前述のように、CPUの構成情報は、スケジューラ150により収集されて、記憶部110に格納される。スケジューラ150は、アプリケーション140のプロセスIDに対応する指定CPU番号をプロセステーブル112上で特定することで、アプリ指定のCPUのCPU番号を取得できる。アプリ指定のCPUが複数の場合、スケジューラ150は、全てのCPUがサーバ100a上に存在する場合に、処理をステップS42に進める。一方、スケジューラ150は、少なくとも1つのCPUがサーバ100a上に存在しない場合に、処理をステップS44に進める。   (S41) The scheduler 150 determines whether an application-specified CPU exists. If an application-designated CPU exists, the process proceeds to step S42. If there is no application-designated CPU, the process proceeds to step S44. Here, the scheduler 150 collates the CPU configuration information (information indicating the CPU number and the affiliation of the CPU number with the node) in the process table 112 and the server 100a to determine whether or not the application-designated CPU exists. judge. As described above, the CPU configuration information is collected by the scheduler 150 and stored in the storage unit 110. The scheduler 150 can acquire the CPU number of the CPU designated by the application by specifying the designated CPU number corresponding to the process ID of the application 140 on the process table 112. When there are a plurality of application-designated CPUs, the scheduler 150 advances the process to step S42 when all the CPUs exist on the server 100a. On the other hand, the scheduler 150 advances the process to step S44 when at least one CPU does not exist on the server 100a.

(S42)スケジューラ150は、アプリ指定の全CPUが同一ノード上にあるか否かを判定する。全CPUが同一ノード上にある場合、処理をステップS43に進める。全CPUが同一ノード上にない場合、処理をステップS44に進める。例えば、スケジューラ150は、前述のCPUの構成情報に基づいて、アプリ指定の全CPUが同一ノード上にあるか否かを判定することができる。   (S42) The scheduler 150 determines whether all CPUs designated by the application are on the same node. If all the CPUs are on the same node, the process proceeds to step S43. If all the CPUs are not on the same node, the process proceeds to step S44. For example, the scheduler 150 can determine whether all CPUs designated by the application are on the same node based on the above-described CPU configuration information.

(S43)スケジューラ150は、アプリ指定のCPUのうち、何れかのCPUが高負荷であるか否かを判定する。アプリ指定のCPUのうち、何れかのCPUが高負荷である場合、処理をステップS46に進める。アプリ指定の何れのCPUも高負荷でない場合、処理を終了する。後者の場合、CPU番号の変換を行わない。すなわち、OSカーネル120は、アプリケーション140から指定されたCPU群をそのままアプリケーション140に割り当てることになる。ここで、スケジューラ150は、例えば、CPUのビジー率が所定の閾値を超過しているか否かに応じて、該当のCPUが高負荷であるか否かを判定できる。CPUのビジー率が閾値を超過している場合、該当のCPUは高負荷である。CPUのビジー率が閾値を超過していない場合、該当のCPUは高負荷でない。   (S43) The scheduler 150 determines whether any one of the CPUs designated by the application has a high load. If any one of the CPUs designated by the application has a high load, the process proceeds to step S46. If none of the CPUs designated by the application is loaded, the process ends. In the latter case, the CPU number is not converted. That is, the OS kernel 120 assigns the CPU group designated by the application 140 to the application 140 as it is. Here, the scheduler 150 can determine whether or not the corresponding CPU is heavily loaded, for example, depending on whether or not the CPU busy rate exceeds a predetermined threshold. When the CPU busy rate exceeds the threshold, the CPU is heavily loaded. If the CPU busy rate does not exceed the threshold, the CPU is not heavily loaded.

(S44)スケジューラ150は、アプリケーション140が所要するCPU数を供給できるノードがあるか否かを判定する。アプリケーション140が所要するCPU数を供給できるノードがない場合、処理をステップS45に進める。アプリケーション140が所要するCPU数を供給できるノードがある場合、処理をステップS46に進める。ここで、スケジューラ150は、アプリケーション140のプロセスIDに対応する指定CPU番号の数をプロセステーブル112上でカウントすることで、アプリケーション140が所要するCPU数を取得できる。また、各ノードが有するCPU数は、記憶部110に記憶されたCPUの構成情報から取得できる。所要するCPU数のCPUを含むノードが、アプリケーション140が所要するCPU数を提供できるノードである。   (S44) The scheduler 150 determines whether there is a node that can supply the number of CPUs required by the application 140. If there is no node that can supply the number of CPUs required by the application 140, the process proceeds to step S45. If there is a node that can supply the number of CPUs required by the application 140, the process proceeds to step S46. Here, the scheduler 150 can acquire the number of CPUs required by the application 140 by counting the number of designated CPU numbers corresponding to the process ID of the application 140 on the process table 112. Further, the number of CPUs possessed by each node can be obtained from the CPU configuration information stored in the storage unit 110. A node including the required number of CPUs is a node that can provide the number of CPUs required by the application 140.

(S45)スケジューラ150は、ホスト上(すなわち、サーバ100a上)のCPU一覧を取得する。CPU一覧は、CPU番号のリストである。そして、処理をステップS48に進める。   (S45) The scheduler 150 acquires a CPU list on the host (that is, on the server 100a). The CPU list is a list of CPU numbers. Then, the process proceeds to step S48.

(S46)スケジューラ150は、サーバ100aのノード101,102のうち、CPU/RAMに空きのあるノードを選択する。例えば、スケジューラ150は、何れのアプリケーションの実行にも使用されていないCPUおよびRAMをもつノードを選択する。また、例えば、スケジューラ150は、CPUおよびRAMの負荷が所定の閾値よりも低いノードを選択してもよい。選択対象として複数のノードが候補になるなら、スケジューラ150は、複数の候補ノードのうち、CPUおよびRAMの負荷が最も低いノードを選択してもよい。CPUの負荷としては前述のビジー率が考えられる。RAMの負荷としては、RAMの記憶領域の使用率が考えられる。スケジューラ150は、CPUのビジー率およびRAMの使用率それぞれに重み付けして加算することで、ノード単位の負荷を評価してもよい。例えば、スケジューラ150は、ノード単位の負荷が最小のノードを割り当てるCPUの選択に用いるノードと決定してもよい。   (S46) The scheduler 150 selects a node having free CPU / RAM among the nodes 101 and 102 of the server 100a. For example, the scheduler 150 selects a node having a CPU and RAM that are not used to execute any application. Further, for example, the scheduler 150 may select a node whose CPU and RAM loads are lower than a predetermined threshold. If a plurality of nodes are candidates for selection, the scheduler 150 may select a node having the lowest CPU and RAM load among the plurality of candidate nodes. The aforementioned busy rate can be considered as a load on the CPU. As the load on the RAM, the usage rate of the storage area of the RAM can be considered. The scheduler 150 may evaluate the load in units of nodes by weighting and adding the CPU busy rate and the RAM usage rate. For example, the scheduler 150 may determine a node to be used for selection of a CPU to which a node having a minimum node unit load is allocated.

(S47)スケジューラ150は、ステップS46で選択したノード上のCPU一覧を取得する。そして、処理をステップS48に進める。
(S48)スケジューラ150は、取得したCPU一覧のCPU番号を、当該CPU番号に対応するCPUの負荷の低い順にソートする。
(S47) The scheduler 150 acquires a CPU list on the node selected in step S46. Then, the process proceeds to step S48.
(S48) The scheduler 150 sorts the CPU numbers in the acquired CPU list in ascending order of CPU load corresponding to the CPU numbers.

(S49)スケジューラ150は、ソート結果に基づいて、負荷の低いCPUのCPU番号を選択する。例えば、スケジューラ150は、対応するCPUの負荷が小さい方から順番に、アプリケーション140が所要するCPU数の分だけ、アプリケーション140に割り当てるCPU番号を選択する。   (S49) The scheduler 150 selects a CPU number of a CPU with a low load based on the sorting result. For example, the scheduler 150 selects a CPU number to be assigned to the application 140 by the number of CPUs required by the application 140 in order from the smallest load of the corresponding CPU.

(S50)スケジューラ150は、アプリケーション140に割り当てるCPU番号を、ステップS49で選択したCPU番号に変更する(変換先CPU番号を変更する)。スケジューラ150は、アプリケーション140のプロセスIDと、指定CPU番号と、変更後の変換先CPU番号とをOSカーネル120に通知する。   (S50) The scheduler 150 changes the CPU number assigned to the application 140 to the CPU number selected in step S49 (changes the conversion destination CPU number). The scheduler 150 notifies the OS kernel 120 of the process ID of the application 140, the designated CPU number, and the changed conversion destination CPU number.

OSカーネル120は、スケジューラ150からの通知に応じて、アプリケーション140へのCPUの割り当てを変更する。
このように、スケジューラ150を用いて、アプリケーション140に対するCPUの割り当てを動的に変更することもできる。このとき、スケジューラ150は、同一ノード上にあるCPUを優先してアプリケーション140に割り当てるように変換先のCPU番号を決定する。これにより、NUMAを意識して作成されたアプリケーション140の処理性能を適切に発揮して、アプリケーション140を動作させることができる。
In response to the notification from the scheduler 150, the OS kernel 120 changes the CPU allocation to the application 140.
As described above, the CPU 150 can be dynamically changed with respect to the application 140 by using the scheduler 150. At this time, the scheduler 150 determines a conversion destination CPU number so that CPUs on the same node are preferentially assigned to the application 140. Thereby, the processing performance of the application 140 created in consideration of NUMA can be appropriately exhibited, and the application 140 can be operated.

また、スケジューラ150は、ノード単位の負荷に応じて、負荷が最小のノードを、アプリケーション140に割り当てるCPUの抽出対象とすることで、特定のノードに処理負荷が偏ることを防げる。更に、スケジューラ150は、同一ノード内において、負荷の低い方から順に、アプリケーション140により要求された数のCPUを選択することで、ノード内のCPUの負荷の平準化も図れる。これにより、サーバ100aにおけるリソース利用の効率化を図れる。その結果、サーバ100aで実行される複数のアプリケーションの処理を高速化できる。更に、ユーザに対してアプリケーション140の変更作業を強いずに済み、ユーザの作業の負担を軽減できる。   Further, the scheduler 150 can prevent a processing load from being biased to a specific node by setting a node having the smallest load as an extraction target of a CPU to be assigned to the application 140 in accordance with the load of each node. Further, the scheduler 150 can select the number of CPUs requested by the application 140 in order from the lowest load in the same node, and thereby level the CPU load in the node. Thereby, the efficiency of resource utilization in the server 100a can be improved. As a result, the processing of a plurality of applications executed on the server 100a can be accelerated. Furthermore, it is not necessary to force the user to change the application 140, and the burden on the user can be reduced.

[第4の実施の形態]
以下、第4の実施の形態を説明する。前述の第2,第3の実施の形態と相違する事項を主に説明し、共通する事項の説明を省略する。
[Fourth Embodiment]
Hereinafter, a fourth embodiment will be described. Items different from the second and third embodiments described above will be mainly described, and description of common items will be omitted.

第3の実施の形態では、スケジューラ150が、プロセスID毎に変換先のCPU番号を、OSカーネル120に通知するものとした。一方、OSカーネル120が内部にもつCPU番号の変換テーブルを外部から書き換えることで、OSカーネル120によるCPU番号の変換を制御することも考えられる。そこで、第4の実施の形態では、OSカーネル120内の変換テーブルを書き換える機能を提供する。   In the third embodiment, the scheduler 150 notifies the OS kernel 120 of the conversion destination CPU number for each process ID. On the other hand, it is also conceivable to control the conversion of the CPU number by the OS kernel 120 by rewriting the conversion table of the CPU number in the OS kernel 120 from the outside. Therefore, in the fourth embodiment, a function for rewriting the conversion table in the OS kernel 120 is provided.

ここで、第4の実施の形態では、サーバ100aに代えて、サーバ100bを用いる。サーバ100bのハードウェアは、図2で例示した第2の実施の形態のサーバ100と同様である。このため、サーバ100bのハードウェアを、サーバ100と同様の符号・名称を用いて指し示す。   Here, in the fourth embodiment, a server 100b is used instead of the server 100a. The hardware of the server 100b is the same as that of the server 100 of the second embodiment illustrated in FIG. For this reason, the hardware of the server 100b is indicated using the same symbols and names as the server 100.

図13は、第4の実施の形態のソフトウェア例を示す図である。サーバ100bは、記憶部110、OSカーネル120、アプリケーション140およびスケジューラ160を有する。記憶部110は、RAM1m,2mまたはHDD103に確保された記憶領域として実現される。OSカーネル120およびスケジューラ160は、RAM1m,2mに格納されたプログラムを、CPU11p,12p,・・・およびCPU21p,22p,・・・の少なくとも1つが実行することで実現される。アプリケーション140は、後述するように、可能な限り1つのノードに属するCPU群およびRAMを用いて実行される。   FIG. 13 is a diagram illustrating an example of software according to the fourth embodiment. The server 100b includes a storage unit 110, an OS kernel 120, an application 140, and a scheduler 160. The storage unit 110 is realized as a storage area secured in the RAM 1m, 2m or the HDD 103. The OS kernel 120 and the scheduler 160 are realized by at least one of the CPUs 11p, 12p,... And the CPUs 21p, 22p,. As will be described later, the application 140 is executed using a CPU group and a RAM belonging to one node as much as possible.

サーバ100bは、プロセステーブル112に加えて、変換テーブル113を記憶部110に格納する点がサーバ100aと異なる。また、サーバ100bは、スケジューラ150に代えてスケジューラ160を有する点がサーバ100aと異なる。   The server 100b is different from the server 100a in that the conversion table 113 is stored in the storage unit 110 in addition to the process table 112. The server 100b is different from the server 100a in that the server 100b includes a scheduler 160 instead of the scheduler 150.

変換テーブル113は、OSカーネル120によるCPU番号の変換に用いられる情報である。変換テーブル113は、スケジューラ160により作成され、記憶部110に格納される。   The conversion table 113 is information used for CPU number conversion by the OS kernel 120. The conversion table 113 is created by the scheduler 160 and stored in the storage unit 110.

スケジューラ160は、アプリケーション140のプロセスに対して、CPU番号の再設定を行う。スケジューラ160は、各CPUのノード上の配置および各CPUの利用状況に基づいて、アプリケーション140に割り当てるCPUのCPU番号を決定する。スケジューラ160は、決定したCPU番号を、プロセスIDおよび変換元CPU番号(アプリケーション140により指定されたCPU番号)に対応付けて、変換テーブル113に登録する。   The scheduler 160 resets the CPU number for the process of the application 140. The scheduler 160 determines the CPU number of the CPU assigned to the application 140 based on the arrangement of each CPU on the node and the usage status of each CPU. The scheduler 160 registers the determined CPU number in the conversion table 113 in association with the process ID and the conversion source CPU number (the CPU number specified by the application 140).

また、スケジューラ160は、CPUの構成情報、各アプリケーションの現在のCPU割り当て状況、および、各ノードにおけるCPUおよびRAMの負荷に関する情報を収集し、記憶部110、または、他の記憶部に格納する。   In addition, the scheduler 160 collects information on the CPU configuration information, the current CPU allocation status of each application, and the CPU and RAM loads in each node, and stores them in the storage unit 110 or other storage units.

OSカーネル120は、記憶部110に記憶された変換テーブル113に基づいて、アプリケーション140にCPUを割り当てる。
図14は、第4の実施の形態の変換テーブルの例を示す図である。変換テーブル113は、記憶部110に格納される。変換テーブル113は、プロセスID、変換元CPU番号および変換先CPU番号の項目を含む。
The OS kernel 120 assigns a CPU to the application 140 based on the conversion table 113 stored in the storage unit 110.
FIG. 14 is a diagram illustrating an example of a conversion table according to the fourth embodiment. The conversion table 113 is stored in the storage unit 110. The conversion table 113 includes items of process ID, conversion source CPU number, and conversion destination CPU number.

プロセスIDの項目には、アプリケーション140のプロセスのプロセスIDが登録される。変換元CPU番号の項目には、アプリケーション140により指定されたCPU番号が登録される。変換先CPU番号の項目には、変換元CPU番号に対する変換先のCPU番号が登録される。   In the process ID item, the process ID of the process of the application 140 is registered. The CPU number designated by the application 140 is registered in the item of conversion source CPU number. In the item of conversion destination CPU number, the conversion destination CPU number for the conversion source CPU number is registered.

例えば、変換テーブル113には、プロセスIDが“10203”、変換元CPU番号が“0,1”、変換先CPU番号が“2,3”という情報が登録されている。これは、プロセスID“10203”のプロセスに対応するアプリケーション140により指定された変換元CPU番号が“0,1”であることを示す。また、変換先CPU番号が“2,3”であることを示す。すなわち、プロセスID“10203”に対して、変換先CPU番号“2,3”に対応するCPUを割り当てることを示す。変換テーブル113にプロセスIDを含めることで、サーバ100b上で実行されるアプリケーションが複数存在する場合でも、OSカーネル120は、CPU番号の変換対象とするアプリケーションを適切に識別することができる。   For example, information indicating that the process ID is “10203”, the conversion source CPU number is “0, 1”, and the conversion destination CPU number is “2, 3” is registered in the conversion table 113. This indicates that the conversion source CPU number designated by the application 140 corresponding to the process with the process ID “10203” is “0, 1”. Further, it indicates that the conversion destination CPU number is “2, 3”. That is, the CPU corresponding to the conversion destination CPU number “2, 3” is assigned to the process ID “10203”. By including the process ID in the conversion table 113, the OS kernel 120 can appropriately identify the application to be converted into the CPU number even when there are a plurality of applications to be executed on the server 100b.

次に、サーバ100bによるアプリ起動時の処理手順を説明する。
図15は、第4の実施の形態のアプリ起動例を示すフローチャートである。以下、図15に示す処理をステップ番号に沿って説明する。
Next, a processing procedure at the time of application activation by the server 100b will be described.
FIG. 15 is a flowchart illustrating an application activation example according to the fourth embodiment. In the following, the process illustrated in FIG. 15 will be described in order of step number.

(S51)スケジューラ160は、アプリ起動時にCPU情報を取得する。例えば、第3の実施の形態と同様に、サーバ100bは、アプリケーション140を起動する際、次のような起動コマンドを用いてアプリケーション140を起動することができる。   (S51) The scheduler 160 acquires CPU information when the application is activated. For example, as in the third embodiment, when starting the application 140, the server 100b can start the application 140 using the following start command.

“#set−cpu−run −cpu <cpu名リスト> コマンド”
スケジューラ160は、上記の起動コマンドにより入力された指定CPU番号のリストを取得する。
"# Set-cpu-run-cpu <cpu name list>command"
The scheduler 160 obtains a list of designated CPU numbers input by the start command.

(S52)スケジューラ160は、アプリケーション140のプロセスIDに対して、ステップS51で取得したCPU情報(すなわち、指定CPU番号のリスト)を記録する。例えば、スケジューラ160は、アプリケーション140のプロセスID“10203”に対して、指定CPU番号“0,1”を、記憶部110に記憶されたプロセステーブル112に登録する。なお、OSカーネル120は、アプリケーション140の起動後、内部論理にしたがってアプリケーション140に割り当てるCPUの設定を行う。   (S52) The scheduler 160 records the CPU information (that is, a list of designated CPU numbers) acquired in step S51 for the process ID of the application 140. For example, the scheduler 160 registers the designated CPU number “0, 1” for the process ID “10203” of the application 140 in the process table 112 stored in the storage unit 110. The OS kernel 120 sets the CPU to be assigned to the application 140 according to the internal logic after the application 140 is started.

(S53)スケジューラ160は、アプリケーション140について、OSカーネル120内に変換テーブル113を作成する。具体的には、スケジューラ160は、変換テーブル113を作成し、OSカーネル120およびスケジューラ160からアクセス可能な記憶部110に登録する。例えば、スケジューラ160は、変換テーブル113における変換元CPU番号の設定値を、プロセステーブル112の該当のプロセスIDに対応する指定CPU番号とする。また、スケジューラ160は、変換テーブル113における変換先CPU番号の初期設定値を、ステップS52でOSカーネル120によりアプリケーション140に割り当てられたCPUのCPU番号とすることが考えられる。   (S53) The scheduler 160 creates the conversion table 113 in the OS kernel 120 for the application 140. Specifically, the scheduler 160 creates the conversion table 113 and registers it in the storage unit 110 accessible from the OS kernel 120 and the scheduler 160. For example, the scheduler 160 sets the set value of the conversion source CPU number in the conversion table 113 as the designated CPU number corresponding to the corresponding process ID in the process table 112. Further, the scheduler 160 may use the initial setting value of the conversion destination CPU number in the conversion table 113 as the CPU number of the CPU assigned to the application 140 by the OS kernel 120 in step S52.

(S54)スケジューラ160は、図11および図12の手順により、アプリケーション140に割り当てるCPU番号の再設定を行う(CPU再設定)。ただし、スケジューラ160は、再設定の結果に応じて、ステップS53で作成した変換テーブル113の変換先CPU番号のエントリを更新する。OSカーネル120は、変換テーブル113に基づいて、アプリケーション140に対するCPUの割り当てを変更する。   (S54) The scheduler 160 resets the CPU number assigned to the application 140 according to the procedure of FIGS. 11 and 12 (CPU resetting). However, the scheduler 160 updates the entry of the conversion destination CPU number in the conversion table 113 created in step S53 according to the reset result. The OS kernel 120 changes the CPU allocation to the application 140 based on the conversion table 113.

なお、第3の実施の形態と同様に、スケジューラ160は、当該CPU再設定を、所定の周期で繰り返し実行する。
このように、スケジューラ160を用いて、アプリケーション140に対するCPUの割り当てを動的に変更することもできる。このとき、第3の実施の形態と同様に、スケジューラ160は、同一ノード上にあるCPUを優先してアプリケーション140に割り当てるように変換先のCPU番号を決定する。これにより、NUMAを意識して作成されたアプリケーション140の処理性能を適切に発揮して、アプリケーション140を動作させることができる。
Similar to the third embodiment, the scheduler 160 repeatedly executes the CPU resetting at a predetermined cycle.
As described above, the CPU 160 can be dynamically changed to the application 140 by using the scheduler 160. At this time, as in the third embodiment, the scheduler 160 determines the conversion destination CPU number so that CPUs on the same node are preferentially assigned to the application 140. Thereby, the processing performance of the application 140 created in consideration of NUMA can be appropriately exhibited, and the application 140 can be operated.

また、スケジューラ160は、ノード単位の負荷に応じて、負荷が最小のノードを、アプリケーション140に割り当てるCPUの抽出対象とすることで、特定のノードに処理負荷が偏ることを防げる。更に、スケジューラ160は、同一ノード内において、負荷の低い方から順に、アプリケーション140により要求された数のCPUを選択することで、ノード内のCPUの負荷の平準化も図れる。これにより、サーバ100bにおけるリソース利用の効率化を図れる。その結果、サーバ100bで実行される複数のアプリケーションの処理を高速化できる。更に、ユーザに対してアプリケーション140の変更作業を強いずに済み、ユーザの作業の負担を軽減できる。   Further, the scheduler 160 can prevent a processing load from being biased to a specific node by setting a node having the smallest load as an extraction target of a CPU to be assigned to the application 140 in accordance with the load of each node. Furthermore, the scheduler 160 can select the number of CPUs requested by the application 140 in order from the lowest load in the same node, thereby achieving leveling of the CPU load in the node. Thereby, the efficiency of resource utilization in the server 100b can be improved. As a result, the processing of a plurality of applications executed on the server 100b can be accelerated. Furthermore, it is not necessary to force the user to change the application 140, and the burden on the user can be reduced.

[第5の実施の形態]
以下、第5の実施の形態を説明する。前述の第2〜第4の実施の形態と相違する事項を主に説明し、共通する事項の説明を省略する。
[Fifth Embodiment]
Hereinafter, a fifth embodiment will be described. Items that are different from the second to fourth embodiments described above are mainly described, and descriptions of common items are omitted.

第2〜第4の実施の形態で例示した機能を、仮想マシンに適用することもできる。そこで、第5の実施の形態では、一例として、スケジューラ160の機能を仮想マシンに組み込む例を説明する。   The functions exemplified in the second to fourth embodiments can also be applied to a virtual machine. Therefore, in the fifth embodiment, an example in which the function of the scheduler 160 is incorporated in a virtual machine will be described as an example.

ここで、第5の実施の形態では、サーバ100bに代えて、サーバ100cを用いる。サーバ100cのハードウェアは、図2で例示した第2の実施の形態のサーバ100と同様である。このため、サーバ100cのハードウェアを、サーバ100と同様の符号・名称を用いて指し示す。   Here, in the fifth embodiment, a server 100c is used instead of the server 100b. The hardware of the server 100c is the same as that of the server 100 of the second embodiment illustrated in FIG. For this reason, the hardware of the server 100c is indicated using the same symbols and names as the server 100.

サーバ100cは、1以上の仮想マシンを実行可能である。例えば、サーバ100cは、ハイパーバイザと呼ばれるソフトウェアにより、サーバ100cが有するCPUおよびRAMなどのリソースを、仮想マシンに割り当てる。例えば、ハイパーバイザは、CPUのリソースを時間軸上のタイムスロットで区切って、仮想マシンに割り当てる。仮想マシンに割り当てられるCPUのリソースの一単位を仮想CPU(vCPU:virtual CPU)と呼ぶことがある。仮想CPUも、仮想CPUのCPU番号により識別される。また、ハイパーバイザは、RAMの記憶領域の一部を仮想マシンに割り当てる。   The server 100c can execute one or more virtual machines. For example, the server 100c allocates resources such as a CPU and a RAM included in the server 100c to the virtual machine by software called a hypervisor. For example, the hypervisor divides CPU resources by time slots on the time axis and assigns them to virtual machines. One unit of CPU resources allocated to the virtual machine may be referred to as a virtual CPU (vCPU). The virtual CPU is also identified by the CPU number of the virtual CPU. Further, the hypervisor allocates a part of the RAM storage area to the virtual machine.

図16は、第5の実施の形態のソフトウェア例を示す図である。サーバ100cは、仮想マシン170を有する。仮想マシン170は、サーバ100c上で動作する仮想マシンである。仮想マシン170は、記憶部171、OSカーネル172、アプリケーション173およびスケジューラ174を有する。   FIG. 16 is a diagram illustrating an example of software according to the fifth embodiment. The server 100c has a virtual machine 170. The virtual machine 170 is a virtual machine that operates on the server 100c. The virtual machine 170 includes a storage unit 171, an OS kernel 172, an application 173, and a scheduler 174.

記憶部171は、RAM1m,2mまたはHDD103において、仮想マシン170用に確保された記憶領域として実現される。OSカーネル172、アプリケーション173およびスケジューラ174は、RAM1m,2mに格納されたプログラムを、仮想マシン170に割り当てられた仮想CPUが実行することで実現される。   The storage unit 171 is realized as a storage area reserved for the virtual machine 170 in the RAMs 1 m and 2 m or the HDD 103. The OS kernel 172, the application 173, and the scheduler 174 are realized by the virtual CPU assigned to the virtual machine 170 executing the programs stored in the RAMs 1m and 2m.

記憶部171は、プロセステーブル171aおよび変換テーブル171bを有する。プロセステーブル171aは、第4の実施の形態のプロセステーブル112に相当する。変換テーブル171bは、第4の実施の形態の変換テーブル113に相当する。ただし、プロセステーブル171aおよび変換テーブル171bに登録されるCPU番号は、仮想CPUのCPU番号である。   The storage unit 171 includes a process table 171a and a conversion table 171b. The process table 171a corresponds to the process table 112 of the fourth embodiment. The conversion table 171b corresponds to the conversion table 113 of the fourth embodiment. However, the CPU number registered in the process table 171a and the conversion table 171b is the CPU number of the virtual CPU.

OSカーネル172は、仮想マシン170のOSのカーネルである。OSカーネル172は、仮想マシン170上で実行されるアプリケーション173に対して仮想CPUを割り当てる。OSカーネル172は、記憶部171に記憶された変換テーブル171bに基づいて、アプリケーション173に対する仮想CPUの割り当てを変更する。   The OS kernel 172 is an OS kernel of the virtual machine 170. The OS kernel 172 assigns a virtual CPU to the application 173 executed on the virtual machine 170. The OS kernel 172 changes the allocation of the virtual CPU to the application 173 based on the conversion table 171b stored in the storage unit 171.

アプリケーション173は、ユーザの業務に関する処理を行うソフトウェアである。アプリケーション173は、アプリケーション140と同様に、実行に用いるCPU番号が予め定義されている。   The application 173 is software that performs processing related to the user's business. As with the application 140, the application 173 has a predefined CPU number used for execution.

スケジューラ174は、アプリケーション173のプロセスに対して、CPU番号の再設定を行う。例えば、スケジューラ174は、各仮想CPUのノード上の配置および各仮想CPUの利用状況に基づいて、アプリケーション140に割り当てるCPUのCPU番号を決定する。ここで、例えば、スケジューラ174は、共通のノードに属する複数のCPUに対応する複数の仮想CPUを同一のノードに属する仮想CPUとして扱うことができる。スケジューラ174は、決定したCPU番号を、プロセスIDおよび変換元CPU番号(アプリケーション173により指定されたCPU番号)に対応付けて、変換テーブル171bに登録する。   The scheduler 174 resets the CPU number for the process of the application 173. For example, the scheduler 174 determines the CPU number of the CPU assigned to the application 140 based on the placement of each virtual CPU on the node and the usage status of each virtual CPU. Here, for example, the scheduler 174 can treat a plurality of virtual CPUs corresponding to a plurality of CPUs belonging to a common node as virtual CPUs belonging to the same node. The scheduler 174 registers the determined CPU number in the conversion table 171b in association with the process ID and the conversion source CPU number (the CPU number specified by the application 173).

また、スケジューラ174は、仮想CPUの構成情報、各アプリケーションの現在の仮想CPU割り当て状況、および、仮想マシン170における仮想CPUおよびRAMの負荷に関する情報を収集し、記憶部171、または、他の記憶部に格納する。ここで、仮想CPUの構成情報は、どの仮想CPUがどのノードに属しているかを示す情報である。   Also, the scheduler 174 collects information on the virtual CPU configuration information, the current virtual CPU allocation status of each application, and the load on the virtual CPU and RAM in the virtual machine 170, and the storage unit 171 or other storage unit To store. Here, the virtual CPU configuration information is information indicating which virtual CPU belongs to which node.

ここで、スケジューラ174は、第4の実施の形態で例示したスケジューラ160と同様の方法で、アプリケーション173に割り当てる仮想CPUのCPU番号を決定することができる。例えば、スケジューラ160が実行する手順(図15および図11,図12に相当)において説明した「CPU」(物理CPU)を、仮想マシン170に割り当てられた「仮想CPU」と読み替えることができる。そして、スケジューラ160と同様の手順を、スケジューラ174により実行する。   Here, the scheduler 174 can determine the CPU number of the virtual CPU assigned to the application 173 by the same method as the scheduler 160 exemplified in the fourth embodiment. For example, “CPU” (physical CPU) described in the procedure executed by the scheduler 160 (corresponding to FIGS. 15, 11, and 12) can be read as “virtual CPU” assigned to the virtual machine 170. Then, the scheduler 174 executes the same procedure as that of the scheduler 160.

図17は、第5の実施の形態のCPU番号の変換例を示す図である。まず、アプリ指定のCPU番号が存在しない場合を考える(図17(A))。例えば、仮想マシン170に対する仮想CPU群P11は、8つの仮想CPUを含むとする。各仮想CPUのCPU番号は“0”〜“7”である。このとき、アプリケーション173が、CPU番号“8,9,10,11”を指定して起動したとする。ところが、仮想CPU群P11には、CPU番号“8,9,10,11”の仮想CPUは含まれていない。   FIG. 17 is a diagram illustrating an example of CPU number conversion according to the fifth embodiment. First, consider a case where there is no application-specified CPU number (FIG. 17A). For example, it is assumed that the virtual CPU group P11 for the virtual machine 170 includes eight virtual CPUs. The CPU number of each virtual CPU is “0” to “7”. At this time, it is assumed that the application 173 is activated by specifying the CPU number “8, 9, 10, 11”. However, the virtual CPU group P11 does not include the virtual CPUs with the CPU numbers “8, 9, 10, 11”.

そこで、スケジューラ174は、アプリケーション173のプロセスIDに対して、変換元CPU番号“8,9,10,11”および変換先CPU番号“0,1,2,3”を変換テーブル171bに登録する。OSカーネル172は、変換テーブル171bに基づいて、アプリケーション173に対してCPU番号“0,1,2,3”に対応する仮想CPUを割り当てることができる。   Therefore, the scheduler 174 registers the conversion source CPU number “8, 9, 10, 11” and the conversion destination CPU number “0, 1, 2, 3” in the conversion table 171b for the process ID of the application 173. The OS kernel 172 can assign a virtual CPU corresponding to the CPU number “0, 1, 2, 3” to the application 173 based on the conversion table 171b.

次に、アプリ指定のCPU番号が競合する場合を考える(図17(B))。例えば、仮想マシン170上で、アプリケーション173a,173bが実行されている。
アプリケーション173aは、CPU番号“0,1”を指定して動作するよう予め定義されている。また、アプリケーション173bも、CPU番号“0,1”を指定して動作するよう予め定義されている。すなわち、アプリケーション173a,173bが指定するCPU番号は何れも“0,1”で競合している。
Next, consider a case in which the application-specified CPU numbers conflict (FIG. 17B). For example, applications 173 a and 173 b are executed on the virtual machine 170.
The application 173a is defined in advance to operate by designating the CPU number “0, 1”. The application 173b is also defined in advance to operate by specifying the CPU number “0, 1”. That is, the CPU numbers designated by the applications 173a and 173b are both “0, 1” and conflict.

この場合、スケジューラ174は、例えば、アプリケーション173aから要求されたCPU番号“0,1”をそのままOSカーネル172に通知する。OSカーネル172は、スケジューラ174からの通知に応じて、仮想CPU群P11に含まれる仮想CPUのうち、CPU番号“0,1”の仮想CPUを、アプリケーション173aに割り当てる。   In this case, for example, the scheduler 174 notifies the OS kernel 172 of the CPU number “0, 1” requested from the application 173a. In response to the notification from the scheduler 174, the OS kernel 172 assigns the virtual CPU having the CPU number “0, 1” among the virtual CPUs included in the virtual CPU group P11 to the application 173a.

一方、スケジューラ174は、例えば、アプリケーション173bから要求されたCPU番号“0,1”を、空いているCPU番号“2,3”に変換するようOSカーネル172に通知する。具体的には、スケジューラ174は、アプリケーション173bのプロセスIDと、変換元CPU番号“0,1”と、変換先CPU番号“2,3”との対応関係を、変換テーブル171bに登録する。OSカーネル172は、変換テーブル171bに基づいて、アプリケーション173bに対してCPU番号“2,3”に対応する仮想CPUを割り当てることができる。   On the other hand, for example, the scheduler 174 notifies the OS kernel 172 to convert the CPU number “0, 1” requested by the application 173b into an available CPU number “2, 3”. Specifically, the scheduler 174 registers the correspondence relationship between the process ID of the application 173b, the conversion source CPU number “0, 1”, and the conversion destination CPU number “2, 3” in the conversion table 171b. Based on the conversion table 171b, the OS kernel 172 can assign a virtual CPU corresponding to the CPU number “2, 3” to the application 173b.

図18は、仮想マシンにおけるCPU番号の割り当ての比較例を示す図である。図18では、スケジューラ174の機能を有していないサーバ400上の仮想マシン410を例示して、CPU番号の割り当ての比較例を説明する。サーバ400は、仮想マシン410に割り当てる仮想CPU群P21を有する。仮想CPU群P21には8つの仮想CPUが属しており、8つの仮想CPUのCPU番号は“0”〜“7”である。   FIG. 18 is a diagram illustrating a comparative example of CPU number assignment in a virtual machine. In FIG. 18, a virtual machine 410 on the server 400 that does not have the function of the scheduler 174 is illustrated and a comparative example of CPU number assignment will be described. The server 400 includes a virtual CPU group P21 assigned to the virtual machine 410. Eight virtual CPUs belong to the virtual CPU group P21, and the CPU numbers of the eight virtual CPUs are “0” to “7”.

図18(A)は、アプリケーションにより要求されるCPU番号に対応する仮想CPUが仮想CPU群P21に含まれていない場合を例示している。例えば、アプリケーションはCPU番号“8”〜“11”を要求する。しかし、仮想CPU群P21は、CPU番号“8”〜“11”に対応する仮想CPUを含まない。仮想マシン410は、仮想CPUのCPU番号を変換する機能を有していない。したがって、OSカーネルは、当該アプリケーションに対して、要求されたCPU番号に対応する仮想CPUを適切に割り当てることができない。すなわち、要求されるCPU番号と提供するCPU番号とが不整合となり、アプリケーションの動作に影響が及ぶおそれがある。   FIG. 18A illustrates a case where a virtual CPU corresponding to a CPU number requested by an application is not included in the virtual CPU group P21. For example, the application requests CPU numbers “8” to “11”. However, the virtual CPU group P21 does not include virtual CPUs corresponding to the CPU numbers “8” to “11”. The virtual machine 410 does not have a function of converting the CPU number of the virtual CPU. Therefore, the OS kernel cannot appropriately assign a virtual CPU corresponding to the requested CPU number to the application. That is, the requested CPU number and the provided CPU number become inconsistent, which may affect the operation of the application.

図18(B)は、2つのアプリケーションにより要求されるCPU番号が競合する場合を例示している。例えば、仮想マシン410で動作する2つのアプリケーションは、何れも、CPU番号“0,1”を要求する。仮想マシン410は、仮想CPUのCPU番号を変換する機能を有していない。したがって、OSカーネルは、2つのアプリケーションに対して、要求されたCPU番号に対応する仮想CPUを割り当てる。しかし、この場合、CPU番号“0,1”の仮想CPUが両アプリケーションに重複して割り当てられることになる。このため、当該仮想CPUの負荷が増大して、両アプリケーションの動作に影響が及ぶおそれがある。   FIG. 18B illustrates a case where CPU numbers requested by two applications conflict. For example, two applications running on the virtual machine 410 both request the CPU number “0, 1”. The virtual machine 410 does not have a function of converting the CPU number of the virtual CPU. Therefore, the OS kernel allocates a virtual CPU corresponding to the requested CPU number to the two applications. However, in this case, the virtual CPU with the CPU number “0, 1” is assigned to both applications in duplicate. For this reason, there is a possibility that the load on the virtual CPU increases and affects the operations of both applications.

一方、図17で例示したように、サーバ100cでは、スケジューラ174によりアプリケーションから要求されるCPU番号の変換テーブル171bを作成し、OSカーネル172により変換テーブル171bを基にCPU番号の変換を行う。このため、OSカーネル172は、仮想マシン170が有していないCPU番号に対応する仮想CPUをアプリケーションに提供することができる。また、OSカーネル172は、仮想CPUの負荷が偏らないように、複数のアプリケーションに対して仮想CPUを割り当てることができる。これにより、各アプリケーションを適切に動作させることができる。更に、ユーザに対してアプリケーションの変更作業を強いずに済み、ユーザの作業の負担を軽減できる。   On the other hand, as illustrated in FIG. 17, in the server 100c, the scheduler 174 creates a CPU number conversion table 171b requested from the application, and the OS kernel 172 converts the CPU number based on the conversion table 171b. Therefore, the OS kernel 172 can provide a virtual CPU corresponding to a CPU number that the virtual machine 170 does not have to the application. The OS kernel 172 can assign virtual CPUs to a plurality of applications so that the load on the virtual CPUs is not biased. Thereby, each application can be operated appropriately. Furthermore, it is not necessary to force the user to change the application, and the burden on the user can be reduced.

なお、前述の第2の実施の形態の手法は、第3〜第5の実施の形態と組み合わせて利用されてもよい。例えば、サーバ100に、スケジューラ150またはスケジューラ160の機能を追加してもよい。そうすると、サーバ100は、アプリ起動時の最初の段階では、変換テーブル111に基づいてアプリケーション140に対する割り当てを行う。そして、サーバ100は、その後の運用に応じて、スケジューラ150またはスケジューラ160の機能により、アプリケーション140に割り当てるCPUのCPU番号を変更することもできる。   Note that the technique of the second embodiment described above may be used in combination with the third to fifth embodiments. For example, the function of the scheduler 150 or the scheduler 160 may be added to the server 100. Then, the server 100 performs allocation to the application 140 based on the conversion table 111 at the initial stage when the application is activated. The server 100 can also change the CPU number of the CPU assigned to the application 140 by the function of the scheduler 150 or scheduler 160 according to the subsequent operation.

また、第1の実施の形態の情報処理は、演算部1bにプログラムを実行させることで実現できる。また、第2〜第5の実施の形態の情報処理は、サーバ100,100a,100b,100cが備えるCPUにプログラムを実行させることで実現できる。プログラムは、コンピュータ読み取り可能な記録媒体23に記録できる。   The information processing according to the first embodiment can be realized by causing the computing unit 1b to execute a program. In addition, the information processing of the second to fifth embodiments can be realized by causing a CPU included in the servers 100, 100a, 100b, and 100c to execute a program. The program can be recorded on a computer-readable recording medium 23.

例えば、プログラムを記録した記録媒体23を配布することで、プログラムを流通させることができる。また、プログラムを他のコンピュータに格納しておき、ネットワーク経由でプログラムを配布してもよい。コンピュータは、例えば、記録媒体23に記録されたプログラムまたは他のコンピュータから受信したプログラムを、RAM1m,2mやHDD102などの記憶装置に格納し(インストールし)、当該記憶装置からプログラムを読み込んで実行してもよい。   For example, the program can be distributed by distributing the recording medium 23 on which the program is recorded. Alternatively, the program may be stored in another computer and distributed via a network. For example, the computer stores (installs) a program recorded in the recording medium 23 or a program received from another computer in a storage device such as the RAM 1m, 2m or the HDD 102, and reads and executes the program from the storage device. May be.

10 情報処理装置
11,12 ノード
11a,11b,11c,11d,12a,12b,12c,12d プロセッサ
11e,12e メモリ
15 OS
16 変換部
17 アプリケーション
D1 設定情報
D2 変換情報
10 Information processing device 11, 12 Node 11a, 11b, 11c, 11d, 12a, 12b, 12c, 12d Processor 11e, 12e Memory 15 OS
16 Conversion unit 17 Application D1 Setting information D2 Conversion information

Claims (7)

複数のプロセッサを有するコンピュータに、
第1のプロセッサの第1の識別情報を含む設定情報をアプリケーションから取得し、前記複数のプロセッサの配置および前記複数のプロセッサの利用状況に基づいて、前記アプリケーションに割り当てる第2のプロセッサの第2の識別情報を決定し、
前記第1の識別情報と前記第2の識別情報とを対応付けた変換情報を前記コンピュータのオペレーティングシステムに通知する、
処理を実行させる変換プログラム。
In a computer having a plurality of processors,
A setting information including the first identification information of the first processor is obtained from the application, and the second of the second processors to be assigned to the application based on the arrangement of the plurality of processors and the usage status of the plurality of processors Determine the identity,
Notifying the operating system of the computer of conversion information in which the first identification information and the second identification information are associated with each other;
Conversion program that executes processing.
前記第2の識別情報の決定では、同一のNUMA(Non-Uniform Memory Access)ノードに属する前記第2のプロセッサを複数選択する、請求項1記載の変換プログラム。   The conversion program according to claim 1, wherein in determining the second identification information, a plurality of the second processors belonging to the same NUMA (Non-Uniform Memory Access) node are selected. 前記第2の識別情報の決定では、前記コンピュータが有する複数のNUMAノードのノード単位の負荷に応じて、前記第2のプロセッサの選択に用いる前記NUMAノードを選択する、請求項2記載の変換プログラム。   3. The conversion program according to claim 2, wherein in the determination of the second identification information, the NUMA node used for selection of the second processor is selected in accordance with a load in units of a plurality of NUMA nodes included in the computer. . 前記第2の識別情報の決定では、前記NUMAノードに属するプロセッサのうち、負荷の低い方から順に、前記設定情報により指定される前記第1のプロセッサの数だけ、前記第2のプロセッサを選択する、請求項2または3記載の変換プログラム。   In the determination of the second identification information, among the processors belonging to the NUMA node, the second processors are selected by the number of the first processors specified by the setting information in order from the lowest load. The conversion program according to claim 2 or 3. 前記変換情報の通知では、前記アプリケーションのプロセスの識別情報を前記変換情報に含める、請求項1乃至4の何れか1項に記載の変換プログラム。   5. The conversion program according to claim 1, wherein in the conversion information notification, identification information of the process of the application is included in the conversion information. 複数のプロセッサを有するコンピュータに、
アプリケーションの設定情報に含まれる第1のプロセッサの第1の識別情報と前記アプリケーションに割り当てる第2のプロセッサの第2の識別情報とを対応付けた変換情報を取得し、
前記変換情報に基づいて、前記第1の識別情報に代えて、前記第2の識別情報に対応する前記第2のプロセッサを前記アプリケーションに割り当てる、
処理を実行させる変換プログラム。
In a computer having a plurality of processors,
Obtaining conversion information in which the first identification information of the first processor included in the setting information of the application is associated with the second identification information of the second processor assigned to the application;
Based on the conversion information, instead of the first identification information, the second processor corresponding to the second identification information is allocated to the application.
Conversion program that executes processing.
複数のプロセッサを有するコンピュータが、
第1のプロセッサの第1の識別情報を含む設定情報をアプリケーションから取得し、前記複数のプロセッサの配置および前記複数のプロセッサの利用状況に基づいて、前記アプリケーションに割り当てる第2のプロセッサの第2の識別情報を決定し、
前記第1の識別情報と前記第2の識別情報とを対応付けた変換情報を前記コンピュータのオペレーティングシステムに通知し、
前記オペレーティングシステムにより、前記変換情報に基づいて、前記第1の識別情報に代えて、前記第2の識別情報に対応する前記第2のプロセッサを前記アプリケーションに割り当てる、
変換方法。
A computer having a plurality of processors
A setting information including the first identification information of the first processor is obtained from the application, and the second of the second processors to be assigned to the application based on the arrangement of the plurality of processors and the usage status of the plurality of processors Determine the identity,
Notifying the operating system of the computer of conversion information that associates the first identification information with the second identification information;
The operating system assigns the second processor corresponding to the second identification information to the application instead of the first identification information based on the conversion information.
Conversion method.
JP2016159801A 2016-08-17 2016-08-17 Conversion program and conversion method Pending JP2018028769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016159801A JP2018028769A (en) 2016-08-17 2016-08-17 Conversion program and conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016159801A JP2018028769A (en) 2016-08-17 2016-08-17 Conversion program and conversion method

Publications (1)

Publication Number Publication Date
JP2018028769A true JP2018028769A (en) 2018-02-22

Family

ID=61249121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016159801A Pending JP2018028769A (en) 2016-08-17 2016-08-17 Conversion program and conversion method

Country Status (1)

Country Link
JP (1) JP2018028769A (en)

Similar Documents

Publication Publication Date Title
US20200401437A1 (en) Methods and apparatus to manage virtual machines
US10404614B2 (en) Multi-cloud resource allocation
US10942760B2 (en) Predictive rightsizing for virtual machines in cloud computing systems
US10977086B2 (en) Workload placement and balancing within a containerized infrastructure
JP5577412B2 (en) Computer system, migration method and management server
JP4980792B2 (en) Virtual machine performance monitoring method and apparatus using the method
JP5400482B2 (en) Management computer, resource management method, resource management program, recording medium, and information processing system
US9397953B2 (en) Operation managing method for computer system, computer system and computer-readable storage medium having program thereon
KR102419704B1 (en) Security protection methods and devices
JPWO2018002991A1 (en) Control device, VNF placement destination selection method, and program
JP2021048513A (en) Information processing device, information processing method, and virtual machine connection management program
JP2016170669A (en) Load distribution function deployment method, load distribution function deployment device, and load distribution function deployment program
JPWO2017183565A1 (en) Network system, patch file application method, and program
JPWO2014147802A1 (en) Information processing apparatus, resource allocation method, and program
JP2019061359A (en) Program and information processing device
CN107528871B (en) Data analysis in storage systems
JP2011192049A (en) Virtual machine system, automatic migration method, and automatic migration program
JP5597293B2 (en) Computer system and program
JP6666553B2 (en) Information processing apparatus, job management method, and job management program
CN112631994A (en) Data migration method and system
US10097431B1 (en) Routing to tenant services utilizing a service directory
WO2015161804A1 (en) Cache partitioning method and device
JP2018028769A (en) Conversion program and conversion method
KR102014246B1 (en) Mesos process apparatus for unified management of resource and method for the same
JP2012181673A (en) Resource allocation device, resource allocation method, and program