WO2012004954A1 - トレースシステム - Google Patents

トレースシステム Download PDF

Info

Publication number
WO2012004954A1
WO2012004954A1 PCT/JP2011/003770 JP2011003770W WO2012004954A1 WO 2012004954 A1 WO2012004954 A1 WO 2012004954A1 JP 2011003770 W JP2011003770 W JP 2011003770W WO 2012004954 A1 WO2012004954 A1 WO 2012004954A1
Authority
WO
WIPO (PCT)
Prior art keywords
load
cpu
trace
tracer
control mechanism
Prior art date
Application number
PCT/JP2011/003770
Other languages
English (en)
French (fr)
Inventor
岳彦 長野
木村 淳一
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Publication of WO2012004954A1 publication Critical patent/WO2012004954A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

Definitions

  • the present invention relates to a program operation history (trace) collection method used in a computer system having a plurality of CPUs and CPU cores.
  • Trace data collection in a computer system aims to acquire the system operation history, and acquires and records the contents necessary for tracing, such as execution contents, related information, and time, at the timing when the trace target is executed. Is.
  • the trace load becomes higher in proportion to the system load, which causes side effects on the system.
  • the CPU load of a computer system is high or the transaction flow is high, the amount is monitored, and the amount of trace to be collected is increased or decreased step by step in response to fluctuations in that amount. Methods to make it possible are being considered.
  • 9-6652 has a switching unit that can change the trace collection range corresponding to the load amount / transaction amount in advance, a storage unit that stores the setting of the trace collection range, and the load / transaction amount monitoring unit. Based on the results, the trace collection range is switched using the switching means.
  • the load is high, a small amount of important information is acquired.
  • the load is low, a large amount of information is acquired.
  • the above prior art monitors the load status and changes the trace range according to the status to change the load, but it supports the increase and decrease of the load, but on the assumption of single CPU, single core operation
  • the efficiency deteriorates. For example, in a system with several CPU cores, if the load on one core rises sharply, even if there is still room in CPU resources for the entire system, in the conventional invention, the amount of trace to be collected is It will decrease.
  • the trace acquisition range is set inappropriately, even if the minimum trace is performed, a load due to the trace occurs, and a system processing time delay occurs.
  • the load applied to the system is monitored using the resource monitoring mechanism, and the trace integrated control mechanism Based on the above, after creating a CPU allocation schedule for the process so that the CPU core can be used exclusively for tracing or to secure sufficient resources to acquire the trace, the system control mechanism is used to allocate the process and trace
  • the integrated control mechanism controls the execution / stop of the tracer.
  • the present invention monitors all loads even in a multi-core, multi-CPU, considers the load, assigns processes other than the tracer to other than the core on which the tracer operates, and then dedicated the tracer or has a low load fluctuation. By operating only with processes, side effects on the system are reduced and stable tracing is performed.
  • the trace integration control mechanism implements the process movement schedule, the load between the cores is averaged, and resources are left on average, so even if the load on the app rises, the tracer stop time can be reduced. Can be shortened.
  • the figure which shows an example of the whole structure of embodiment of this invention The figure which shows an example of the control processing sequence of a tracer
  • the figure which shows an example of a load information management table Diagram showing an example of individual measurement results The figure which shows an example of the processing sequence of the load measurement classified by monitoring object
  • the figure which shows an example of the processing sequence of load information acquisition The figure which shows an example of a schedule setting process sequence Figure showing an example of the load order list
  • the figure which shows an example of control information Figure showing an example of a control list The figure which shows an example of the whole structure of the 2nd Embodiment of this invention
  • FIG. 1 is a configuration diagram of a computer system having a trace collection function according to the present invention.
  • a multi-core CPU 101 composed of a plurality of cores 102, 103, 1041, and 105, a system control mechanism 114, a tracer 115, a resource monitoring mechanism 116, an OS 106 for controlling a computer including the multi-core CPU 101, and recorded in an auxiliary storage device 109 Memory 107 for developing various control / monitoring programs described later, various programs operating on the system, various tables described later, etc.
  • a controller 108 for controlling reading / writing of data to / from memory 107
  • a controller 108 for controlling reading / writing of data to / from memory 107
  • an auxiliary storage device 109 for storing various programs and various tables to be described later
  • an I / O controller 110 for controlling reading and writing of data to the auxiliary storage device
  • a CPU 101 a central processing unit
  • a memory 107 a memory 107
  • an auxiliary storage used for data exchange with the device 109, the load (usage rate) of each core 102, 103, 104, 105 of the CPU 101, the bus 111, etc.
  • Load information is collected and recorded under the control of the trace integrated control mechanism 115, which will be described later, the resource monitoring mechanism 112 that records and records, the tracer 113 that is the control target of this system, and collects system information, and the adverse effects of the tracer
  • the system control mechanism 114 that performs the allocation change scheduling of the CPU on which the program (process) operates based on the load information collected by the resource monitoring mechanism, the resource monitoring mechanism 112, the tracer 113, and the system control mechanism 114
  • the trace integrated control mechanism 115 for performing the integrated control of the above.
  • FIG. 2 is a tracer control processing sequence executed by the trace integrated control mechanism 115 of the system shown in FIG. This process is executed on a periodic basis using the timer function of the OS after the tracer integrated control mechanism is started. After the start, the process first proceeds to step S201, and the monitoring target-specific load measurement process is executed. In this process, the resource monitoring mechanism 112 is used to measure the load of the monitoring target for the monitoring target described in the load information management table 300 using the monitoring method 304 described in the same, and the load information management table 300 Is updated, and the process proceeds to step S202 schedule setting processing. Details of this processing will be described separately with reference to FIG.
  • step S202 the system control mechanism 114 is used to check the free state of the CPU resources of the operating system based on the acquired load information and process behavior information, and to allocate a CPU dedicated to the tracer. If the system is fully operational and if it is determined that it can be operated, schedule the process running on the target CPU to be relocated to another CPU and control the schedule as shown in Fig. 10. Record as Listing 1000. Detailed description of this step will be described separately with reference to FIG. After completion of this step, the process proceeds to step S203. In step S203, based on the result of the schedule setting process performed in S202, it is determined whether processes other than the tracer operating on the system can be operated with n-1 CPUs. If not possible, the process proceeds to step S208.
  • step S204 it is determined by referring to the tracer operation status column of the control information 900 whether or not the tracer is already operating. If the tracer is operating, the process is terminated as it is. If the tracer is stopped, the process proceeds to step S205. In step S205, a function provided by the OS or the like, for example, tasksset is used in Linux, the control list 1000 is referred to, and the CPU to which the process in operation is bound is changed. After completion of the change, the process proceeds to step S206. In step S206 tracer activation processing, the tracer 113 shown in FIG. 1 is activated, and the process proceeds to step S207.
  • step S207 the tracer operation state 906 of the control information 900 is changed from being stopped to being in operation, and after the change is completed, the process is terminated.
  • step S208 as in step S204, it is determined by referring to the tracer operation state 906 of the control information 900 whether the tracer is already operating. If the tracer is operating, the process proceeds to step S209. When the tracer is stopped, the processing sequence is finished as it is. In the tracer stop process in step S209, the tracer 113 shown in FIG. 1 is stopped, and the process proceeds to step S210. In step S210, the tracer operation state 906 of the control information 900 is changed from being stopped to being operated, and the process is terminated.
  • Fig. 3 shows an example of a load information management table.
  • the load information management table 300 is a record that records the monitoring order, the monitoring number 301 that is a record for recording the number of monitoring targets, the monitoring target 302 that is a record for recording the category of the monitoring target, and the details of the monitoring target.
  • the resource integration control mechanism 115 includes an expected load 306 that is a record for temporarily recording information. This table is recorded in the auxiliary storage device 109 before use of the system, and is generally used such as being expanded on a memory when the execution of the present invention is started.
  • Fig. 4 is an example of individual measurement results.
  • the PID 401 that is a record for recording the IDs of all processes operating on the system shown in FIG. 1
  • the monitoring target 402 that is a record for recording the contents to be recorded for each PID, load information for each hour, and statistics
  • the load 403 is a record for recording information after analysis.
  • Examples of the monitoring target 402 include a CPU load 404 that is a column item that records the CPU load given by each process, an operation CPU 405 that is a column item that records the name of the CPU and CPU core on which each process operates, and each process Is a used memory 406, which is a column item for recording the amount of memory used.
  • this table is recorded in the auxiliary storage device 109 before the system is used, and is generally used in such a manner that it is expanded on a memory at the start of execution of the present invention.
  • FIG. 5 is a sequence diagram showing details of the monitoring target-specific load measurement S201 process of FIG.
  • step S501 the information of the load information management table 300 is read, and the process proceeds to step S502.
  • step S502 the presence / absence of a monitoring target is determined based on the information acquired in step S501. If not, the process is terminated. If there is, the process proceeds to step S503.
  • step S503 based on the information in the load information management table 300, information to be monitored and a monitoring technique are read, and the process proceeds to step S504.
  • step S504 the local variable i is initialized, and the process proceeds to step S505.
  • step S505 it is determined whether the value of i is equal to or less than the maximum value of the monitoring number.
  • step S506 load information is acquired from the monitoring target based on the monitoring method information in the load information management table 300 read in step S503 and the monitoring target information.
  • load information is acquired from the monitoring target based on the monitoring method information in the load information management table 300 read in step S503 and the monitoring target information.
  • CPU load information under the / proc file system in a Linux system or the like, and information on the execution time of / proc / [pid] / stat held by each process are obtained.
  • step S507 the information acquired in step S506 is recorded in the load information management table 300 or the individual measurement result 400, and the process proceeds to step S508.
  • step S508 the local variable i is incremented, and the process proceeds to step S505.
  • FIG. 6 is a sequence diagram showing an example of processing for acquiring load information in step S506 of FIG.
  • the process first proceeds to step S601, and information such as / proc / [pid] / stat is acquired by using an OS function or the like.
  • OS function for example, in a system in which Linux operates, the item processor of / proc / [pid] / stat is referred to, information is acquired, and PID information and operating CPU information of the individual measurement result 400 are updated.
  • step S602. a local variable for process count is set, and the process proceeds to step S603.
  • step S603 it is determined whether the local variable j is equal to or less than the maximum value of the PID of the individual measurement result.
  • FIG. 7 is a sequence diagram showing an example of schedule setting processing in step S202 of FIG.
  • process allocation scheduling is performed to create unused areas such as CPU cores in order to reduce side effects caused by the tracer.
  • step S701 referring to the information in the load information management table 300, assigns the CPU with the lowest load and the CPU with the next lowest load, registers them in the control information 900, and proceeds to step S702.
  • step S702 in order to execute step S703 for all CPUs in the load information management table 700 other than the CPU with the lowest load, a determination is made as to whether or not the loop of the CPU other than the minimum load applies, and the loop is executed. Update local variable i for.
  • step S703 If the value of the local variable i is not within the monitoring number range of the load information management table and the monitoring number of the CPU with the lowest load, the process proceeds to step S703. Otherwise, the process proceeds to step S704.
  • step S703 a process of adding the surplus CPU resource (100-CPUi load) of the CPUi to be checked to the variable surplus CPU resource is performed. This process is performed by a CPU other than the one operating at the minimum load, and by calculating the sum, the extent to which the process transfer destination CPU is accepted is calculated.
  • step S704 it is determined whether the total amount of free CPUs other than the minimum load is larger or smaller than the usage rate of the minimum load CPU.
  • step S705 the process proceeds to step S705 in order to execute a schedule process for assigning the process that was operating on the CPU with the smallest load to another CPU. If the total sum of vacancies is small, the process is terminated as it is.
  • step S705 based on the information of the individual measurement result 400, sorting is performed in descending order using the process load as a key for each CPU to create a load order list 800, and the process proceeds to step S706.
  • any sort algorithm may be used.
  • step S706 the information of the control information 900 is referred to, and the name of the CPU with the smallest load and the name of the CPU with the second lowest load are assigned to the local variables i and j, respectively, and the process proceeds to step S707.
  • step S707 1 is assigned to the local variable k, initialization is performed, and the process proceeds to step S708.
  • step S708 it is determined whether or not there is a load k-th process of the CPU with the minimum load. If there is a load k-th process, the process proceeds to step S709; otherwise, the process ends.
  • step S709 it is determined whether or not the load k-th process operating on the CPU with the lowest load can be moved to the CPU with the second lowest load. Specifically, it is determined whether the sum of the load of CPUj (the CPU with the second largest load) + the load of the process k to be moved does not exceed 100%. If not exceeded, the process proceeds to step S710, and if exceeded, the process ends.
  • step S710 the k-th process ID of i as the target process is written in the control list 1000, i is registered in the CPU column before movement in the control list, and j is registered in the destination CPU column. move on.
  • step S711 the k-th load of i is added to the expected load of CPUj of the expected load of the load information management table 300, and the process proceeds to step S712.
  • step S712 the second information is referenced with reference to the load information management table information. CPU with less load is obtained, j is updated, and the process proceeds to step S713.
  • step S713 the value of k is incremented and the process returns to S708.
  • Fig. 8 shows an example of the load order list.
  • Monitoring number 801 that is a record used for monitoring and management
  • monitoring target 802 that is a record that records the category of monitoring target
  • monitoring target detail 803 that is a record that records details of the monitoring target
  • load 804 composed of a list arranged in descending order with the load factor to be monitored as a key.
  • Fig. 9 shows an example of control information.
  • the system includes a recording item 901 that is a record for recording an item to be temporarily recorded, and a recording content 902 that is a record for recording content corresponding to the recording item.
  • the following contents are registered in the record item 901.
  • CPU 903 with the least load column that records the CPU name with the least load
  • CPU 904 with the second lowest load column that records the name of the CPU with the second lowest load
  • column surplus CPU resource 905 that records the amount of surplus CPU resources
  • a column tracer operating state 906 that indicates whether the tracer is operating or stopped.
  • Fig. 10 is an example of a control list.
  • the CPU load is a monitoring target will be described as an example.
  • the usage rate of the multi-core CPU has been described as an example, but the memory resource may be similarly monitored to control the tracer.
  • the OS is Linux
  • memory size information can be acquired in the same manner as in the first embodiment, and the tracer can be started and stopped using the memory size as a trigger.
  • the resource monitoring device 1112 and the system control device 1113 may be implemented by hardware or the like and not included in the OS.
  • the resource monitoring mechanism 112, the tracer 113, and the system control mechanism 114 in FIG. 1 may be implemented as applications that are not included in the OS and operate on the OS. Further, the trace integrated control mechanism 115 may be implemented as an OS function.
  • the scheduling algorithm shown in FIG. 7 may implement a general scheduling algorithm.
  • an optimization algorithm such as dynamic programming may be employed to optimize the load and allocate processes.
  • the CPU with the lowest load is moved from the process with the highest load to the CPU with the next lowest load, and the CPU with the second lowest load is searched for each move, and the processing is continued.
  • the load other than the CPU that operates is averaged, but the average 408 and the maximum value 409, which are one of the items of the individual measurement results 400, are used to evaluate the difference between the average and the maximum value. If the value is smaller than the value defined by the user, the period during which the tracer is stopped may be further shortened by enabling the tracer to coexist.
  • the present invention is used as a trace system for collecting a program operation history (trace) in a computer system having a plurality of CPUs and CPU cores.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

 従来技術は、シングルCPU、シングルコアでの動作を前提としており、マルチコアシステムや、マルチCPUシステム上で、そのまま適用すると、効率が悪化する。 本発明は、マルチコアCPUや、複数のCPUを持つ計算機システム上で、ソフトウェアトレーサを使用するトレースシステムにおいて、システムにかかっている負荷をリソース監視機構を用いて監視し、トレース統合制御機構が、負荷情報を元に、CPUコアをトレース専用に、若しくはトレースを取得するのに十分なリソースを確保出来る様、プロセスのCPU割り当てスケジュールを作成した後、システム制御機構を用いてプロセスの割り当てを実行する。その後、トレース統合制御機構がトレーサの実行・停止制御を行う。

