Skip to content
Snippets Groups Projects
Verified Commit 54ac1ecc authored by Andrei Plamada's avatar Andrei Plamada
Browse files

fix

parent 45409ce6
No related branches found
No related tags found
No related merge requests found
......@@ -28,12 +28,12 @@ The aim of this guide is to introduce techniques to that will help to:
- measure the total execution time of your application
- understand your code performance by examining the system utilization (CPU and Memory)
- find the bottlenecks by measure the runtime and memory usage of isolated piece of code (Python/R)
- find the bottlenecks by measure the runtime and memory usage of an isolated piece of code (Python/R)
- avoid common pitfalls in assessing the performance on various systems
- use Slurm to understand the resource usage of your jobs (running or completed)
- optimize the cost
## Benchmarking I
## Benchmarking
Benchmarking the code means evaluating the execution time.
......@@ -263,7 +263,7 @@ For currently running jobs, you can use [`squeue`](https://slurm.schedmd.com/squ
With the job ID for your currently running job, you can run [`sstat`](https://slurm.schedmd.com/sstat.html).
```bash
sstat --all --format JobID,NTasks,MaxRSS,MinCPU,AveCPU -j <jobid>
$ sstat --all --format JobID,NTasks,MaxRSS,MinCPU,AveCPU -j <jobid>
```
_hint_: add [`watch`](https://manpages.ubuntu.com/manpages/latest/en/man1/watch.1.html) before `sstat` for automatic refreshing
......@@ -271,7 +271,7 @@ _hint_: add [`watch`](https://manpages.ubuntu.com/manpages/latest/en/man1/watch.
While a job runs you can also use `scontrol` to check what resources Slurm has allocated along with other important details of your job.
```bash
scontrol show job <jobid>
$ scontrol show job <jobid>
```
### Completed jobs
......@@ -279,13 +279,13 @@ scontrol show job <jobid>
To find job IDs for jobs that have stopped running, use [`sacct`](https://slurm.schedmd.com/sacct.html), and in this example, my user's jobs from the last 30 days:
```bash
sacct -u $USER -S `date --date="-30 days" +%Y-%m-%d` -X -o jobid,jobname,start,end,elapsed,state
$ sacct -u $USER -S `date --date="-30 days" +%Y-%m-%d` -X -o jobid,jobname,start,end,elapsed,state
```
From the first column, select a job ID for a job. A job that ran for longer may be easier to understand, so if you have one, choose a job with a longer elapsed time.
```bash
sacct --format=jobid,ReqMem,MaxRSS,MaxVMSize,Elapsed,AllocCPU,SystemCPU,UserCPU -j 5164983
$ sacct --format=jobid,ReqMem,MaxRSS,MaxVMSize,Elapsed,AllocCPU,SystemCPU,UserCPU -j <jobid>
```
The value for `CPUTime` is `NCPUS * Elapsed`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment