Skip to content

Commit 4dcebbb

Browse files
authored
Merge pull request #516 from Suneeth-D/will_it_scale
Enhance sysinfo.sh to include nr_cores in LLC domain
2 parents baa5b10 + b300747 commit 4dcebbb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

distro/adaptation/centos/9

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ python3-hid: python3-hidapi
4242
python3-mako: python-pyramid-mako
4343
python3-markupsafe: python34-markupsafe
4444
python3-minimal: python3
45+
python-minimal: python3
4546
python3-nose:
4647
python3-openssl: python3-pyOpenSSL
4748
python3-pkg-resources:

lib/sysinfo.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ setup_threads_to_iterate()
77

88
local threads_per_core
99
local cores_per_node
10+
local cores_per_llc
11+
local nr_l3
12+
local nr_l2
1013
threads_per_core=$(lscpu | awk '/Thread\(s\) per core:/ { print $4 }')
14+
nr_l3=$(lscpu | grep 'L3' | awk -F '[()]' '{print $2}' | awk '{print $1}')
15+
nr_l2=$(lscpu | grep 'L2' | awk -F '[()]' '{print $2}' | awk '{print $1}')
16+
cores_per_llc=$((nr_l2 / nr_l3))
1117
cores_per_node=$((nr_cpu / nr_node / threads_per_core))
1218

1319
# [ 0.000000] Intel MultiProcessor Specification v1.4
@@ -24,7 +30,7 @@ setup_threads_to_iterate()
2430
local i
2531
for i in $(seq $nr_node)
2632
do
27-
threads_to_iterate="${threads_to_iterate} $((i * cores_per_node))"
33+
threads_to_iterate="${threads_to_iterate} ${cores_per_llc} $((i * cores_per_node))"
2834
done
2935

3036
[ "$nr_cpu" -ge 4 ] && {

0 commit comments

Comments
 (0)