@@ -3,18 +3,18 @@ title: "Slurm Simulator: Micro Cluster Tutorial"
33author : nikolays@buffalo.edu
44date : " `r format(Sys.time(), '%d %B, %Y')`"
55output :
6- github_document :
7- toc : true
8- toc_depth : 4
9- html_preview : false
10- df_print : kable
116 html_document :
127 toc : yes
138 toc_float : yes
149 toc_depth : 4
1510 mathjax : null
1611 css : ../doc.css
1712 df_print : paged
13+ github_document :
14+ toc : true
15+ toc_depth : 4
16+ html_preview : false
17+ df_print : kable
1818editor_options :
1919 markdown :
2020 wrap : 80
@@ -710,9 +710,9 @@ slurmsim -v run_sim -d \
710710
711711## Read Results
712712
713- Because there is a need to handle multiple runs at a same time we have developed
714- a tools which help us with that. ` read_sacct_out_multiple ` will read multiple
715- ` slurm_acct.out ` from simulations with different start time and replicas.
713+ Because we need to handle multiple runs simultaneously, we have developed tools
714+ that help us with that. ` read_sacct_out_multiple ` will read multiple
715+ ` slurm_acct.out ` from simulations with different start times and replicas.
716716
717717``` {r}
718718sacct <- read_sacct_out_multiple(
@@ -758,24 +758,24 @@ plot_grid(
758758)
759759```
760760
761- You can find that even though submit time is same between two realization the
762- start time can be substantially different.
761+ You can find that even though the submit time is the same between two
762+ realizations, the start time can be substantially different.
763763
764- What are the reasons for such behavior? Many Slurm routines are executed in
765- cyclic manner: some will go to sleep for predefined amount of time before
766- repeating the cycle, others will check time to time was a predefined amount of
767- time passed since the last time cycle was started.
764+ What are the reasons for such behavior? Many Slurm routines are executed in a
765+ cyclic manner: some will go to sleep for a predefined amount of time before
766+ repeating the cycle, and others will check from time to time if a predefined
767+ amount of time passed since the last time the cycle was started.
768768
769- For example the function that kills jobs running over the requested walltime,
770- start a new cycle if 30 seconds passed from last run and then it willcheck all
771- jobs. The thread which do the job also do other things so time between checks is
772- not always exact 30 seconds.
769+ For example, the function that kills jobs running over the requested wall time
770+ starts a new cycle if 30 seconds have passed from the last run, and then it will
771+ check all jobs. The thread that does the job also does other things, so the time
772+ between checks is not always exactly 30 seconds.
773773
774- In addition we don't know a-priori. at which stage of these varying stop and
775- start cycles the job submission ended up. So we have to try all different
776- possibilities and report an average behaiviour .
774+ In addition, we don't know apriori at which stage of these varying
775+ stop-and- start cycles the job submission ended up. So we have to try all
776+ different possibilities and report an average behavior .
777777
778- To identify what exactly went different we can use event diagramm :
778+ To identify what exactly went differently we can use event diagram :
779779
780780``` {r events_diagramm}
781781make_events_diagramm(
@@ -784,9 +784,9 @@ make_events_diagramm(
784784)
785785```
786786
787- The event diagram shows most events importent for scheduling. X-axis shows the
788- time, zero correspontd to the submision time of first job. The jobs submit,
789- start and end time are show as horizontal segments and the y-axis correspontd to
787+ The event diagram shows most events important for scheduling. X-axis shows the
788+ time, zero corresponds to the submission time of first job. The jobs submit,
789+ start and end time are show as horizontal segments and the y-axis correspond to
790790job-id. The diagram allow comparison of two simulations the jobs from first one
791791is slightly below the second one. The jobs horizontal segment starts with submit
792792time (grey circle), followed by start time (blue plus if scheduled by main
@@ -805,9 +805,12 @@ numbers. So we need somehow to randomize each run, we are doing it by
805805randomizing the time between the simulation start and the submission of first
806806jobs (relative time between jobs stays the same).
807807
808- Lets get these random start times:
808+ ## Generate Random Start Times Delay
809+
810+ Lets get these random start times delay (additional time between start time of first job and starting time of ` slurmctld ` ):
809811
810812``` {python}
813+ # Note that this is a python chunk
811814# generate random start time for small
812815import numpy as np
813816np.random.seed(seed=20211214)
@@ -817,6 +820,8 @@ start_times = np.random.randint(low=30, high=150, size=10)
817820
818821I got '59 58 99 126 79 89 146 105 114 68'.
819822
823+ ## Run the Similations
824+
820825Now run them all:
821826
822827``` {bash eval=F}
@@ -858,6 +863,9 @@ cp ${WORKLOAD} ${RESULTS_ROOT_DIR}
858863cp ${SACCTMGR_SCRIPT} ${RESULTS_ROOT_DIR}
859864```
860865
866+
867+ ## Read Results
868+
861869``` {r}
862870sacct <- read_sacct_out_multiple(
863871 slurm_mode="test2", # name of simulation
@@ -874,3 +882,23 @@ events_time <- read_events_multiple(
874882 #events_csv="slurmctld_log.csv" # non-standard name of slurmctld_log.csv
875883)
876884```
885+
886+ ## Analyse the Results
887+
888+
889+ ``` {r submit_start2}
890+ plot_grid(
891+ ggplot(sacct, aes(
892+ x=SubmitTime,y=JobRecID))+
893+ geom_point(alpha=0.2),
894+ ggplot(sacct, aes(
895+ x=StartTime,y=JobRecID))+
896+ geom_point(alpha=0.2),
897+ labels = c("A","B"), nrow=2
898+ )
899+ ```
900+ In the plot above the submit time (A) and start time (B) for each job (shown on X-Axis) are overlayed from the ten independent runs. Note that submit times relative to the first job are exactly the same but the start time can be almost deterministic (jobs 1001,1002,1003,1004 and 1009), vary a little (jobs 1005-1008, 1011-1013,1016,1018-1020) or vary a lot (jobs 1010,1014,1015,1017). In lager HPC resources with longer jobs and high resource utilization the starting time difference can be substantial.
901+
902+
903+ Next: [ Medium Cluster Tutorial] (./medium_cluster/` r if(knitr::pandoc_to()=='gfm') "" else "readme.html" ` )
904+
0 commit comments