Skip to content

Commit 291fb81

Browse files
committed
cgroups
1 parent 6743d18 commit 291fb81

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#!/bin/bash
22

3-
dotnet ./PlatformBenchmarks.dll &
4-
dotnet ./PlatformBenchmarks.dll &
5-
dotnet ./PlatformBenchmarks.dll
3+
# Install dependencies
4+
apt-get update \
5+
&& apt-get install -y --no-install-recommends \
6+
cgroup-tools
67

8+
cgcreate -g cpu,cpuset:/cpugroup1
9+
cgcreate -g cpu,cpuset:/cpugroup2
10+
11+
cgset -r cpuset.cpus=0-5 /cpugroup1
12+
cgset -r cpuset.cpus=6-12 /cpugroup2
13+
14+
cgexec -g cpu:/cpugroup1 dotnet ./PlatformBenchmarks.dll &
15+
cgexec -g cpu:/cpugroup2 dotnet ./PlatformBenchmarks.dll
16+
17+
cgdelete -g cpu:/cpugroup1
18+
cgdelete -g cpu:/cpugroup2

0 commit comments

Comments
 (0)