Skip to content

Commit 79521cc

Browse files
authored
Merge pull request #5 from intel/6.13-rc1-changes
Changes to run with 6.13-rc1 kernel baseline and other changes to add…
2 parents 5ade50d + 4636b54 commit 79521cc

12 files changed

+1466
-27
lines changed

tests/madvise/collect_all.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/madvise/collect_batch.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
#SPDX-License-Identifier: BSD-3-Clause
3+
#Copyright (c) 2025, Intel Corporation
4+
#Description: Top level script for collect datapoints for IAA batching
5+
6+
#
7+
# select the number of IAA devices
8+
iaa_devices=4
9+
preserve_logs=0
10+
11+
while getopts "hd:p:" arg; do
12+
case $arg in
13+
h)
14+
echo "./collect_batch [-d <iaa_devices_per_socket>] [-p <1/0>]"
15+
echo "Example: ./collect_batch -d 1 -p 1. 1 IAA device_per_socket and preserve intermediate results"
16+
exit
17+
;;
18+
d)
19+
iaa_devices=$OPTARG
20+
;;
21+
p)
22+
preserve_logs=$OPTARG
23+
;;
24+
esac
25+
done
26+
27+
# Configure IAA
28+
./enable_kernel_iaa.sh 0 1 ${iaa_devices} 8 2 async
29+
# Configure zswap and zram.
30+
./enable_zswap.sh
31+
# swap disk can be used instead of zram. However, zram will avoid any disk access overheads
32+
./enable_zram.sh
33+
34+
35+
# Install bpftrace if it is not available
36+
if [ ! -f /usr/bin/bpftrace ]; then
37+
echo "Installing bpftrace..."
38+
install bpftrace -y || handle_error "Failed to install bpftrace"
39+
fi
40+
41+
# Run batch sweeps for (de)compression batching
42+
./collect_cbatch.sh ${preserve_logs} | tee cb_silesia.txt
43+
./collect_dbatch.sh ${preserve_logs} | tee db_silesia.txt
44+
45+
# Generate report
46+
echo -e "\n*** SWAP_OUT_BATCH_SUMMARY ****\n"
47+
grep swap_out cb_silesia.txt
48+
echo -e "\n*** SWAP_IN_SUMMARY ****\n"
49+
grep swap_in db_silesia.txt
50+
51+
52+
# Preserve the logs or clear them as needed.
53+
if [ "${preserve_logs}" == "1" ]; then
54+
echo -e "\nSaving temporary logs for debugging purposes"
55+
else
56+
echo -e "\nRemoving all the temporary logs"
57+
rm -f cb_silesia.txt db_silesia.txt
58+
fi
59+

tests/madvise/collect_cbatch.sh

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#!/bin/bash
2+
#SPDX-License-Identifier: BSD-3-Clause
3+
#Copyright (c) 2025, Intel Corporation
4+
#Description: Collect data for compression batching
5+
# The first part sweeps across different batch configurations for deflate-iaa and
6+
# the second part focuses on the software compressors
7+
8+
9+
# process arguments
10+
preserve_logs=${1:-0};shift
11+
12+
# Select deflate-iaa as the default compressor mode.
13+
# change this to other compressor modes as needed.
14+
comp_list=("deflate-iaa")
15+
dataset_list=("silesia.tar")
16+
freq_list=("2000" )
17+
cbatch_list=("1" "2" "4" "8" "16" "32")
18+
dbatch_list=("0")
19+
# make sure that there are spaces in the comma separated combo selection
20+
#mthp_list=("4kB" "16kB" "64kB" "16kB,32kB,64kB")
21+
mthp_list=("4kB")
22+
23+
# clear old logs for a fresh start
24+
./clear_logs.sh
25+
26+
27+
for freq in "${freq_list[@]}"; do
28+
for dataset in "${dataset_list[@]}"; do
29+
for cbatch in "${cbatch_list[@]}"; do
30+
for dbatch in "${dbatch_list[@]}"; do
31+
for mthp in "${mthp_list[@]}"; do
32+
rm -r run.log
33+
for comp in "${comp_list[@]}"; do
34+
echo "Removing ${comp}_output"
35+
rm -f ${comp}_output
36+
echo $comp > /sys/module/zswap/parameters/compressor
37+
echo "Collecting data for $comp at ${freq}MHz, cbatch ${cbatch}, dbatch ${dbatch}, mthp ${mthp}"
38+
./collect_bpftraces.sh -f ${freq} -t ${dataset} -c ${cbatch} -d ${dbatch} -m ${mthp} | tee -a run.log
39+
done
40+
./process_bpftraces.py | tee -a run.log
41+
mthp_suffix=`echo ${mthp} | tr -d ' ' | tr ',' '_'`
42+
result_dir="result_${freq}_${dataset}_c${cbatch}_d${dbatch}_${mthp_suffix}"
43+
rm -rf ${result_dir}
44+
echo "creating ${result_dir}"
45+
mkdir ${result_dir}
46+
cp *_output ${result_dir}
47+
cp *.html ${result_dir}
48+
cp *.xlsx ${result_dir}
49+
cp perf_* ${result_dir}
50+
cp run.log ${result_dir}
51+
done
52+
done
53+
done
54+
done
55+
done
56+
57+
# Run single batch for software compressors
58+
59+
#comp_list=("lz4" "lzo-rle" "lzo" "zstd")
60+
comp_list=("lz4" "zstd")
61+
cbatch_list=("1")
62+
dbatch_list=("0")
63+
64+
for freq in "${freq_list[@]}"; do
65+
for dataset in "${dataset_list[@]}"; do
66+
for cbatch in "${cbatch_list[@]}"; do
67+
for dbatch in "${dbatch_list[@]}"; do
68+
for mthp in "${mthp_list[@]}"; do
69+
rm -r run.log
70+
for comp in "${comp_list[@]}"; do
71+
echo "Removing ${comp}_output"
72+
rm -f ${comp}_output
73+
echo $comp > /sys/module/zswap/parameters/compressor
74+
echo "Collecting data for $comp at ${freq}MHz, cbatch ${cbatch}, dbatch ${dbatch}, mthp ${mthp}"
75+
./collect_bpftraces.sh -f ${freq} -t ${dataset} -c ${cbatch} -d ${dbatch} -m ${mthp} | tee -a run.log
76+
done
77+
./process_bpftraces.py | tee -a run.log
78+
mthp_suffix=`echo ${mthp} | tr -d ' ' | tr ',' '_'`
79+
result_dir="result_${freq}_${dataset}_c${cbatch}_d${dbatch}_${mthp_suffix}"
80+
rm -rf ${result_dir}
81+
echo "creating ${result_dir}"
82+
mkdir ${result_dir}
83+
cp *_output ${result_dir}
84+
cp *.html ${result_dir}
85+
cp *.xlsx ${result_dir}
86+
cp perf_* ${result_dir}
87+
cp run.log ${result_dir}
88+
done
89+
done
90+
done
91+
done
92+
done
93+
94+
95+
# Preserve the logs or clear them as needed.
96+
if [ "${preserve_logs}" == "1" ]; then
97+
echo "Saving temporary logs for debugging purposes"
98+
else
99+
echo "Removing all the temporary logs"
100+
./clear_logs.sh
101+
fi

tests/madvise/collect_dbatch.sh

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#!/bin/bash
2+
#SPDX-License-Identifier: BSD-3-Clause
3+
#Copyright (c) 2025, Intel Corporation
4+
#Description: Collect data for decompression batching
5+
# The first part sweeps across different batch configurations for deflate-iaa and
6+
# the second part focuses on the software compressors
7+
8+
# process arguments
9+
preserve_logs=${1:-0};shift
10+
11+
# Configuration
12+
# Configure all 4 IAA devices
13+
#./enable_kernel_iaa.sh 0 1 4 8 2 async
14+
# Configgure only 1 IAA device depending on the SKU
15+
./enable_kernel_iaa.sh 0 1 1 8 2 async
16+
# Configure zswap and zram.
17+
# swap disk can be used instead of zram. However, zram will avoid any disk access overheads
18+
./enable_zswap.sh
19+
./enable_zram.sh
20+
21+
comp_list=("deflate-iaa")
22+
dataset_list=("silesia.tar")
23+
freq_list=("2000" )
24+
cbatch_list=("1")
25+
dbatch_list=("0" "1" "2" "3" "4" "5")
26+
# make sure that there are spaces in the comma separated combo selection
27+
#mthp_list=("4kB" "16kB" "64kB" "16kB,32kB,64kB")
28+
mthp_list=("4kB")
29+
30+
# clear old logs for a fresh start
31+
./clear_logs.sh
32+
33+
34+
for freq in "${freq_list[@]}"; do
35+
for dataset in "${dataset_list[@]}"; do
36+
for cbatch in "${cbatch_list[@]}"; do
37+
for dbatch in "${dbatch_list[@]}"; do
38+
for mthp in "${mthp_list[@]}"; do
39+
rm -r run.log
40+
for comp in "${comp_list[@]}"; do
41+
echo "Removing ${comp}_output"
42+
rm -f ${comp}_output
43+
echo $comp > /sys/module/zswap/parameters/compressor
44+
echo "Collecting data for $comp at ${freq}MHz, cbatch ${cbatch}, dbatch ${dbatch}, mthp ${mthp}"
45+
./collect_bpftraces.sh -f ${freq} -t ${dataset} -c ${cbatch} -d ${dbatch} -m ${mthp} | tee -a run.log
46+
done
47+
./process_bpftraces.py | tee -a run.log
48+
mthp_suffix=`echo ${mthp} | tr -d ' ' | tr ',' '_'`
49+
result_dir="result_${freq}_${dataset}_c${cbatch}_d${dbatch}_${mthp_suffix}"
50+
rm -rf ${result_dir}
51+
echo "creating ${result_dir}"
52+
mkdir ${result_dir}
53+
cp *_output ${result_dir}
54+
cp *.html ${result_dir}
55+
cp *.xlsx ${result_dir}
56+
cp perf_* ${result_dir}
57+
cp run.log ${result_dir}
58+
done
59+
done
60+
done
61+
done
62+
done
63+
64+
# Run single batch for software compressors
65+
66+
#comp_list=("lz4" "lzo-rle" "lzo" "zstd")
67+
comp_list=("lz4" "zstd")
68+
cbatch_list=("1")
69+
dbatch_list=("0")
70+
71+
for freq in "${freq_list[@]}"; do
72+
for dataset in "${dataset_list[@]}"; do
73+
for cbatch in "${cbatch_list[@]}"; do
74+
for dbatch in "${dbatch_list[@]}"; do
75+
for mthp in "${mthp_list[@]}"; do
76+
rm -r run.log
77+
for comp in "${comp_list[@]}"; do
78+
echo "Removing ${comp}_output"
79+
rm -f ${comp}_output
80+
echo $comp > /sys/module/zswap/parameters/compressor
81+
echo "Collecting data for $comp at ${freq}MHz, cbatch ${cbatch}, dbatch ${dbatch}, mthp ${mthp}"
82+
./collect_bpftraces.sh -f ${freq} -t ${dataset} -c ${cbatch} -d ${dbatch} -m ${mthp} | tee -a run.log
83+
done
84+
./process_bpftraces.py | tee -a run.log
85+
mthp_suffix=`echo ${mthp} | tr -d ' ' | tr ',' '_'`
86+
result_dir="result_${freq}_${dataset}_c${cbatch}_d${dbatch}_${mthp_suffix}"
87+
rm -rf ${result_dir}
88+
echo "creating ${result_dir}"
89+
mkdir ${result_dir}
90+
cp *_output ${result_dir}
91+
cp *.html ${result_dir}
92+
cp *.xlsx ${result_dir}
93+
cp perf_* ${result_dir}
94+
cp run.log ${result_dir}
95+
done
96+
done
97+
done
98+
done
99+
done
100+
101+
# Preserve the logs or clear them as needed.
102+
if [ "${preserve_logs}" == "1" ]; then
103+
echo "Saving temporary logs for debugging purposes"
104+
else
105+
echo "Removing all the temporary logs"
106+
./clear_logs.sh
107+
fi

0 commit comments

Comments
 (0)