Description

トレースシステム
 本発明は、複数のCPUやCPUコアを持つ計算機システムにて使用される、プログラム動作履歴(トレース)の収集方法に関するものである。
 計算機システムにおけるトレースデータ収集は、システムの動作履歴を取得することを目的とし、トレース対象が実行されるタイミングで、トレースに必要な内容、例えば実行内容や関連情報、時刻等を取得し、記録するものである。しかし、システムの負荷に比例し、トレースの負荷が高くなり、システムに対し副作用を与えるという問題が有った。その様な問題に対し、従来、計算機システムのCPU負荷量が高い場合や、トランザクションの流量が多い場合、その量を監視し、その量の変動に対応して収集するトレース量を段階的に増減可能にする方法が検討されている。特開平9-6652では、予め負荷量・トランザクション量に対応したトレース収集範囲を変更出来る切り替え手段と、トレース収集範囲の設定を記憶する記憶手段と、前記負荷・トランザクション量監視手段を持ち、前記監視結果を元に、切り替え手段を用いてトレース収集範囲を切り替え、負荷が高い時は、重要な情報を少量取得し、負荷が低い時は大量の情報を取得することで、システム負荷が高い際も、システムに与える影響を少なくし、トレースの連続性を保つ技術を提案している。
特開平9―6652
 上記従来技術は、負荷の状態を監視し、その状態に合わせてトレース範囲を設定した内容に変更することで、負荷の増減に対応しているが、シングルCPU、シングルコアでの動作を前提としており、マルチコアシステムや、マルチCPUシステム上で、そのまま適用すると、効率が悪化する。例えば、いくつかのCPUコアを持ったシステムにおいて、一つのコアにおける負荷が急激に上昇した場合、システム全体としては、まだCPUリソースに余裕があったとしても、従来発明では、収集するトレース量を減らしてしまう。また、全くトレース取得範囲の設定が不適切で有る場合、最小限のトレースを実施しても、トレースによる負荷が発生し、システムの処理時間遅延等が発生する。
 本発明は、マルチコアCPUや、複数のCPUを持つ計算機システム上で、ソフトウェアトレーサを使用する場合において、システムにかかっている負荷をリソース監視機構を用いて監視し、トレース統合制御機構が、負荷情報を元に、CPUコアをトレース専用に、若しくはトレースを取得するのに十分なリソースを確保出来る様、プロセスのCPU割り当てスケジュールを作成した後、システム制御機構を用いてプロセスの割り当てを実行し、トレース統合制御機構がトレーサの実行・停止制御を行う。
 従来のトレース方式では、マルチコア、マルチCPU上で実行すると、一部のコアの負荷が増大し、他のコアのリソースが余っていても、トレース量が減ることや、トレースの取得範囲の設定が不適切な場合、最小限のトレースを実施していても、負荷が増大するという課題があった。それに対し、本発明は、マルチコア、マルチCPUでも全ての負荷を監視し、負荷を考慮してトレーサ以外のプロセスを、トレーサが動作するコア以外に割り当て、そののちトレーサを専用、若しくは負荷変動の低いプロセスのみと動作させることで、システムに対する副作用を軽減し、安定したトレースを実施する。また、トレース統合制御機構が、プロセスの移動スケジュールを実施する際に、コア間の負荷を平均化し、平均的にリソースを余らせることで、アプリの負荷が高騰しても、トレーサの停止時間を短くすることが出来る。
本発明の実施形態の全体構成の一例を示す図 トレーサの制御処理シーケンスの一例を示す図 負荷情報管理テーブルの一例を示す図 個別計測結果の一例を示す図 監視対象別負荷測定の処理シーケンスの一例を示す図 負荷情報取得の処理シーケンスの一例を示す図 スケジュール設定処理シーケンスの一例を示す図 負荷順リストの一例を示す図 制御情報の一例を示す図 制御リストの一例を示す図 本発明の第2の実施形態の全体構成の一例を示す図
 まず、本発明の第1の実施形態を説明する。
図1は、本発明によるトレース収集機能を備える計算機システムの構成図である。複数のコア102、103、1041、105から成るマルチコアCPU101と、システム制御機構114と、トレーサ115と、リソース監視機構116を含み、マルチコアCPU101を含む計算機を制御するOS106と、補助記憶装置109に記録された、後述する各種制御・監視プログラムや、システム上で動作する各種プログラム、後述する各種テーブル等をシステム動作時に展開しておくメモリ107と、メモリ107に対し、データの読み書きの制御を行うメモリコントローラ108と、各種プログラムや、後述する各種テーブル等を保存しておく補助記憶装置109と、補助記憶装置へのデータの読み書きの制御を行うI/Oコントローラ110と、CPU101とメモリ107や補助記憶装置109とのデータの受け渡しに使用するシステムバス111と、CPU101の各コア102、103、104、105の、各コアの負荷(使用率)や、バス111等の負荷情報を、後述するトレース統合制御機構115からの制御により収集し、記録するリソース監視機構112と、本システムの制御対象であり、システムの情報を収集するためのトレーサ113と、トレーサによる悪影響を軽減するために、リソース監視機構が収集した負荷情報を元に、プログラム(プロセス)の動作するCPUの割り当て変更スケジューリングを実施するシステム制御機構114と、リソース監視機構112、トレーサ113、システム制御機構114の統合的な制御を実施するトレース統合制御機構115からなる。
 図2は、図1で示した本システムのトレース統合制御機構115が実施する、トレーサの制御処理シーケンスである。本処理は、トレーサ統合制御機構開始後、OSのタイマ機能等を使用して周期単位で実行される。開始後、まずステップS201に進み、監視対象別負荷測定処理が実行される。本処理では、リソース監視機構112を用い、負荷情報管理テーブル300に記載されている監視対象について、同じく記載されている監視手法304を用いて、監視対象の負荷を計測し、負荷情報管理テーブル300の内容を更新し、ステップS202スケジュール設定処理に進む。本処理の詳細は、別途図5を用いて説明する。ステップS202のスケジュール設定処理では、システム制御機構114を使い、取得した負荷情報と、プロセスの挙動情報を元に、動作中のシステムのCPUリソースの空き状態を調べ、トレーサ専用にCPUを割り当ててもシステムが十分動作するか評価し、動作可能と判定した場合は、開ける対象のCPU上で動作しているプロセスの、別CPUへの再配置するスケジューリングを実施し、スケジュール内容を図10で示す制御リスト1000として記録する。本ステップの詳細な説明は、図7を用いて別途説明する。本ステップ修了後、ステップS203に進む。ステップS203では、S202で実施されたスケジュール設定処理の結果を元に、n-1個のCPUで、システム上で動作するトレーサ以外のプロセスが動作可能か判定し、動作可能ならばステップS204に、不可能ならばステップS208に遷移する。ステップS204では、既にトレーサが動作しているかどうかを制御情報900のトレーサ動作状態カラムを参照し、判定する。トレーサが動作中の場合は、そのまま処理を終了する。トレーサが停止中の場合には、ステップS205に進む。ステップS205では、OS等が提供する機能、例えばLinuxではtasksetを使用し、制御リスト1000を参照し、動作中のプロセスをバインドするCPUを変更する。変更修了後、ステップS206に進む。ステップS206トレーサ起動処理では、図1で示すトレーサ113を起動し、ステップS207に進む。ステップS207では、制御情報900のトレーサ動作状態906を、停止中から動作中に変更し、変更修了後、処理を終了する。ステップS208では、ステップS204と同様に、既にトレーサが動作しているかどうかを制御情報900のトレーサ動作状態906を参照し、判定する。トレーサが動作中の場合は、ステップS209に進む。トレーサが停止中の場合には、そのまま処理シーケンスを終了する。ステップS209トレーサ停止処理では、図1で示すトレーサ113を停止し、ステップS210に進む。ステップS210では、制御情報900のトレーサ動作状態906を、停止中から動作中に変更し、処理を終了する。
 図3は、負荷情報管理テーブルの例である。本例では、CPUの負荷を監視対象にした場合を例にして説明する。負荷情報管理テーブル300は、監視順番と、監視対象数を記録するレコードである監視番号301と、監視対象のカテゴリを記録するレコードである監視対象302と、監視対象の詳細を記録するレコードである監視対象詳細303と、監視対象を監視する具体的手法や、手法を実装したプログラム等を記録するレコードである監視手法304と、リソース監視機構112によって取得したリソース負荷を記録するレコードである負荷305と、リソース統合制御機構115が、システム負荷の割り当て調整を実施する際に、一時的に情報を記録するレコードである予想負荷306からなる。本テーブルは、システム使用前は、補助記憶装置109に記録されており、本発明実行開始時等にメモリ上に展開する等の使い方を一般的にする。
 図4は、個別計測結果の例である。本例では、CPUの負荷を監視対象にした場合を例にして説明する。図1に示す、本システム上で動作する全てのプロセスのIDを記録するレコードであるPID401と、PID毎に記録する内容について記録するレコードである監視対象402と、時間毎の負荷情報や、統計解析後の情報等を記録するレコードである負荷403からなる。監視対象402の例としては、各プロセスが与えるCPU負荷を記録するカラム項目であるCPU負荷404と、各プロセスが動作するCPUやCPUコアの名称を記録するカラム項目である動作CPU405と、各プロセスが使用するメモリ量を記録するカラム項目である使用メモリ406から成る。負荷403の例としては、単位時間毎の監視内容を記録するレコード計測値が、計測時間分存在する。また、先計測値の平均値を記録するレコードである平均408と、各項目の最大値を記録するレコードである最大値409からなる。本テーブルも図3同様、システム使用前は、補助記憶装置109に記録されており、本発明実行開始時等にメモリ上に展開する等の使い方を一般的にする。
 図5は、図2の監視対象別負荷測定S201処理の詳細を表すシーケンス図である。ステップS501では、負荷情報管理テーブル300の情報を読み込み、ステップS502に遷移する。ステップS502では、ステップS501で取得した情報を元に、監視対象の有無を判断する。無い場合は、処理を終了する。有る場合、ステップS503に進む。ステップS503では、負荷情報管理テーブル300の情報を元に、監視対象の情報、監視手法を読み込み、ステップS504に進む。ステップS504では、ローカル変数iの初期化を行い、ステップS505に進む。ステップS505では、iの値が監視番号の最大値以下か判定する。最大値以下の場合、ステップS506に進む。それ以外の場合には、処理を終了する。ステップS506では、ステップS503で読み込んだ、負荷情報管理テーブル300 の監視手法情報と、監視対象の情報を元に、監視対象から負荷情報を取得する。一般的な例をあげると、Linuxのシステム等における/procファイルシステム以下にあるCPUの負荷情報や、プロセス単位で保有される/proc/[pid]/statの実行時間の情報等を取得する。これら情報を取得の後、ステップS507に進む。ステップS507では、ステップS506で取得した情報を、負荷情報管理テーブル300や、個別計測結果400に記録し、ステップS508に進む。ステップS508では、ローカル変数iをインクリメントし、ステップS505へ進む。
 図6は図5のステップS506負荷情報取得の処理例を表わすシーケンス図である。開始後、まずステップS601に進み、/proc/[pid]/statの情報等を、OSの機能等を利用して取得する。例えば、Linuxが動作するシステムで/proc/[pid]/statの項目processor等を参照し、情報を取得、個別計測結果400のPID情報並びに動作CPU情報を更新する。個別計測結果更新後、ステップS602に進む。ステップS602では、プロセスカウント用のローカル変数を設定し、ステップS603に進む。ステップS603では、ローカル変数jが個別計測結果のPIDの最大値以下かどうかを判定する。判定以下の場合はステップS604に進み、そうでない場合は、処理を終了する。ステップS604ではPID=jが、チェックしているシステム上で動作しているかどうかをチェックする。動作している場合はステップS605に進み、動作していない場合は、ステップS607に進む。ステップS605では、プロセスが動作しているCPUが現在評価中のCPUで動作しているプロセスか否かチェックする。現在評価中のCPUで動作している場合は、ステップS606に進み、そうでない場合は、ステップS607に進む。ステップS606では、個別計測結果400に記録されている情報を参照し、負荷情報管理テーブル300の負荷305を更新してステップS607に進む。ステップS607では、ローカル変数をインクリメントしてステップS603に進む。
 図7は、図2ステップS202のスケジュール設定処理例を表すシーケンス図である。本シーケンスでは、トレーサによる副作用を軽減するために、CPUコア等の未使用領域を作成するための、プロセス割り当てスケジューリングを実施する。開始後、まずステップS701に進み、負荷情報管理テーブル300の情報を参考に、最も負荷の低いCPU,また、次に負荷の低いCPUを引き当て、制御情報900に登録し、ステップS702にすすむ。ステップS702では、負荷情報管理テーブル700にある、負荷最低なCPU以外のすべてのCPUに対し、ステップS703を実行するために、最小負荷以外のCPUのループに当てはまるかの判定を実施と、ループ実行のためのローカル変数iの更新を実施する。ローカル変数iの値が、負荷情報管理テーブルの監視番号範囲内かつ、最も負荷が低いCPUの監視番号以外の際は、ステップS703に進み、それ以外の場合はステップS704に進む。ステップS703では、余剰CPUリソースという変数に対し、チェック対象のCPUiの余剰CPUリソース(100-CPUiの負荷)を追加する処理を実施する。この処理を、最小の負荷で動作していたCPU以外で実施し、その和を撮ることで、プロセス移動先のCPUがどの程度受け入れられるかを算出する。ステップS704では、負荷最小以外のCPUの空きの総和が、負荷最小のCPUの使用率より大きいか、小さいかを判定する。空きの総和が大きい場合は、負荷最小のCPUで動作していたプロセスの割り付けを、他のCPUにするためのスケジュール処理を実施するため、ステップS705に進む。空きの総和が小さい場合は、そのまま処理を終了する。ステップS705では、個別計測結果400の情報を元に、CPU毎に、プロセス負荷をキーにして、降順にソートを実施し、負荷順リスト800を作成し、ステップS706に進む。ここで、ソートアルゴリズムは何を使用しても構わない。ステップS706では、制御情報900の情報を参照し、ローカル変数iとjにそれぞれ、負荷最小であるCPUの名称、2番目に負荷が低いCPUの名称を割り当て、ステップS707に遷移する。ステップS707では、ローカル変数kに1を代入し、初期化を実施し、ステップS708へ進む。ステップS708では、負荷最小のCPUの負荷k番目のプロセスが有るか無いかの判定を実施する。負荷k番目のプロセスが有る場合は、ステップS709に進み、無い場合は、終了する。ステップS709では、2番目に負荷の低いCPUに、負荷最小のCPUで動作する負荷k番目のプロセスが移動可能か判定する。具体的には、CPUj(2番目に負荷が大きいCPU)の負荷+移動するプロセスkの負荷を足したものが、100%を超えないか判定する。超えない場合、ステップS710に進み、超える場合は終了する。ステップS710では、制御リスト1000に対し、対象プロセスとしてiのk番目のプロセスIDを書きこみ、制御リストの移動前のCPUカラムにiを、移動先のCPUカラムにjを登録し、ステップS711に進む。ステップS711では、負荷情報管理テーブル300の予想負荷のCPUjの予想負荷に、iのk番目の負荷を追加し、ステップS712に進む、ステップS712では、負荷情報管理テーブルの情報を参照に、2番目に負荷が少ないCPUを求め、jを更新し、ステップS713に進む。ステップS713では、kの値をインクリメントしてS708に戻る。
 図8は負荷順リストの例である。本例は、CPUの負荷を監視対象にした場合を例にして説明する。監視対象の区別や、管理に使用するレコードである監視番号801と、監視対象のカテゴリを記録するレコードである監視対象802と、監視対象の詳細を記録するレコードである監視対象詳細803と、負荷測定後、監視対象の負荷要因をキーに、降順に並べたリストから構成される順序804から成る。
 図9は、制御情報の例である。本例は、CPUの負荷を監視対象にした場合を例にして説明する。本システムの運用上、一時的に記録する項目を記録するレコードである記録項目901と、記録項目に該当する内容を記録するレコードである記録内容902からなる。また、本例の場合は、以下の様な内容が、記録項目901に登録される。負荷最小のCPU名称を記録するカラム負荷最小のCPU903と、2番目に負荷が低いCPUの名称を記録するカラム2番目に負荷が低いCPU904と、余剰CPUリソースの量を記録すカラム余剰CPUリソース905と、トレーサが動作しているか、停止しているかの状態を表すカラムトレーサ動作状態906からなる。
 図10は、制御リストの例である。本例は、CPUの負荷を監視対象にした場合を例にして説明する。制御する順番を記録するカラムである制御順序1001と、制御を実施する対象であるプロセスの番号を記録するカラムである対象プロセス1002と、制御対象のプロセスがそれまで動作していたCPU名称を記録するカラムである移動前CPU1003と、制御対象のプロセスを移動させる先のCPU名称を記録する移動先CPU名称1004からなる。
 実施例1では、マルチコアのCPUの使用率を例に説明したが、同様にメモリリソースを監視して、トレーサの制御を実施しても構わない。例えばOSがLinuxの場合は、実施例1と同様にメモリサイズの情報を取得することが可能であり、メモリのサイズをトリガーにトレーサの起動終了・停止が可能である。
 図11に示すように、リソース監視装置1112や、システム制御装置1113はハードウェア等で実装され、OSに含まれなくても構わない。
 図1のリソース監視機構112、トレーサ113、システム制御機構114は、OSの内部に含まれていない、OS上で動作するアプリケーションとして実装されていても構わない。また、トレース統合制御機構115は、OSの機能として実装されていても構わない。
 図7で示したスケジューリングアルゴリズムは、一般的なスケジューリングアルゴリズムを実装しても構わない。例えば、動的計画法等の最適化アルゴリズムを採用して、負荷の最適化をしてプロセスを配分してもよい。また、図7では、負荷最小のCPUから、次に負荷の低いCPUに対し、負荷の大きいプロセスから移動させ、移動の都度2番目に負荷の低いCPUをさがし、処理を継続することで、トレーサを動作させるCPU以外の負荷を平均化させる様にしているが、個別計測結果400の項目の一つである平均408と、最大値409を利用し、平均と最大値の差を評価し、差がユーザの定義した値より小さい物とならば、トレーサを共存可能とすることで、更にトレーサの停止する期間を短縮しても構わない。
 本発明は、複数のCPUやCPUコアを持つ計算機システムにおいて、プログラム動作履歴(トレース)を収集するトレースシステムとして利用される。
101:CPU
102、103、104、105:コア
106:OS
107:メモリ
108:メモリコントローラ
109:補助記憶装置
110:I/Oコントローラ
111:システムバス
112:リソース監視機構
113:トレーサ
114:システム制御機構
115:トレース統合制御機構
116:リソース監視機構

Claims (6)

  1. マルチコアCPUを持つシステム、マルチCPUで実現される計算機システム上で、ソフトウェアトレーサを用いてトレースを実施するトレースシステムにおいて、上記システムのリソースを監視するリソース監視機構と、上記コア間、上記CPU間を跨いでプロセスの実行場所を制御するシステム制御機構と、上記リソース監視機構が取得した情報を元に、アプリケーションの負荷が無いコアを作るためのプロセススケジューリングを実施し、そのスケジュールの実行制御と、トレーサの実行制御をするトレース統合制御機構を持つことを特徴とするトレースシステム。
  2. 請求項1記載のトレースシステムにおいて、動作中の上記プロセススケジューリングを実施するに際し、CPU負荷を平均的に割り当てるようスケジューリングすることを特徴とするトレースシステム。
  3. 請求項1記載のトレースシステムにおいて、平均処理負荷と、最大負荷を用い、上記最大負荷と平均処理負荷の差がユーザが定義した値より小さい物をトレーサと同時に動作させることを特徴とするトレースシステム。
  4. 請求項1記載のトレースシステムにおいて、上記リソース監視機構、上記システム制御機構、上記トレース統合制御機構が、OSに組み込まれることを特徴とするトレースシステム。
  5. 請求項1記載のトレースシステムにおいて、上記リソース監視機構、上記システム制御機構、上記トレース統合制御機構が、OSに組み込まれないことを特徴とするトレースシステム。
  6. 請求項1記載のトレースシステムにおいて、上記リソース監視機構、上記システム制御機構がハードウェアによって実現され、上記トレーサと上記トレース統合制御機構が、ソフトウェアで実現されることを特徴とするトレースシステム。
PCT/JP2011/003770 2010-07-06 2011-07-01 トレースシステム WO2012004954A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010153535A JP5470177B2 (ja) 2010-07-06 2010-07-06 トレースシステム
JP2010-153535 2010-07-06

Publications (1)

Publication Number Publication Date
WO2012004954A1 true WO2012004954A1 (ja) 2012-01-12

Family

ID=45440948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/003770 WO2012004954A1 (ja) 2010-07-06 2011-07-01 トレースシステム

Country Status (2)

Country Link
JP (1) JP5470177B2 (ja)
WO (1) WO2012004954A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9460133B2 (en) 2012-06-26 2016-10-04 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data management apparatus, data management method and data management program
US9684517B2 (en) 2013-10-31 2017-06-20 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. System monitoring and debugging in a multi-core processor system
US9710537B2 (en) 2012-06-26 2017-07-18 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data collection system and data collection system program
US10055477B2 (en) 2012-06-26 2018-08-21 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data collection apparatus and data collection program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103988137B (zh) * 2012-06-26 2016-09-07 东芝三菱电机产业系统株式会社 数据收集系统、数据收集装置、以及数据收集方法
JP5902597B2 (ja) 2012-10-10 2016-04-13 株式会社東海理化電機製作所 電子キー登録システム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11202988A (ja) * 1998-01-13 1999-07-30 Hitachi Ltd システム消費電力制御方法
JP2000148533A (ja) * 1998-11-12 2000-05-30 Nec Corp マルチプロセッサシステムで用いられるトレース方法及びトレース装置
JP2005100387A (ja) * 2003-09-02 2005-04-14 Toshiba Corp 計算機システム及びクラスタシステム用プログラム
JP2006113828A (ja) * 2004-10-15 2006-04-27 Hitachi Ltd 作業負荷管理可能なクラスタシステム

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7529822B2 (en) * 2002-05-31 2009-05-05 Symantec Operating Corporation Business continuation policy for server consolidation environment
JP4370313B2 (ja) * 2006-07-10 2009-11-25 三菱電機株式会社 制御装置、制御装置のプロセス制御方法およびプロセス制御プログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11202988A (ja) * 1998-01-13 1999-07-30 Hitachi Ltd システム消費電力制御方法
JP2000148533A (ja) * 1998-11-12 2000-05-30 Nec Corp マルチプロセッサシステムで用いられるトレース方法及びトレース装置
JP2005100387A (ja) * 2003-09-02 2005-04-14 Toshiba Corp 計算機システム及びクラスタシステム用プログラム
JP2006113828A (ja) * 2004-10-15 2006-04-27 Hitachi Ltd 作業負荷管理可能なクラスタシステム

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9460133B2 (en) 2012-06-26 2016-10-04 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data management apparatus, data management method and data management program
US9710537B2 (en) 2012-06-26 2017-07-18 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data collection system and data collection system program
US10055477B2 (en) 2012-06-26 2018-08-21 Toshiba Mitsubishi-Electric Industrial Systems Corporation Data collection apparatus and data collection program
US9684517B2 (en) 2013-10-31 2017-06-20 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. System monitoring and debugging in a multi-core processor system

Also Published As

Publication number Publication date
JP2012018438A (ja) 2012-01-26
JP5470177B2 (ja) 2014-04-16

Similar Documents

Publication Publication Date Title
US10810051B1 (en) Autoscaling using file access or cache usage for cluster machines
Jeon et al. Analysis of {Large-Scale}{Multi-Tenant}{GPU} clusters for {DNN} training workloads
Venkataraman et al. The power of choice in {Data-Aware} cluster scheduling
WO2012004954A1 (ja) トレースシステム
Chen et al. Improving MapReduce performance using smart speculative execution strategy
CN100388210C (zh) 通过硬件资源利用报告优化性能的方法和数据处理系统
EP3201771A1 (en) Apparatus and method for scheduling distributed workflow tasks
CN104516475A (zh) 用于管理多核片上系统上的全局芯片功率的方法和装置
US20210081248A1 (en) Task Scheduling
WO2012154177A1 (en) Varying a characteristic of a job profile relating to map and reduce tasks according to a data size
JP2020194524A (ja) アクセスリクエストを管理するための方法、装置、デバイス、および記憶媒体
Wang et al. Design and implementation of an analytical framework for interference aware job scheduling on apache spark platform
Mon et al. Clustering based on task dependency for data-intensive workflow scheduling optimization
US20150026694A1 (en) Method of processing information, storage medium, and information processing apparatus
Yang et al. Improving Spark performance with MPTE in heterogeneous environments
Baresi et al. Fine-grained dynamic resource allocation for big-data applications
Fu et al. Optimizing speculative execution in spark heterogeneous environments
Rajan et al. Designing self-tuning split-map-merge applications for high cost-efficiency in the cloud
JP6477260B2 (ja) アプリケーションを実行する方法及びリソースマネジャ
KR102195886B1 (ko) 분산 처리 시스템 및 이의 동작 방법
US11416310B2 (en) Resolving cluster computing task interference
JP5692355B2 (ja) コンピュータシステム、制御システム、制御方法および制御プログラム
Bawankule et al. A classification framework for straggler mitigation and management in a heterogeneous Hadoop cluster: A state-of-art survey
Sudarsan et al. Design and performance of a scheduling framework for resizable parallel applications
Upadhyay et al. An Efficient Speculative Task Detection Algorithm for MapReduce Schedulers

Legal Events

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

Ref document number: 11803294

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11803294

Country of ref document: EP

Kind code of ref document: A1