Changes between Version 5 and Version 6 of Haizea_sim


Ignore:
Timestamp:
Jan 20, 2010, 10:28:33 AM (14 years ago)
Author:
rock
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Haizea_sim

    v5 v6  
    1515 * 以下面範例來解說 option,便是'''『模擬』''' '''2006-11-25 下午1點'''開始執行任務在 '''4台有1顆CPU 和1G Ram 的機器'''上執行 ([simulation]->屬性名稱,startime、resources->屬性細部設定)
    1616{{{
     17#!sh
    1718[simulation]
    1819starttime: 2006-11-25 13:00:00
     
    2627|| 而 Tracefile 便是在 Haizea Configuration File 中的 [tracefile] 屬性指定||
    2728{{{
     29#!sh
    2830[tracefile]
    2931tracefile: /usr/share/haizea/traces/sample.lwf
     
    3133 * 此 Tracefile 範例檔的格式為 LWF/Lease Workload Format (類似 XML 的格式)
    3234{{{
     35#!sh
    3336<lease-workload name="sample">
    3437        <description>
     
    5760----
    5861= 【2.開始模擬】 =
    59 ||現在我們以撰寫好 configuration 和 tracefile,便可透過以下指令開始執行模擬 (參數 -c 為指定設定檔)||
     62||現在我們使用已寫好的範例 configuration(sample_trace.conf) 和 tracefile(sample.lwf),便可透過haizea 指令開始執行模擬 (參數 -c 為指定設定檔)||
     63== 【2.1 範例一】 ==
    6064{{{
    6165haizea -c /usr/share/haizea/etc/sample_trace.conf
     66[2006-11-25 13:00:00.00] RM      Starting resource manager
     67[2006-11-25 13:00:00.00] TFILE   Loading tracefile /usr/share/haizea/traces/sample.lwf
     68[2006-11-25 13:00:00.00] TFILE   Loaded workload with 0 requests ()
     69[2006-11-25 13:00:00.00] CLOCK   Starting simulated clock
     70[2006-11-25 13:00:00.00] CLOCK   Simulated clock has stopped
     71[2006-11-25 13:00:00.00] RM      Stopping resource manager gracefully...
     72[2006-11-25 13:00:00.00] RM      --- Haizea status summary ---
     73[2006-11-25 13:00:00.00] RM      Number of leases (not including completed): 0
     74[2006-11-25 13:00:00.00] RM      Completed leases: 0
     75[2006-11-25 13:00:00.00] RM      ---- End summary ----
     76
    6277}}}
     78 * 此結果輸出主要有三類:'''RM'''(Resource Manager)、'''TFILE'''(!TraceFile)、'''CLOCK'''
     79   * RM      Starting resource manager:啟動資源管理者
     80   * TFILE   Loading tracefile /usr/share/haizea/traces/sample.lwf:載入 tracefile
     81   * TFILE   Loaded workload with 0 requests ():此範例檔並無租約要求
     82   * CLOCK   Starting simulated clock:開始模擬的 clock
     83   * CLOCK   Simulated clock has stopped:停止模擬的 clock
     84
     85== 【2.2 範例一之版本1】 ==
     86 * 現在我們修改 !TraceFile (將註解的第18行和第34行打開)
     87{{{
     88#!sh
     8919         <lease-request arrival="00:00:00">
     9020         <lease preemptible="true">
     9121                 <nodes>
     9222                         <node-set numnodes="1">
     9323                                 <res type="CPU" amount="100"/>
     9424                                 <res type="Memory" amount="1024"/>
     9525                         </node-set>
     9626                 </nodes>       
     9727                 <start></start>
     9828                 <duration time="01:00:00"/>
     9929         <software>
     10030           <disk-image id="foobar.img" size="1024"/>
     10131         </software>
     10232         </lease>
     10333         </lease-request>
     104}}}
     105 * 再執行它
     106{{{
     107haizea -c /usr/share/haizea/etc/sample_trace.conf
     108[2006-11-25 13:00:00.00] RM      Starting resource manager
     109[2006-11-25 13:00:00.00] TFILE   Loading tracefile /usr/share/haizea/traces/sample.lwf
     110[2006-11-25 13:00:00.00] TFILE   Loaded workload with 1 requests (1 Best-effort)
     111[2006-11-25 13:00:00.00] CLOCK   Starting simulated clock
     112[2006-11-25 13:00:00.00] LSCHED  Lease #1 has been requested.
     113[2006-11-25 13:00:00.00] LSCHED  Lease #1 has been marked as pending.
     114[2006-11-25 13:00:00.00] LSCHED  Queued best-effort lease request #1, 1 nodes for 01:00:00.00.
     115[2006-11-25 13:00:00.00] LSCHED  Next request in the queue is lease 1. Attempting to schedule...
     116[2006-11-25 13:00:00.00] VMSCHED Lease #1 has been scheduled on nodes [1] from 2006-11-25 13:00:00.00 to 2006-11-25 14:00:00.00
     117[2006-11-25 13:00:00.00] VMSCHED Started VMs for lease 1 on nodes [1]
     118[2006-11-25 14:00:00.00] VMSCHED Stopped VMs for lease 1 on nodes [1]
     119[2006-11-25 14:00:00.00] VMSCHED Lease 1's VMs have shutdown.
     120[2006-11-25 14:00:00.00] CLOCK   Simulated clock has stopped
     121[2006-11-25 14:00:00.00] RM      Stopping resource manager gracefully...
     122[2006-11-25 14:00:00.00] RM      --- Haizea status summary ---
     123[2006-11-25 14:00:00.00] RM      Number of leases (not including completed): 0
     124[2006-11-25 14:00:00.00] RM      Completed leases: 1
     125[2006-11-25 14:00:00.00] RM      ---- End summary ----
     126}}}
     127 * 兩個 CLOCK 之間多了LSCHED(租約排程) 和 VMSCHED(VM排程)
     128    * LSCHED  Lease !#1 has been requested.
     129    * LSCHED  Lease !#1 has been marked as pending.
     130    * LSCHED  Queued best-effort lease request !#1, 1 nodes for 01:00:00.00.
     131    * LSCHED  Next request in the queue is lease 1. Attempting to schedule...
     132    * VMSCHED Lease !#1 has been scheduled on nodes ![1] from 2006-11-25 13:00:00.00 to 2006-11-25 14:00:00.00
     133    * VMSCHED Started VMs for lease 1 on nodes ![1]
     134    * VMSCHED Stopped VMs for lease 1 on nodes ![1]
     135    * VMSCHED Lease 1's VMs have shutdown.
     136== 【2.2 範例一之版本2】 ==
     137
    63138[[BR]]