(Click to open topic with navigation)
To prepare for Moab simulation
# moab.cfg RMCFG[simcluster] TYPE=native CLUSTERQUERYURL=file:///home/user1/moabsim/etc/sim.nodes
# moab.cfg SIMWORKLOADTRACEFILE sim.jobs
Parameters which modify workload specification, queueing, and job management within the simulation are included in the table below.
Parameter | Description |
---|---|
SIMINITIALQUEUEDEPTH | Specifies simulation backlog. |
SIMJOBSUBMISSIONPOLICY | Specifies how simulation backlog is managed. |
SIMPURGEBLOCKEDJOBS | Removes jobs that can never run. |
SIMWORKLOADTRACEFILE | Specifies source of job traces. |
The table below contains parameters which modify simulation time management.
Parameter | Description |
---|---|
SIMEXITITERATION | Specifies simulation backlog. |
RMPOLLINTERVAL | Specifies the duration (in seconds) of the simulation tme step. |
SIMPURGEBLOCKEDJOBS | Removes jobs that can never run. |
SIMWORKLOADTRACEFILE | Specifies source of job traces. |
Parameter | Description |
---|---|
SIMFLAGS | Specifies modifications to how the simulation loads and creates jobs from the simulation job trace. |
This section explains how to run a sample Moab simulation.
To run the sample Moab simulation
A sample simulation can be run using the sample simulation traces included with the Moab package. While mastering simulations may take some time, initial configuration is straightforward. To start, edit the moab.cfg file and do the following: Change the SCHEDCFG attribute MODE to SIMULATION.Once SIMULATION is set, the following parameters control the environment, behavior, and policies used within the simulation:
Parameter | Description |
---|---|
SIMINITIALQUEUEDEPTH | Specifies source of job traces. |
Parameter | Description |
---|---|
SIMAUTOSHUTDOWN | Shuts down when all jobs have been scheduled. |
SIMSTARTTIME | Sets simulation clock to specified time. |
STOPITERATION | Pauses simulation on specified iteration. |
# moab.cfg SCHEDCFG[clusterA] SERVER=mgmt.mydomain:42559 MODE=SIMULATION SIMWORKLOADTRACEFILE samples/workload.testcluster.txt RMCFG[simcluster] TYPE=native CLUSTERQUERYURL=file:///home/user1/moabsim/etc/sim.nodes STOPITERATION 0 SIMAUTOSHUTDOWN false SIMPURGEBLOCKEDJOBS true REJECTINFEASIBLEJOBS true RECORDEVENTLIST jobend
The first two lines specify that the scheduler should run in simulation mode and use the referenced resource and workload trace files. In addition, leaving the STOPITERATION parameter at zero indicates that Moab should stop before the first scheduling iteration and wait for further instructions. If you want the simulation to run as soon as you start Moab, remove (or comment out) this line. To continue scheduling, run the mschedctl -r command.
The second set of parameters is helpful if you want to generate charts or reports from Moab Cluster Manager. Since events in the workload trace may reference credentials that are not listed in your moab.cfg file, set CREDDISCOVERY to true, which allows Moab to create simulated credentials for credentials that do not yet exist. Setting SIMAUTOSHUTDOWN to false prevents Moab from terminating after it has finished running all the jobs in the workload trace, and it allows you to generate charts after all the simulated jobs have finished. Ensure that SIMSTARTTIME is set to the epoch time (in seconds) of the first event in your workload trace file. This causes the internal clock in Moab to be set to the workload trace's first event, which prevents issues caused by the difference between the time the workload trace was created and the time reported by the CPU clock. Otherwise, Moab thinks the current time is the time that the CPU clock reports, yet simulated jobs that are reported by showq as currently running will really be running at the time the workload trace was created. To avoid confusion, set the SIMSTARTTIME. The lines that specify ENABLEPROFILING is true are necessary for Moab to keep track of the statistics generated by the simulated jobs. Not setting these lines will cause charts and reports to contain all zero values.
As with production execution, Moab simulation is started by issuing the command moab. In simulation mode, Moab does not daemonize itself and so will not background itself. If desired, Moab simulations can be started with the Moab daemon in the background using 'moab &'.
When starting a simulation, a few considerations:
Verification of proper operation is possible using any common user command such as showq. If the showq command is run, it will display the number of jobs currently in the scheduler's queue. The jobs displayed by the showq command are taken from the workload trace file specified earlier and those that are marked as running are running on resources described in the resource trace file. At any point, a detailed summary of available resources may be obtained by running the mdiag -n command. To determine the current simulation time, issue the showstats -v command.
At any point, a Moab simulation can be shut down using the command mschedctl -k. This will terminate the simulation and write out final performance statistics into the Moab log file.