-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modernize examples/plugin_log_task_usage to cgroup v2
- Loading branch information
Showing
3 changed files
with
87 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version 1.1 | ||
# MINIWDL__LOG_TASK_USAGE__PERIOD=2 miniwdl run examples/plugin_log_task_usage/StressTest.wdl --dir /tmp --verbose | ||
task StressTest { | ||
input { | ||
Int cpu = 4 | ||
Int memory_G = 2 | ||
Int cpu_memory_duration_s = 10 | ||
Int disk_load_G = 4 | ||
|
||
String docker = "polinux/stress" # Docker image with stress tool | ||
} | ||
|
||
command <<< | ||
set -euxo pipefail | ||
|
||
stress --cpu 4 --vm 1 --vm-bytes ~{memory_G}G --vm-hang 0 --timeout ~{cpu_memory_duration_s}s || true | ||
dd if=/dev/zero of=testfile bs=1G count=~{disk_load_G} | ||
sync | ||
cat testfile > /dev/null & | ||
sleep 5 | ||
>>> | ||
|
||
runtime { | ||
docker: docker | ||
memory: "${memory_G*2}G" | ||
cpu: cpu | ||
} | ||
|
||
output {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters