JP6252140B2 - Task allocation program and task allocation method - Google Patents
Task allocation program and task allocation method Download PDFInfo
- Publication number
- JP6252140B2 JP6252140B2 JP2013248325A JP2013248325A JP6252140B2 JP 6252140 B2 JP6252140 B2 JP 6252140B2 JP 2013248325 A JP2013248325 A JP 2013248325A JP 2013248325 A JP2013248325 A JP 2013248325A JP 6252140 B2 JP6252140 B2 JP 6252140B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- memory access
- socket
- information
- access rate
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/45—Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/45—Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
- G06F8/456—Parallelism detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/445—Exploiting fine grain parallelism, i.e. parallelism at instruction level
- G06F8/4452—Software pipelining
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Description
本願は、タスク割り付けプログラム及びタスク割り付け方法に関する。 The present application relates to a task allocation program and a task allocation method.
従来、プロセッサへのソケットやコアの割り付けは、各処理を実行するアプリケーションに対応するプログラムにおいて、最大でも構文のループ単位やサブルーチン単位でのみ指定が可能である。したがって、それ以上の(それより粒度の小さい)構文については、アプリケーション側で指定することができず、Operating System(OS)のレベルで決められてしまうため、処理効率や処理性能の向上にも限界があった。 Conventionally, the assignment of sockets and cores to processors can be specified only in units of syntax loops or subroutines at the maximum in a program corresponding to an application that executes each process. Therefore, more syntax (smaller than that) cannot be specified on the application side, and is determined at the level of the Operating System (OS), which limits the improvement in processing efficiency and processing performance. was there.
例えば、High Performance Computing(HPC)用プロセッサ等に用いられるスレッド並列アプリケーションの構文であるOpenMP(登録商標)には、タスクの概念が導入されている。OpenMPは、アプリケーション側で複数のソケットやコアを選択することが可能となっている。 For example, the concept of a task is introduced in OpenMP (registered trademark) which is a syntax of a thread parallel application used for a processor for High Performance Computing (HPC) or the like. In OpenMP, a plurality of sockets and cores can be selected on the application side.
上述したように、タスクの概念が導入されたことで、アプリケーションプログラムでは、アプリケーション内部の情報を用いて構文それぞれのソケットやコアの割り付けを行うことができ、処理効率や処理性能の向上が可能となる。 As described above, the introduction of the concept of tasks enables application programs to allocate sockets and cores for each syntax using information inside the application, thereby improving processing efficiency and processing performance. Become.
しかしながら、従来の単純な先入れ先出し方式やラウンドロビン方式等のアルゴリズムの場合は、タスクそれぞれのメモリアクセスについての考慮がなされていない等の影響により、処理効率や処理性能の向上に限界があった。 However, in the case of a conventional algorithm such as a simple first-in first-out method or a round robin method, there is a limit to improvement in processing efficiency and processing performance due to the effect that the memory access of each task is not considered.
1つの側面では、本発明は、処理効率や処理性能の向上を図ることを目的とする。 In one aspect, an object of the present invention is to improve processing efficiency and processing performance.
一態様におけるタスク割り付けプログラムは、アプリケーションの実行により得られるハードウェアモニタ情報からタスク毎の、タスクの親子関係の有無を示す情報と、メモリアクセス率と、を含むタスク別プロファイル情報を生成し、前記タスク別プロファイル情報に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行って、前記タスクを実行した結果に基づき、前記タスク別プロファイル情報を更新し、更新された前記タスク別プロファイル情報に基づき、次のタスク指示により実行されるタスクの構文単位で、プロセッサのソケット又はコアへの割り付ける、処理をコンピュータに実行させる。 The task allocation program in one aspect generates task-specific profile information including information indicating the presence / absence of a parent-child relationship between tasks and a memory access rate for each task from hardware monitor information obtained by executing an application, Based on the task-specific profile information, in response to a task instruction from the application, the task is assigned to a processor socket or core in the syntax unit of the task in the program that executes the application, and the task is executed. The task-specific profile information is updated based on the updated task-specific profile information, and the processing is executed on the computer, which is assigned to the processor socket or core in the syntax unit of the task executed by the next task instruction based on the updated task-specific profile information. Let
処理効率や処理性能の向上を図ることができる。 Processing efficiency and processing performance can be improved.
以下、添付図面を参照しながら実施例について詳細に説明する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
<情報処理装置の機能構成例>
図1は、情報処理装置の機能構成例を示す図である。図1に示す情報処理装置10は、例えば所定のアプリケーションに対応させて、プロセッサのソケットやコア等にタスクを割り付けて並列処理を実行する。図1の例に示す情報処理装置10は、入力手段11と、出力手段12と、記憶手段13と、割り付け手段14と、処理実行手段15と、プロファイル情報測定手段16と、算出手段17と、更新手段18と、通信手段19と、制御手段20とを有する。
<Functional configuration example of information processing apparatus>
FIG. 1 is a diagram illustrating a functional configuration example of the information processing apparatus. The
入力手段11は、ユーザ等から各種指示の開始や終了、設定の入力等の各種入力を受け付ける。例えば、入力手段11は、本実施形態におけるタスクのソケットやコアへの割り付け指示、処理実行指示、プロファイル情報測定指示、算出指示、更新指示、通信指示等の各指示を受け付ける。入力手段11は、例えばキーボードやマウス等でもよく、また画面を用いたタッチパネル形式等でもよく、マイクロフォン等でもよいが、これに限定されるものではない。
The
出力手段12は、入力手段11により入力された内容や、入力内容に基づいて実行された内容等の出力を行う。例えば、出力手段12は、画面表示により出力する場合には、ディスプレイやモニタ等の表示手段でもよく、また音声により出力する場合には、スピーカ等の音声出力手段でもよいが、これに限定されるものではない。
The
記憶手段13は、本実施形態において必要となる各種情報を記憶する。例えば、記憶手段13は、入力手段11から得られる各指示情報や、各種アプリケーションに対応して設定された1又は複数のタスク、タスクのソケットやコアへの割り付け内容、ハードウェアモニタ情報、プロファイル情報等を記憶する。記憶手段13に記憶される情報は、上述した情報に限定されるものではない。
The
記憶手段13は、記憶された各種情報を必要に応じて所定のタイミングで読み出したり、書き込んだりする。記憶手段13は、例えばハードディスクやメモリ等であるが、これに限定されるものではない。記憶手段13は、通信手段19を介してデータの送受信可能な状態で接続される記憶装置(ディスク装置)として設けられていてもよい。
The
割り付け手段14は、過去のプロファイル情報からタスク別のメモリアクセス等の度合い(メモリアクセス率)を取得し、タスクを割り付けるソケットやコア等をタスク単位で割り付ける。なお、タスクとは、例えばOpenMPを用いたアプリケーションプログラム(ソースコード)のtask(タスク)構文等で囲まれたブロック等である。したがって、タスク単位とは、例えばタスク構文単位に相当するが、これに限定されるものではない。
The
例えば、割り付け手段14は、例えばメモリアクセス率に基づき、アプリケーションからのタスク指示に対して、アプリケーションを実行するプログラムにおけるタスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行う。また、割り付け手段14は、更新手段18により更新されたプロファイル情報に基づいてタスク割り付けを行うこともできる。タスクの割り付けは、プロファイル情報が更新されるタイミング(例えば、ループ単位やサブルーチン単位の実行終了等)で行うことができるが、これに限定されるものではなく、例えばアプリケーション単位の実行タイミングでもよい。
For example, the allocating
処理実行手段15は、割り付け手段14によりプロセッサが有するコアやソケットに割り付けたタスクの処理(並列処理等)を実行する。処理実行手段15は、例えばOpenMP Application Program Interface(API) Version3.0で規定されたタスク構文を用いてプログラミングされたアプリケーションに対応する実行可能ファイル等を実行することで、その内部のタスク処理を実行させる。
The processing execution means 15 executes processing (parallel processing or the like) of tasks assigned by the assignment means 14 to the core or socket of the processor. The
プロファイル情報測定手段16は、処理実行手段15による処理の実行により得られるハードウェアモニタ情報を用いてタスク別プロファイル情報を測定する。ハードウェアモニタ情報とは、例えばアプリケーション実行中におけるハードウェアの動作状況をモニタリングした情報である。ハードウェアモニタ情報は、タスク単位やループ単位、サブルーチン単位、アプリケーション単位等の情報を出力することができるが、これに限定されるものではない。
The profile
ハードウェアモニタ情報の測定情報としては、例えば「経過時間」、「Million Floating−point Operations Per Second(MFLOPS)」、「MFLOPSピーク性能比」、「Million Instructions Per Second(MIPS)」、「MIPSピーク性能比」、「メモリアクセススループット(チップ単位)」、「メモリアクセススループットピーク性能比(チップ単位)」、「Single Instruction Multiple Data(SIMD)命令率」等があるが、これに限定されるものではない。例えば、ハードウェアモニタ情報として、メモリアクセス待ち時間やキャッシュミス情報等を有していてもよい。 The measurement information of the hardware monitor information includes, for example, “elapsed time”, “Million Floating-point Operations Per Second (MFLOPS)”, “MFLOPS Peak Performance Ratio”, “Million Instructions Per Second (MIPS)”, “MIPS Peak Performance”. Ratio ”,“ memory access throughput (chip unit) ”,“ memory access throughput peak performance ratio (chip unit) ”,“ single instruction multiple data (SIMD) instruction rate ”, etc., but are not limited thereto. . For example, the hardware monitor information may include memory access waiting time, cache miss information, and the like.
「経過時間」とは、例えば経過時間測定範囲におけるタスク等の命令実行に要した時間である。「MFLOPS」は、例えば浮動小数点演算実行効率(1秒間の平均浮動小数点演算実行数)である。「MFLOPSピーク性能比」は、例えばMFLOPSの論理ピーク値に対する実測値の比率である。「MIPS」は、命令実行効率(1秒間の平均命令実行数)である。「MIPSピーク性能比」は、例えばMIPSの論理ピーク値に対する実測値の比率である。 “Elapsed time” is, for example, the time required to execute an instruction such as a task in the elapsed time measurement range. “MFLOPS” is, for example, the floating-point arithmetic execution efficiency (the average number of floating-point arithmetic executions per second). The “MFLOPS peak performance ratio” is, for example, a ratio of an actual measurement value to a logical peak value of MFLOPS. “MIPS” is instruction execution efficiency (average number of instruction executions per second). The “MIPS peak performance ratio” is, for example, a ratio of an actual measurement value to a logical peak value of MIPS.
「メモリアクセススループット(チップ単位)」は、メモリ、Central Processing Unit(CPU)チップ間における1秒あたりの平均データ転送量である。また、「メモリアクセススループットピーク性能比(チップ単位)」は、メモリアクセススループット(チップ単位)の論理ピーク値に対する実測値の比率である。 “Memory access throughput (chip unit)” is an average data transfer amount per second between a memory and a central processing unit (CPU) chip. The “memory access throughput peak performance ratio (chip unit)” is the ratio of the actually measured value to the logical peak value of the memory access throughput (chip unit).
また、「SIMD命令率」は、例えば命令実行数に占めるSIMD命令数の割合である。SIMD命令とは、例えば1命令で複数のオペランドを処理する命令である。 The “SIMD instruction rate” is, for example, the ratio of the number of SIMD instructions to the number of instruction executions. The SIMD instruction is an instruction that processes a plurality of operands with one instruction, for example.
なお、ハードウェアモニタ情報は、プログラムの実行性能を確認することができ、例えばMIPS値及びMFLOPS値がそれぞれのピーク値に近いほど、実行性能及び演算性能が高いプログラムであることを示す。 The hardware monitor information can confirm the execution performance of the program. For example, the closer the MIPS value and the MFLOPS value are to the respective peak values, the higher the execution performance and the calculation performance are.
算出手段17は、上述したハードウェアモニタ情報等から、タスクそれぞれのメモリアクセス率を算出する。算出手段17における算出手法の具体例については、後述する。 The calculation means 17 calculates the memory access rate of each task from the hardware monitor information described above. A specific example of the calculation method in the calculation means 17 will be described later.
更新手段18は、算出手段17により算出したメモリアクセス率等に基づいてタスク別プロファイル情報を更新する。これにより、割り付け手段14は、実行途中のその場でのタスクのメモリアクセス率等の履歴からタスクを割り付けるソケットやコアを適切に割り付けることができる。
The
通信手段19は、例えばインターネットやLocal Area Network(LAN)等に代表される通信ネットワークを介して外部装置と各種情報の送受信を行う。通信手段19は、外部装置等にすでに記憶されている各種情報等を受信することができ、また情報処理装置10で処理された結果を、通信ネットワーク等を介して外部装置等に送信することもできる。
The
制御手段20は、情報処理装置10の各構成全体の制御を行う。具体的には、制御手段20は、例えばユーザ等による入力手段11からの指示等に基づいて、タスク割り付け処理に関する各制御を行う。ここで、各制御とは、例えば上述した割り付け手段14によりタスクにソケットやコアを割り付ける、処理実行手段15によりタスク処理等を実行させる、プロファイル情報測定手段16によりプロファイル情報を測定させる、算出手段17によりメモリアクセス率を算出させる、更新手段18によりタスク別プロファイル情報を更新させる等があるが、これらに限定されるものではない。なお、上述した割り付け手段14、処理実行手段15、プロファイル情報測定手段16、算出手段17、及び更新手段18における各処理は、例えば予め設定された少なくとも1つのアプリケーション(プログラム)を実行することで実現することができる。
The
本実施形態では、上述した情報処理装置10により、例えばタスクの割り付けにおいて、実行時のプロファイル情報を使って、タスクの割り付け先をリアルタイムに制御することができる。したがって、HPC用プロセッサ等を用いた並列処理において、処理効率や処理性能の向上を図ることができる。
In the present embodiment, the
情報処理装置10は、例えばPersonal Computer(PC)やサーバ等からなるが、これに限定されるものではなく、HPC用プロセッサ等のマルチプロセッサを有する計算機等に適用することができる。
The
<情報処理装置10のハードウェア構成例>
図2は、情報処理装置のハードウェア構成例を示す図である。図2に示す情報処理装置10は、入力装置31と、出力装置32と、ドライブ装置33と、補助記憶装置34と、主記憶装置35と、各種制御を行うCPU36と、ネットワーク接続装置37とを有し、これらはシステムバスBで相互に接続されている。
<Hardware Configuration Example of
FIG. 2 is a diagram illustrating a hardware configuration example of the information processing apparatus. The
入力装置31は、ユーザ等が操作するキーボード及びマウス等のポインティングデバイスや、マイクロフォン等の音声入力デバイスを有しており、ユーザ等からのプログラムの実行指示、各種操作情報、ソフトウェア等を起動するための情報等の入力を受け付ける。
The
出力装置32は、本実施形態における処理を行うためのコンピュータ本体(情報処理装置10)を操作するのに必要な各種ウィンドウやデータ等を表示するディスプレイ等を有する。出力装置32は、CPU36が有する制御プログラムによりプログラムの実行経過や結果等を表示することができる。
The
ここで、本実施形態において、例えばコンピュータ本体にインストールされる実行プログラムは、記録媒体38等により提供される。記録媒体38は、ドライブ装置33にセット可能である。CPU36からの制御信号に基づき、記録媒体38に格納された実行プログラムが、記録媒体38からドライブ装置33を介して補助記憶装置34にインストールされる。
Here, in the present embodiment, for example, an execution program installed in the computer main body is provided by the
補助記憶装置34は、例えばHard Disk Drive(HDD)やSolid State Drive(SSD)等のストレージ手段等である。補助記憶装置34は、CPU36からの制御信号に基づき、本実施形態における実行プログラム(タスク割り付けプログラム)や、コンピュータに設けられた制御プログラム等を記憶し、必要に応じて入出力を行う。補助記憶装置34は、CPU36からの制御信号等に基づいて、記憶された各情報から必要な情報を読み出したり、書き込むことができる。
The
主記憶装置35は、CPU36により補助記憶装置34から読み出された実行プログラム等を格納する。主記憶装置35は、Read Only Memory(ROM)やRandom Access Memory(RAM)等である。
The
CPU36は、OS等の制御プログラム、及び主記憶装置35に格納されている実行プログラムに基づいて、各種演算や各ハードウェア構成部とのデータの入出力等、コンピュータ全体の処理を制御して各処理を実現する。プログラムの実行中に必要な各種情報等は、補助記憶装置34から取得することができ、また実行結果等を格納することもできる。また、CPU36は、マルチプロセッサを有しており、アプリケーション等によるタスク指示を用いて、タスク構文単位でプロセッサへのソケットやコアを指定して並列処理を実行する。
Based on a control program such as an OS and an execution program stored in the
具体的には、CPU36は、例えば入力装置31から得られるプログラムの実行指示等に基づき、補助記憶装置34にインストールされたプログラムを実行させることにより、主記憶装置35上でプログラムに対応する処理を行う。例えば、CPU36は、タスク割り付けプログラムを実行させることで、上述した割り付け手段14によるソケット又はコアの割り付け、処理実行手段15による処理の実行、プロファイル情報測定手段16によるプロファイル情報の測定、算出手段17によるメモリアクセス率の算出、更新手段18によるプロファイル情報の更新等の処理を行う。なお、CPU36における処理内容は、これに限定されるものではない。CPU36により実行された内容は、必要に応じて補助記憶装置34に記憶される。
Specifically, the
ネットワーク接続装置37は、上述した通信ネットワークを介して、他の外部装置との通信を行う。ネットワーク接続装置37は、CPU36からの制御信号に基づき、通信ネットワーク等と接続することにより、実行プログラムやソフトウェア、設定情報等を外部装置等から取得する。また、ネットワーク接続装置37は、プログラムを実行することで得られた実行結果を外部装置に提供したり、本実施形態における実行プログラム自体を外部装置等に提供してもよい。
The
記録媒体38は、上述したように実行プログラム等が格納されたコンピュータで読み取り可能な記録媒体である。記録媒体38は、例えばフラッシュメモリ等の半導体メモリやCD−ROM、DVD等の可搬型の記録媒体であるが、これに限定されるものではない。
The
図2に示すハードウェア構成に実行プログラム(例えば、タスク割り付けプログラム等)をインストールすることで、ハードウェア資源とソフトウェアとが協働して本実施形態におけるタスク割り付け処理等を実現することができる。 By installing an execution program (for example, a task allocation program) in the hardware configuration shown in FIG. 2, the task allocation processing and the like in this embodiment can be realized in cooperation with hardware resources and software.
<本実施形態におけるCPU36の具体例>
次に、本実施形態におけるCPU36の具体例について説明する。図3は、CPUの具体例を示す図である。図3の例に示すCPU36は、マルチコアのプロセッサであり、1つのプロセッサ・パッケージ内に複数のコアを有する。例えば、CPU36は、メモリ41と、1又は複数のソケット42(図3の例では、2つのソケット#1,#2)とを有する。また、各ソケット42は、1又は複数のコア43(図3の例では、4つのコア#0〜#3)を含むパッケージである。ソケット数やコア数については、図3の例に限定されるものではない。CPU36は、図3に示すようなマルチコアプロセッサによる並列処理によって性能を向上させる。
<Specific Example of
Next, a specific example of the
メモリ41は、マイクロプロセッサの内部に設けられた高速な記憶装置(例えば、1次キャッシュ)である。メモリ41に使用頻度の高いデータを蓄積しておくことで、低速なメインメモリへのアクセスを減らすことができ、処理を高速化することができる。例えば、CPU36は、2段階のキャッシュメモリを搭載している場合、最初にデータを読みに行くのが、より高速でより容量の小さい1次キャッシュであり、1次キャッシュにデータがなかった場合は、より低速でより容量の大きな2次キャッシュに読みに行く。なお、メモリ41の1次キャッシュ及び2次キャッシュは、上述した主記憶装置35及び補助記憶装置34としてもよい。
The
ソケット42は、複数のコア43を格納する領域である。例えば親子関係にあるタスクの場合には、メモリ等のローカリティ(局所性)を保つため、同一ソケットにそれらのタスクを配置する。これにより、アクセスが1ソケット内に閉じることになるため、処理効率や処理性能が向上する。
The
コア43は、コンピュータの演算処理を行う部分である。本実施形態では、例えば1つのコア43に1つのタスクが構文単位で割り付けられる。
The
<情報処理装置10における処理の一例>
次に、本実施形態における情報処理装置10における処理(タスク割り付け処理)の一例について、フローチャートを用いて説明する。図4は、情報処理装置の処理の一例を示すフローチャートである。
<Example of Processing in
Next, an example of processing (task allocation processing) in the
図4の例において、情報処理装置10の割り付け手段14は、アプリケーションプログラムのタスク指示により実行するタスクのコアへの割り付けを行う(S01)。S01の処理において、割り付け手段14は、過去のタスク別プロファイル情報を用いてタスク毎のメモリアクセス等の度合いを取得し、その結果から各タスクを構文単位でコアへの割り付けを行う。なお、S01の処理では、例えば図3に示すように複数のソケットがある場合には、どのソケットを用いるかについての割り付けを行ってもよい。
In the example of FIG. 4, the allocating
次に、情報処理装置10の処理実行手段15は、コアに割り付けたタスクの処理を実行する(S02)。情報処理装置10のプロファイル情報測定手段16は、実行中におけるハードウェアモニタ情報を取得し(S03)、取得したハードウェアモニタ情報よりタスク毎のメモリアクセス率を算出する(S04)。
Next, the process execution means 15 of the
次に、情報処理装置10の更新手段18は、S04の処理により算出されたタスク毎のメモリアクセス率に基づき、タスク別プロファイル情報を更新する(S05)。
Next, the updating
次に、情報処理装置10は、例えばアプリケーションに含まれる全てのタスクの処理が終了したか否かを判断し(S06)、全てのタスクの処理が終了していない場合(S06において、NO)、S01の処理に戻る。この場合、S01の処理では、S06の処理で更新されたタスク別プロファイル情報を用いて各タスクのコアへの割り付けを行う。また、情報処理装置10は、全てのタスクの処理が終了した場合(S06において、YES)、処理を終了する。
Next, the
<本実施形態におけるタスク割り付けについて>
ここで、本実施形態におけるタスク割り付けの具体例について説明する。図5は、本実施形態におけるタスク割り付け手法の具体例を示す図である。図5の例において、図3に示すようなマルチコアプロセッサの一例であるCPU36は、所定のアプリケーションに対応する実行可能ファイルを実行する。ここで、CPU36は、タスクの構文単位でのコアへの割り付けを行う場合に、タスク別プロファイル情報を取得する。
<About task assignment in this embodiment>
Here, a specific example of task assignment in the present embodiment will be described. FIG. 5 is a diagram showing a specific example of the task assignment method in the present embodiment. In the example of FIG. 5, the
図5の例に示すタスク別プロファイル情報の項目としては、例えば「タスク」、「レベル」、「メモリアクセス率」等があるが、これに限定されるものではない。「タスク」とは、タスクを識別するための情報である。「レベル」とは、タスクの階層(例えば、親子関係等)を示す情報である。例えば、図5の例において、タスクAは、レベル0、1、2の3階層であることを示している。また、「メモリアクセス率」とは、タスク及びレベル毎のメモリアクセス率である。
Examples of the items of the task-specific profile information shown in the example of FIG. 5 include “task”, “level”, “memory access rate”, and the like, but are not limited thereto. “Task” is information for identifying a task. The “level” is information indicating a task hierarchy (for example, a parent-child relationship). For example, in the example of FIG. 5, the task A has three
また、CPU36は、ランタイムライブラリ等に含まれるコンピュータプログラムの実行時に必要となるソフトウェア部品(モジュール)等を用いて、実行中のタスクのソケットやコアへの割り付け状況を取得する。タスク割り付け状況の項目としては、例えば「ソケット」、「コア」、「タスク識別」、「レベル」、「メモリアクセス率」等があるが、これに限定されるものではない。「ソケット」とは、CPU36中のソケットを識別するための情報である。「コア」は、ソケット毎のコアを識別するための情報である。図5の例では、1つのソケット#0に4つのコア#0〜#3を有していることを示している。「タスク」は、各ソケットの各コアに割り付けられたタスクの情報である。「レベル」は、タスクに対する階層を示す図である。「メモリアクセス率」は、取得したタスクの割り付け状況から、算出手段17によりタスクそれぞれのメモリアクセス率を算出した結果を示している。
In addition, the
CPU36は、算出したメモリアクセス率を用いて、構文単位でソケットやコアを新たに割り付ける。なお、構文単位とは、例えばタスク構文単位であるが、これに限定されるものではなく、アプリケーション単位やスレッド(並列する処理)単位でもよいが、これに限定されるものではない。
The
このように、本実施形態では、アプリケーション側で、実際のメモリアクセス率を算出し、算出したメモリアクセス率に基づいて、次回のソケット及びコアの割り付けを、タスク指示を通じて行うことができる。 As described above, in the present embodiment, the actual memory access rate is calculated on the application side, and the next socket and core allocation can be performed through the task instruction based on the calculated memory access rate.
<タスク構文について>
次に、本実施形態におけるタスク構文について説明する。例えば、従来手法におけるタスクの実行では、図3に示すようなプロセッサ(CPU36)の構成において、OSレベル単純な先入れ先出し方式やラウンドロビン方式等により適当なソケットにタスクを割り付けて実行していた。そのため、従来手法では、処理効率や処理性能の向上にも限界があった。そこで、本実施形態では、OpenMPのタスクを構文のネスト(入れ子)レベルまで分けてコアに割り付ける。したがって、例えばOpenMPのタスクのネストレベル別の動作特定を用いた割り付け制御を行うことができる。
<About task syntax>
Next, the task syntax in this embodiment will be described. For example, in the task execution in the conventional method, in the configuration of the processor (CPU 36) as shown in FIG. 3, the task is assigned to an appropriate socket by the OS level simple first-in first-out method, round robin method, or the like. Therefore, the conventional method has a limit in improving the processing efficiency and processing performance. Therefore, in this embodiment, OpenMP tasks are divided up to the nesting level of syntax and assigned to the core. Therefore, for example, it is possible to perform allocation control using operation specification for each nesting level of an OpenMP task.
ここで、図6は、タスクを実行するアプリケーション中に含まれる構文の一例を示す図である。また、図7は、本実施形態におけるタスク割り付けの概略例を示す図である。 Here, FIG. 6 is a diagram illustrating an example of syntax included in an application that executes a task. FIG. 7 is a diagram showing a schematic example of task assignment in the present embodiment.
図6の例では、OpenMP API Version3.0に対応する構文例を示している。図6の例に示すようなプログラムによりタスクを実行するアプリケーションを動作させた場合、従来ではtask(タスク)構文内のtraverse内のメモリアクセス率がわからない。そのため、どのソケットに割り付けられるかはtraverse内の命令に関係なくコアを先頭から詰めて割り付けるか、又は、ラウンドロビン的に割り付けられていた。 In the example of FIG. 6, a syntax example corresponding to OpenMP API Version 3.0 is shown. When an application for executing a task is operated by a program as shown in the example of FIG. 6, conventionally, the memory access rate in the traverse in the task (task) syntax is not known. Therefore, to which socket is allocated, the cores are allocated from the top, regardless of the instruction in the traverse, or are allocated in a round robin manner.
例えば、図7(A)に示すような5つのタスクA〜Eがあった場合、タスクA〜Eの従来の割り付けでは、例えば図7(B)の(a)に示すようにソケット#0からコアの先頭(コア#0)を詰めて割り付けていた。また、別の従来方式として、図7(B)の(b)に示すように負荷を均等にするためにラウンドロビン的に割り付けていた。そのため、適切なソケットへの割り付けが行われずにいた。
For example, when there are five tasks A to E as shown in FIG. 7A, in the conventional assignment of tasks A to E, for example, from
そこで、本実施形態では、タスクA〜Eに対し、ハードウェアモニタ情報を利用して、実行途中のその場でのタスクのメモリアクセス率等の情報を履歴管理して、図7(A)に示すようなタスク別プロファイル情報を測定する。次に、このタスク別プロファイル情報を用いて、これから動作させるタスクが、メモリアクセス率が高いタスクかどうか判断し、その情報に基づいて、図7(B)の(c)に示すように、タスク毎にソケットやコアへの割り付けを行う。これにより、プロセッサの処理効率や処理性能の向上を図ることができる。 Therefore, in the present embodiment, for the tasks A to E, the hardware monitor information is used to manage the history of information such as the memory access rate of the task in the middle of execution, and FIG. Measure task-specific profile information as shown. Next, using this task-specific profile information, it is determined whether the task to be operated is a task with a high memory access rate. Based on this information, as shown in (c) of FIG. Assign to sockets and cores every time. As a result, the processing efficiency and processing performance of the processor can be improved.
<コアの割り付け例>
次に、上述した割り付け手段14におけるコアの割り付け例について、図を用いて説明する。図8は、割り付け手段における処理の一例を示すフローチャートである。図8の例において、割り付け手段14は、まず過去のタスク別プロファイル情報があるか否かを判断する(S11)。なお、過去のタスク別プロファイル情報は、例えば同一のプログラム(タスク群)において実行されたアプリケーションに対するハードウェアモニタ情報から得られるタスク別プロファイル情報等であることが好ましいが、これに限定されるものではない。
<Example of core assignment>
Next, an example of core allocation in the above-described
割り付け手段14は、S11の処理において、過去のタスク別プロファイル情報がある場合(S11において、YES)、その過去のプロファイル情報によるタスクのメモリアクセス等の度合い(例えば、メモリアクセス率等)を取得する(S12)。次に、割り付け手段14は、適正制御によりタスクを割り付けるコアを選択する(S13)。適正制御とは、例えばメモリアクセス率が高いタスクは、メモリアクセス率が低いタスクが存在するソケットのコアに割り付け、またメモリアクセス率が低いタスクは、メモリアクセスが高いタスクが存在するソケットのコアに割り付ける等である。つまり、各ソケットにおけるメモリアクセスの度合いを均等になるように割り付けを行う。なお、適正制御については、これに限定されるものではなく、例えば親子関係にあるタスクは、同一のソケットに割り付ける等の処理を行ってもよい。
If there is past task-specific profile information in the processing of S11 (YES in S11), the allocating
また、割り付け手段14は、過去のタスク別プロファイル情報がない場合(S11において、NO)、例えばコアの先頭から詰めて割り付けたり、負荷を均等にするためにラウンドロビン的に割り付ける等の従来方式でタスクを割り付けるコアを選択する(S14)。
Further, when there is no past task-specific profile information (NO in S11), the assigning
<メモリアクセス率に基づくソケットやコアへの割り付け例>
次に、本実施形態におけるメモリアクセス率に基づくソケットやコアへの割り付け例について、図を用いて説明する。図9、図10は、メモリアクセス率に基づくソケットやコアへの割り付け例を示す図(その1、その2)である。なお、図9の例では、実行するタスクが親子関係にある場合を示し、図10の例では、実行するタスクが親子関係にない場合を示している。タスクの親子関係とは、例えば親(レベル0)のタスクの実行結果を子(レベル1)のタスクで入力データとして利用する場合等であるが、これに限定されるものではない。
<Examples of allocation to sockets and cores based on memory access rate>
Next, an example of allocation to sockets and cores based on the memory access rate in this embodiment will be described with reference to the drawings. FIGS. 9 and 10 are diagrams (
図9(A)は、2スレッド並列プログラム(レベル:2段階)で実行されるタスクの内容と処理実行後のハードウェアモニタ情報の一例を示している。図9(B)は、図9(A)のハードウェアモニタ情報を用いて測定したタスク別プロファイル情報の一例を示している。図9(C)は、図9(B)のタスク別プロファイル情報に対応させてCPU36のソケット及びコアにタスクを割り付けた例を示している。図9(D)は、タスク割り付け状況の一例を示している。
FIG. 9A shows an example of the contents of a task executed in a two-thread parallel program (level: two stages) and hardware monitor information after execution of the process. FIG. 9B shows an example of task-specific profile information measured using the hardware monitor information of FIG. FIG. 9C shows an example in which tasks are allocated to the sockets and cores of the
図9(A)に示す2スレッド並列プログラムの項目としては、例えば「タスク名(レベル)」、「スレッド数」、「経過時間(秒)」、「メモリアクセス待ち(秒)」、「タスク種別」等があるが、これに限定されるものではない。図9(A)における「タスク種別」は、例えばタスクを区別するために、「タスク名+レベル+スレッド数」で名前を付けているが、これに限定されるものではない。 The items of the two-thread parallel program shown in FIG. 9A include, for example, “task name (level)”, “number of threads”, “elapsed time (seconds)”, “memory access waiting (seconds)”, “task type” However, it is not limited to this. The “task type” in FIG. 9A is named “task name + level + number of threads”, for example, to distinguish the tasks, but is not limited to this.
図9の例において、実行するタスク(task_A)は、親子関係(レベル0、レベル1)にある。このような場合にタスクの割り付け先コアを選択する際には、キャッシュ(メモリ41)のローカリティ(局所性)を保つため、同一ソケットに配置する。したがって、図9(B)に示すように、ソケット#0のコア#0〜#3に対して、それぞれタスクA00、A01、A10、A11が割り付けられる。
In the example of FIG. 9, the task to be executed (task_A) is in a parent-child relationship (
なお、図9(B)に示すメモリアクセス率は、図9(A)に示すメモリアクセス待ち時間及び経過時間を用いて、「メモリアクセス率(%)=メモリアクセス待ち(秒)/経過時間(秒)×100」として取得することができるが、これに限定されるものではない。 Note that the memory access rate shown in FIG. 9B is obtained by using the memory access waiting time and elapsed time shown in FIG. 9A, “memory access rate (%) = memory access waiting (seconds) / elapsed time ( Second) × 100 ”, but is not limited to this.
一方、図10の例において、図10(A)は、2スレッド並列プログラム(レベル:1段階)で実行されるタスクの内容と処理実行後のハードウェアモニタ情報の一例を示している。図10(B)は、図10(A)のハードウェアモニタ情報を用いて測定したタスク別プロファイル情報の一例を示している。図10(C)は、図10(B)のタスク別プロファイル情報に対応させてCPU36のソケット及びコアにタスクを割り付けた例を示している。図10(D)は、タスク割り付け状況の一例を示している。
On the other hand, in the example of FIG. 10, FIG. 10A shows an example of the contents of a task executed in a two-thread parallel program (level: 1 stage) and hardware monitor information after execution of processing. FIG. 10B shows an example of task-specific profile information measured using the hardware monitor information of FIG. FIG. 10C shows an example in which tasks are assigned to the sockets and cores of the
図10の例において、実行タスク(task_B,task_C)は、親子関係にないタスクである。このような場合でタスクの適切な割り付け先コアの決定する際には、メモリアクセス率とタスク割り付け状況により、各ソケットのメモリアクセス率が均等になるように割り付けを行う。例えば、割り付け手段14は、メモリアクセス率が高いタスクは、メモリアクセス率が低いタスクが存在するソケットに割り付け、メモリアクセス率が低いタスクはメモリアクセス率が高いタスクが存在するソケットに割り付ける。
In the example of FIG. 10, the execution tasks (task_B, task_C) are tasks that are not in a parent-child relationship. In such a case, when determining an appropriate task allocation core, allocation is performed so that the memory access rate of each socket is equal depending on the memory access rate and task allocation status. For example, the assigning
図10の例に示す割り付けでは、ソケット#0にタスクB00、C01、C01が割り付けられているため、タスク別プロファイル情報からソケット#0のメモリアクセス率は、20+20+5=45%となる。また、ソケット#1にタスクB01が割り付けられているため、タスク別プロファイル情報からソケット#0のメモリアクセス率は、50%となる。
In the allocation shown in the example of FIG. 10, since tasks B00, C01, and C01 are allocated to
上述した割り付けを行う場合には、例えばソケット内に割り付けられたタスクのメモリアクセス率の合計が所定値(例えば、80%〜100%等)を超えないように調整を行うことが好ましいが、これに限定されるものではない。 When performing the above allocation, for example, it is preferable to adjust so that the total memory access rate of tasks allocated in the socket does not exceed a predetermined value (for example, 80% to 100%, etc.). It is not limited to.
このように、本実施形態では、実行する複数のタスクが親子関係にあるか否かに応じて、図9,図10に示すように、タスクのソケットやコアへの割り付けを変えることできる。これにより、処理効率や処理性能の向上を図ることができる。 As described above, in this embodiment, the assignment of tasks to sockets and cores can be changed as shown in FIGS. 9 and 10 depending on whether or not a plurality of tasks to be executed have a parent-child relationship. Thereby, it is possible to improve processing efficiency and processing performance.
<タスク処理の開始から終了までの処理内容について>
次に、プロファイル情報測定手段16におけるタスク処理の開始から終了までの処理内容について説明する。まず割り付け手段14は、上述したコア選択処理における適正制御により、タスクを予め設定されたソケットやコアに割り付ける。処理実行手段15は、割り付け手段14によりタスク単位でコアに割り付けられたタスク処理を開始(実行)する。このとき、プロファイル情報測定手段16は、タスク別プロファイル情報を更新するために、ハードウェアモニタ情報を使用したタスクのプロファイル情報の測定も開始する。なお、タスクの初回実行では、タスク別プロファイル情報が存在しないため、例えば従来方式(例えば、単純な先入れ先出し方式やラウンドロビン方式等)でのコアの割り付けを行う。どの従来方式を用いるかについては、例えば予めユーザ等により設定しておくことができる。
<Processing contents from start to end of task processing>
Next, processing contents from the start to the end of task processing in the profile information measuring means 16 will be described. First, the assigning
また、処理実行中は、ループ単位、サブルーチン単位等の所定のタスク構文の終了毎又は所定の時間間隔毎に、プロファイル情報等の更新を行ってもよい。また、タスク処理の終了時には、プロファイル情報の測定も終了する。 During the execution of the process, the profile information and the like may be updated at the end of a predetermined task syntax such as a loop unit or a subroutine unit or at a predetermined time interval. At the end of task processing, measurement of profile information is also ended.
<更新手段18における処理について>
次に、更新手段18における処理について説明する。更新手段18は、上述したプロファイル情報測定の結果を用いてタスク別プロファイル情報を更新する。例えば、本実施形態では、プログラム実行中にタスクの構文単位でソケットやコアへの割り付けを制御することができる。
<About processing in the updating means 18>
Next, processing in the updating
例えば、1つのアプリケーションプログラムでは、ループ処理やサブルーチン処理等により同じ関数(タスク)が何度も実行される。そのため、本実施形態では、常時プロファイラでタスク別プロファイラ情報を取得することで、次回のタスク処理におけるソケットやコアへの割り付けを適切に行う。例えば、タスクは、プログラムの振る舞い(例えば、if文等の条件分岐)等により、同じタスクでも実行する度に処理内容が異なり、負荷も異なる。しかしながら、本実施形態のように、常時プロファイラでタスク別プロファイラ情報を取得して次回のタスクの割り付けの予測材料とすることで、負荷が異なる場合にも対応することができる。また、本実施形態では、タスクの実行において、ハードウェアモニタ情報を利用してタスクを適切なソケットやコアへ割り付けることで、タスク実行の負荷が軽減されてタスクの性能を向上することができる。 For example, in one application program, the same function (task) is executed many times by loop processing, subroutine processing, or the like. For this reason, in the present embodiment, the task-specific profiler information is always acquired by the profiler, so that allocation to sockets and cores in the next task processing is appropriately performed. For example, each time a task is executed by the same task, the processing contents are different and the load is different depending on the behavior of the program (for example, conditional branching such as an if statement). However, as in the present embodiment, by obtaining task-specific profiler information with the regular profiler and using it as a prediction material for the next task assignment, it is possible to cope with different loads. Also, in this embodiment, in task execution, the task execution load can be reduced and task performance can be improved by allocating tasks to appropriate sockets and cores using hardware monitor information.
<次回のタスクの割り付け例>
次に、次回のタスクのソケットやコアへの割り付け例(各実施例)について、図を用いて説明する。
<Next task assignment example>
Next, an example of assigning the next task to a socket or core (each example) will be described with reference to the drawings.
<第1実施例>
図11〜図13は、第1実施例における割り付け例を示す図(その1〜その3)である。図11(A)の例では、タスク割り付けN−1回目のタスクの内容と処理実行後のハードウェアモニタ情報の一例を示している。また、図11(B)の例では、タスク割り付けN回目のタスクの内容と処理実行後のハードウェアモニタ情報の一例を示している。
<First embodiment>
FIGS. 11 to 13 are diagrams (Nos. 1 to 3) showing examples of allocation in the first embodiment. In the example of FIG. 11A, an example of the task allocation N-1th task content and hardware monitor information after the process execution is shown. Further, in the example of FIG. 11B, an example of the task allocation N-th task content and hardware monitor information after the process execution is shown.
第1実施例では、2スレッド並列プログラム(レベル:1階層)でタスクに親子関係がない場合であって、ソケットやコアを占有して実行する(タスク割り付け時に常にコアが未使用状態)場合の例を示している。 In the first embodiment, when a two-thread parallel program (level: 1 layer) has no parent-child relationship with a task, and the socket and core are occupied and executed (the core is always unused at the time of task allocation) An example is shown.
第1実施例では、図12(A)の例に示すように、各ソケットのタスクの割り付けN回目の直前のメモリアクセス率の合計がソケット#0=0%(未使用)、ソケット#1=0%(未使用)であるとする。
In the first embodiment, as shown in the example of FIG. 12A, the total of the memory access rates immediately before the Nth task allocation of each socket is
ここで、タスクB00、B01、C00、C01を含むプログラム(アプリケーション)を実行する場合、各タスクをコアに割り付ける。そのため、割り付け手段14は、図11(A)に示す過去のハードウェアモニタ情報から取得した過去のタスク別プロファイル情報(例えば、1〜N−1回目までの統計履歴又はN−1回目のみの履歴情報)(図12(B))を参照して、メモリアクセス率を取得する。また、割り付け手段14は、取得したメモリアクセス率に基づいて、図12(C)に示すようにタスクの割り付けを行う。図12(C)の例では、ソケット毎にメモリアクセス率が均等になるように割り付けが行われ、各ソケットのメモリアクセス率の合計がソケット#0が45%となり、ソケット#1が50%となる。したがって、図13(A)に示すタスクのソケットやコアへの割り付けにより処理が実行される。なお、第1実施例では、図11(B)に示すように処理実行中のハードウェアモニタ情報を取得し、取得したハードウェアモニタ情報を用いて、タスク別プロファイル情報を更新する。
Here, when a program (application) including tasks B00, B01, C00, and C01 is executed, each task is assigned to a core. Therefore, the allocating
次に、第1実施例において、図12(D)の例に示すように、各ソケットのタスクの割り付けN+1回目の直前のメモリアクセス率の合計がソケット#0=0%(未使用)、ソケット#1=0%(未使用)であるとする。
Next, in the first embodiment, as shown in the example of FIG. 12D, the total of the memory access rates immediately before the N + 1th task allocation of each socket is
ここで、タスクB00、B01、C00、C01を含むプログラムを実行する場合、割り付け手段14は、図12(E)に示す更新したタスク別プロファイル情報(例えば、1〜N回目までの統計履歴又はN回目のみの履歴情報)を参照して、メモリアクセス率を取得する。また、割り付け手段14は、取得したメモリアクセス率に基づいて、図12(F)に示すようにタスクの割り付けを行う。図12(F)の例では、ソケット毎にメモリアクセス率が均等になるように割り付けが行われ、各ソケットのメモリアクセス率の合計がソケット#0が70%となり、ソケット#1が60%となる。したがって、図13(B)に示すタスクのソケットやコアへの割り付けにより処理が実行される。また、第1実施例では、処理実行中のハードウェアモニタ情報を用いて、タスク別プロファイル情報を更新する。そのため、N+2回目以降のタスクの割り付けにおいても同様に更新されたタスク別プロファイル情報を用いてタスク構文単位でソケットやコアを指定することができる。
Here, when executing a program including tasks B00, B01, C00, and C01, the allocating
<第2実施例>
図14、図15は、第2実施例における割り付け例を示す図(その1、その2)である。第2実施例において、2スレッド並列プログラム(レベル:1階層)の場合で、タスクに親子関係なしの場合を示している点では、上述した第1実施例と同様である。更に、第2実施例では、ソケットやコアを他のアプリケーションプログラムと共有して実行する(例えば、タスク割り付け時に常に他のプログラムが任意のコアに割り付いている)場合を示している。なお、第2実施例でも、第1実施例と同様に、上述した図11に示したタスクの内容と処理実行後のハードウェアモニタ情報の一例を用いることとする。
<Second embodiment>
FIGS. 14 and 15 are diagrams (No. 1 and No. 2) showing an allocation example in the second embodiment. The second embodiment is the same as the first embodiment described above in that it is a case of a two-thread parallel program (level: one layer) and the task has no parent-child relationship. Furthermore, the second embodiment shows a case where a socket or core is shared with another application program and executed (for example, another program is always assigned to an arbitrary core at the time of task assignment). In the second embodiment, as in the first embodiment, an example of the task contents and the hardware monitor information after the process shown in FIG. 11 is used.
第2実施例において、図14(A)に示すように、コアの一部に実行対象のタスク以外のタスクX、Y、Zが存在する。そのため、タスク割り付けN回目の直前のメモリアクセス率の合計では、ソケット#0=40%、ソケット#1=40%となる。
In the second embodiment, as shown in FIG. 14A, tasks X, Y, and Z other than the task to be executed exist in a part of the core. Therefore, the total of the memory access rates immediately before the Nth task allocation is
ここで、タスクB00、B01、C00、C01を含むプログラム(アプリケーション)を実行する場合、各タスクをコアに割り付けるため、割り付け手段14は、図14(B)に示す過去のタスク別プロファイル情報(例えば、1〜N−1回目までの統計履歴)を参照して、メモリアクセス率を取得する。また、割り付け手段14は、取得したメモリアクセス率に基づいて、図14(C)に示すようにタスクの割り付けを行う。図14(C)の例では、ソケット毎にメモリアクセス率が均等になるように割り付けが行われる。なお、図14(C)の例では、ソケット#0にタスクX、B00、C00、Yが割り付けられているため、ソケット#0内の全てのコア#0〜#3を使用しているため、タスクC01がソケット#1に割り付けられる。したがって、最終的には、各ソケットのメモリアクセス率の合計がソケット#0が85%となり、ソケット#1が95%となる。
Here, when executing a program (application) including tasks B00, B01, C00, and C01, in order to assign each task to the core, the allocating
したがって、図15(A)に示すタスクのソケットやコアへの割り付けにより処理が実行される。なお、第2実施例では、処理実行中のハードウェアモニタ情報を取得し、取得したハードウェアモニタ情報を用いて、タスク別プロファイル情報を更新する。 Therefore, processing is executed by assigning tasks to sockets and cores shown in FIG. In the second embodiment, the hardware monitor information being processed is acquired, and the task-specific profile information is updated using the acquired hardware monitor information.
次に、第2実施例において、N+1回目の割り付けを行う場合、図14(D)に示すように、コアの一部に実行対象のタスク以外のタスクU、V、Wが存在する。そのため、タスク割り付けN+1回目の直前のメモリアクセス率の合計では、ソケット#0=20%、ソケット#1=15%となる。
Next, in the second embodiment, when the N + 1th allocation is performed, as shown in FIG. 14D, tasks U, V, and W other than the task to be executed exist in a part of the core. Therefore, the total of the memory access rates immediately before the task allocation N + 1th time is
ここで、タスクB00、B01、C00、C01を含むプログラムを実行する場合、割り付け手段14は、図14(E)に示す更新したタスク別プロファイル情報(例えば、1〜N回目までの統計履歴)を参照して、メモリアクセス率を取得する。また、割り付け手段14は、取得したメモリアクセス率に基づいて、図14(F)に示すようにタスクの割り付けを行う。図14(F)の例では、ソケット毎にメモリアクセス率が均等になるように割り付けが行われ、各ソケットのメモリアクセス率の合計がソケット#0が80%となり、ソケット#1が85%となる。したがって、図15(B)に示すタスクのソケットやコアへの割り付けにより処理が実行される。また、第2実施例では、処理実行中のハードウェアモニタ情報を用いて、タスク別プロファイル情報を更新する。そのため、N+2回目以降のタスクの割り付けにおいても同様に更新されたタスク別プロファイル情報を用いてタスク構文単位でソケットやコアを指定することができる。
Here, when executing a program including tasks B00, B01, C00, and C01, the allocating means 14 uses the updated task-specific profile information (for example, statistical history from 1 to N times) shown in FIG. Refer to and obtain the memory access rate. Further, the
このように本実施形態では、次の割り付けについてもリアルタイムにフィードバック制御することができ、タスク別プロファイル情報を用いて適切な対応を取ることができる。 As described above, in the present embodiment, the next allocation can be feedback-controlled in real time, and appropriate correspondence can be taken using the task-specific profile information.
なお、上述した実施形態では、ハードウェアモニタ情報のメモリアクセス待ち時間と経過時間とを用いてメモリアクセス率を算出したが、これに限定されるものではなく、例えばキャッシュミス率と経過時間とに基づいてメモリアクセス率を算出してもよい。キャッシュミス情報は、ハードウェアモニタ情報から収集することができる。キャッシュミス情報とは、CPU36がキャッシュメモリ(メモリ41)を検索してもデータが存在しない場合のことである。キャッシュミスの場合は、(必要なデータが近距離にある)キャッシュメモリ上には存在せず、必要なデータが遠距離にあるメインメモリ上に存在するため、データへのアクセスに時間がかかる。このアクセスに要する時間がメモリアクセス待ち時間である。したがって、キャッシュミスが多い場合は、メモリアクセス待ち時間も増えるため、上述したメモリアクセス待ち時間ではなく、キャッシュミス率を用いてメモリアクセス率を算出することができる。したがって、本実施形態では、メモリアクセスが多く、タスクのキャッシュミス等が極端に大きい場合又は小さい場合に、タスク実行の割り付け先ソケットやコアを変更することで、タスク実行の効率を大幅に向上することができる。
In the above-described embodiment, the memory access rate is calculated using the memory access waiting time and the elapsed time of the hardware monitor information. However, the present invention is not limited to this, and for example, the cache miss rate and the elapsed time are calculated. Based on this, the memory access rate may be calculated. Cache miss information can be collected from hardware monitor information. The cache miss information is when no data exists even when the
上述したように本実施形態によれば、アプリケーション側で実際のメモリアクセス率に基づいてソケット及びコアの指定を、タスク指示を通じて構文単位で行うことができる。そのため、処理効率や処理性能の向上を図ることができる。 As described above, according to the present embodiment, it is possible to specify a socket and a core on a syntax basis through a task instruction on the application side based on an actual memory access rate. Therefore, it is possible to improve processing efficiency and processing performance.
また、本実施形態によれば、例えばOpenMP等のタスク構文を持つアプリケーションを実行し、実行途中のその場でのタスクのメモリアクセス率等の履歴から、タスクを割り付けるソケットやコアを適切に選択することができる。また、例えばハードウェアモニタ情報を利用して、実行途中のその場でのタスクのメモリアクセス率等の情報を履歴管理し、それらの情報を使いこれから動作するタスクが、メモリアクセス率が高いタスクか否かを判断し、その情報に基づいてタスクを割り付けるソケットやコアを適切に選択することができる。また、本実施形態によれば、メモリアクセス率からソケットやコアに適切な負荷分散で割り付けられるため、各ソケットあたりの処理時間を短縮させることができる。 Further, according to the present embodiment, for example, an application having a task syntax such as OpenMP is executed, and a socket or a core to which a task is allocated is appropriately selected from a history such as a memory access rate of the task in the middle of execution. be able to. Also, for example, using hardware monitor information, history management of information such as the memory access rate of the task in the middle of execution is performed, and whether a task to be operated using such information is a task with a high memory access rate. It is possible to determine whether or not and appropriately select a socket or core to which a task is assigned based on the information. Further, according to the present embodiment, the processing time per socket can be shortened because the memory access rate is allocated to the sockets and cores with appropriate load distribution.
以上、実施例について詳述したが、特定の実施例に限定されるものではなく、特許請求の範囲に記載された範囲内において、種々の変形及び変更が可能である。また、上述した各実施例の一部又は全部を組み合わせることも可能である。 Although the embodiments have been described in detail above, the invention is not limited to the specific embodiments, and various modifications and changes can be made within the scope described in the claims. Moreover, it is also possible to combine a part or all of each Example mentioned above.
なお、以上の実施例に関し、更に以下の付記を開示する。
(付記1)
アプリケーションの実行により得られるハードウェアモニタ情報からタスク毎のメモリアクセス率を算出し、
算出した前記メモリアクセス率に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行う、処理をコンピュータに実行させるためのタスク割り付けプログラム。
(付記2)
前記ハードウェアモニタ情報から得られる前記タスクに対するメモリアクセス率と、前記ソケットにすでに割り付けられているタスクのメモリアクセス率とに基づいて、前記タスクを割り付けるソケットを選択することを特徴とする付記1に記載のタスク割り付けプログラム。
(付記3)
前記メモリアクセス率が高いタスクは、メモリアクセス率が低いタスクが存在するソケットに割り付け、前記メモリアクセス率が低いタスクはメモリアクセス率が高いタスクが存在するソケットに割り付けることを特徴とする付記2に記載のタスク割り付けプログラム。
(付記4)
前記メモリアクセス率は、前記ハードウェアモニタ情報に含まれるメモリアクセス待ち時間又はキャッシュミス情報と、前記タスクの命令実行に要した経過時間とを用いて算出することを特徴とする付記1乃至3の何れか1項に記載のタスク割り付けプログラム。
(付記5)
前記タスクの親子関係の有無に応じて、前記ソケット又は前記コアに対する割り付けを行うことを特徴とする付記1乃至4の何れか1項に記載のタスク割り付けプログラム。
(付記6)
前記タスクに親子関係がある場合は、前記親子関係にある複数のタスクを同一ソケットに割り付け、前記タスクに親子関係がない場合は、各ソケットにおける前記メモリアクセス率が均等になるように、前記ソケットに割り付けることを特徴とする付記5に記載のタスク割り付けプログラム。
(付記7)
情報処理装置が、
アプリケーションの実行により得られるハードウェアモニタ情報からタスク毎のメモリアクセス率を算出し、
算出した前記メモリアクセス率に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行うことを特徴とするタスク割り付け方法。
(付記8)
アプリケーションの実行により得られるハードウェアモニタ情報からタスク毎のメモリアクセス率を算出する算出手段と、
前記算出手段により算出した前記メモリアクセス率に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行う割り付け手段とを有することを特徴とする情報処理装置。
In addition, the following additional remarks are disclosed regarding the above Example.
(Appendix 1)
Calculate the memory access rate for each task from the hardware monitor information obtained by executing the application,
Based on the calculated memory access rate, in response to a task instruction from the application, the processor executes a process of allocating to a socket or core of a processor in a syntax unit of the task in a program executing the application. Task assignment program for.
(Appendix 2)
The
(Appendix 3)
The
(Appendix 4)
The memory access rate is calculated using memory access waiting time or cache miss information included in the hardware monitor information and an elapsed time required to execute the instruction of the task. The task assignment program according to any one of the above items.
(Appendix 5)
The task assignment program according to any one of
(Appendix 6)
When the task has a parent-child relationship, a plurality of tasks having the parent-child relationship are allocated to the same socket, and when the task does not have a parent-child relationship, the socket is set so that the memory access rate is uniform in each socket. The task allocation program according to
(Appendix 7)
Information processing device
Calculate the memory access rate for each task from the hardware monitor information obtained by executing the application,
Based on the calculated memory access rate, task allocation is performed by assigning a processor socket or core in units of syntax of the task in a program that executes the application in response to a task instruction from the application. Method.
(Appendix 8)
A calculation means for calculating a memory access rate for each task from hardware monitor information obtained by executing the application;
Allocating means for allocating to a processor socket or core in a unit of syntax of the task in a program executing the application in response to a task instruction from the application based on the memory access rate calculated by the calculating means; An information processing apparatus comprising:
10 情報処理装置
11 入力手段
12 出力手段
13 記憶手段
14 割り付け手段
15 処理実行手段
16 プロファイル情報測定手段
17 算出手段
18 更新手段
19 通信手段
20 制御手段
31 入力装置
32 出力装置
33 ドライブ装置
34 補助記憶装置
35 主記憶装置
36 CPU
37 ネットワーク接続装置
38 記録媒体
41 メモリ
42 ソケット
43 コア
DESCRIPTION OF
37
Claims (5)
前記タスク別プロファイル情報に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行って、前記タスクを実行した結果に基づき、前記タスク別プロファイル情報を更新し、
更新された前記タスク別プロファイル情報に基づき、次のタスク指示により実行されるタスクの構文単位で、プロセッサのソケット又はコアへ割り付ける、処理をコンピュータに実行させるためのタスク割り付けプログラム。 For each task, from the hardware monitor information obtained by executing the application, information indicating the presence or absence of the parent-child relationship of the task, and the memory access rate, the task-specific profile information is generated,
Based on the task-specific profile information, in response to a task instruction from the application, a result of executing the task by allocating to a processor socket or core in a syntax unit of the task in a program executing the application Update the task-specific profile information based on
Based on the updated the task-specific profile information, the syntax units of tasks performed by the next task instruction, task allocation program for executing attached Ri allocate to the processor socket or core, the process to the computer.
アプリケーションの実行により得られるハードウェアモニタ情報からタスク毎の、タスクの親子関係の有無を示す情報と、メモリアクセス率と、を含むタスク別プロファイル情報を生成し、
前記タスク別プロファイル情報に基づき、前記アプリケーションからのタスク指示に対して、前記アプリケーションを実行するプログラムにおける前記タスクの構文単位で、プロセッサのソケット又はコアへの割り付けを行って、前記タスクを実行した結果に基づき、前記タスク別プロファイル情報を更新し、
更新された前記タスク別プロファイル情報に基づき、次のタスク指示により実行されるタスクの構文単位で、プロセッサのソケット又はコアへの割り付ける、ことを特徴とするタスク割り付け方法。 Information processing device
For each task, from the hardware monitor information obtained by executing the application, information indicating the presence or absence of the parent-child relationship of the task, and the memory access rate, the task-specific profile information is generated,
Based on the task-specific profile information, in response to a task instruction from the application, a result of executing the task by allocating to a processor socket or core in a syntax unit of the task in a program executing the application Update the task-specific profile information based on
A task allocation method comprising: allocating to a processor socket or core in a syntax unit of a task executed by a next task instruction based on the updated task-specific profile information.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013248325A JP6252140B2 (en) | 2013-11-29 | 2013-11-29 | Task allocation program and task allocation method |
US14/520,557 US9733982B2 (en) | 2013-11-29 | 2014-10-22 | Information processing device and method for assigning task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013248325A JP6252140B2 (en) | 2013-11-29 | 2013-11-29 | Task allocation program and task allocation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015106298A JP2015106298A (en) | 2015-06-08 |
JP6252140B2 true JP6252140B2 (en) | 2017-12-27 |
Family
ID=53265403
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013248325A Expired - Fee Related JP6252140B2 (en) | 2013-11-29 | 2013-11-29 | Task allocation program and task allocation method |
Country Status (2)
Country | Link |
---|---|
US (1) | US9733982B2 (en) |
JP (1) | JP6252140B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10031771B2 (en) * | 2015-06-15 | 2018-07-24 | Nxp Usa, Inc. | Multiple processor core interrupt priority levels |
US10649810B2 (en) | 2015-12-28 | 2020-05-12 | Advanced Micro Devices, Inc. | Data driven scheduler on multiple computing cores |
CN107528871B (en) * | 2016-06-22 | 2020-05-26 | 伊姆西Ip控股有限责任公司 | Data analysis in storage systems |
CN106775975B (en) * | 2016-12-08 | 2020-02-14 | 青岛海信移动通信技术股份有限公司 | Process scheduling method and device |
JP6879625B2 (en) * | 2016-12-27 | 2021-06-02 | 東芝インフラシステムズ株式会社 | Programmable controller, management device and control system |
JP2019049843A (en) * | 2017-09-08 | 2019-03-28 | 富士通株式会社 | Execution node selection program and execution node selection method and information processor |
KR102520596B1 (en) * | 2018-02-27 | 2023-04-12 | 삼성전자주식회사 | Electronic apparatus for processing task, method thereof, and computer-readable medium |
Family Cites Families (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3789215T2 (en) * | 1986-12-22 | 1994-06-01 | American Telephone & Telegraph | Controlled dynamic load balancing for a multiprocessor system. |
JPH11134082A (en) * | 1997-10-24 | 1999-05-21 | Oki Data Corp | Method for controlling output timing of electronic circuit |
JP2003006175A (en) | 2001-06-26 | 2003-01-10 | Hitachi Ltd | Process scheduling method based on program operation characteristics during process execution, and program and data processing device using the same |
WO2004044745A1 (en) * | 2002-11-13 | 2004-05-27 | Fujitsu Limited | Scheduling method in multithreading processor and multithreading processor |
US20070143759A1 (en) * | 2005-12-15 | 2007-06-21 | Aysel Ozgur | Scheduling and partitioning tasks via architecture-aware feedback information |
US7861068B2 (en) * | 2006-03-07 | 2010-12-28 | Intel Corporation | Method and apparatus for using dynamic workload characteristics to control CPU frequency and voltage scaling |
US8443348B2 (en) * | 2006-06-20 | 2013-05-14 | Google Inc. | Application program interface of a parallel-processing computer system that supports multiple programming languages |
US8108844B2 (en) * | 2006-06-20 | 2012-01-31 | Google Inc. | Systems and methods for dynamically choosing a processing element for a compute kernel |
JP2008084009A (en) | 2006-09-27 | 2008-04-10 | Toshiba Corp | Multiprocessor system |
US8132172B2 (en) * | 2007-03-26 | 2012-03-06 | Intel Corporation | Thread scheduling on multiprocessor systems |
US20090165007A1 (en) * | 2007-12-19 | 2009-06-25 | Microsoft Corporation | Task-level thread scheduling and resource allocation |
US9858053B2 (en) * | 2008-02-08 | 2018-01-02 | Reservoir Labs, Inc. | Methods and apparatus for data transfer optimization |
US8635405B2 (en) * | 2009-02-13 | 2014-01-21 | Nec Corporation | Computational resource assignment device, computational resource assignment method and computational resource assignment program |
US8869126B2 (en) * | 2009-10-20 | 2014-10-21 | Bull Hn Information Systems Inc. | Method and apparatus enabling multi threaded program execution for a Cobol program including OpenMP directives by utilizing a two-stage compilation process |
US20110271265A1 (en) * | 2010-04-28 | 2011-11-03 | Drozdov Alexander Y | Method of automatic generation of executable code for multi-core parallel processing |
JP5708003B2 (en) * | 2011-02-14 | 2015-04-30 | 富士通株式会社 | Arithmetic processing device, computing node, parallel computer system, arithmetic processing method and arithmetic processing program |
US8881159B2 (en) * | 2011-03-24 | 2014-11-04 | International Business Machine Corporation | Constant time worker thread allocation via configuration caching |
US9086925B2 (en) * | 2013-01-18 | 2015-07-21 | Nec Laboratories America, Inc. | Methods of processing core selection for applications on manycore processors |
US9268609B2 (en) * | 2013-04-30 | 2016-02-23 | Hewlett Packard Enterprise Development Lp | Application thread to cache assignment |
US9329899B2 (en) * | 2013-06-24 | 2016-05-03 | Sap Se | Parallel execution of parsed query based on a concurrency level corresponding to an average number of available worker threads |
US20150066988A1 (en) * | 2013-08-30 | 2015-03-05 | Nec Laboratories America, Inc. | Scalable parallel sorting on manycore-based computing systems |
JP6427054B2 (en) * | 2015-03-31 | 2018-11-21 | 株式会社デンソー | Parallelizing compilation method and parallelizing compiler |
-
2013
- 2013-11-29 JP JP2013248325A patent/JP6252140B2/en not_active Expired - Fee Related
-
2014
- 2014-10-22 US US14/520,557 patent/US9733982B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
US20150154054A1 (en) | 2015-06-04 |
JP2015106298A (en) | 2015-06-08 |
US9733982B2 (en) | 2017-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6252140B2 (en) | Task allocation program and task allocation method | |
US9965324B2 (en) | Process grouping for improved cache and memory affinity | |
KR101651871B1 (en) | Job Allocation Method on Multi-core System and Apparatus thereof | |
JP5245722B2 (en) | Scheduler, processor system, program generation device, and program generation program | |
JP6241300B2 (en) | Job scheduling apparatus, job scheduling method, and job scheduling program | |
JP5911286B2 (en) | Device, method, and program for runtime assignment of functions to hardware accelerators | |
JP5744909B2 (en) | Method, information processing system, and computer program for dynamically managing accelerator resources | |
KR101640848B1 (en) | Job Allocation Method on Multi-core System and Apparatus thereof | |
JP6294586B2 (en) | Execution management system combining instruction threads and management method | |
JP7664949B2 (en) | Power-Performance Based System Management | |
JP2018533122A (en) | Efficient scheduling of multiversion tasks | |
JP2008191949A (en) | Multi-core system, and method for distributing load of the same | |
KR20180034440A (en) | Method for simplified task-based runtime for efficient parallel computing | |
JP5718378B2 (en) | System and method used to perform one or more tasks | |
KR20100074920A (en) | Apparatus and method for load balancing in multi-core system | |
KR101177059B1 (en) | Method for dynamically assigned of parallel control module | |
CN103970606A (en) | Apparatus and method for allocating resources | |
Cheng et al. | Precise contention-aware performance prediction on virtualized multicore system | |
CN114356550A (en) | Three-level parallel middleware-oriented automatic computing resource allocation method and system | |
CN113168344A (en) | Distributed resource management by increasing cluster diversity | |
US8862786B2 (en) | Program execution with improved power efficiency | |
Chen et al. | Contention and locality-aware work-stealing for iterative applications in multi-socket computers | |
JP2011141703A (en) | System, method and program for arranging resource | |
KR101755154B1 (en) | Method and apparatus for power load balancing for heterogeneous processors | |
JP6156379B2 (en) | Scheduling apparatus and scheduling method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160804 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170613 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170810 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170822 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20171017 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20171031 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171113 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6252140 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |