Skip to content

Commit

Permalink
Merge pull request #27 from redhat-performance/documentation
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
dvalinrh authored Jul 11, 2023
2 parents a01064b + 7fa2c80 commit f590ce4
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 5 deletions.
60 changes: 58 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
# streams
Wrapper for running the streams test.
Automation wrapper for streams

Description:
This wrapper runs the streams program written by
John D. McCalpin
Joe R. Zagar
The program being executed, measures memory transfer
rates in MB/s and provides a rough idea of memory rates
of the machine. However it is a bit outdated
and does not deal with numa.

Location of underlying workload: part of the github kit

Packages required: gcc,bc

To run:
```
[root@hawkeye ~]# git clone https://github.com/redhat-performance/streams-wrapper
[root@hawkeye ~]# streams-wrapper/streams/streams_run
```

The script will set the buffer sizes based on the hardware it is being executed on.

```
Options
--cache_multiply <value>: Multiply cache sizes by <value>. Default is 2
--cache_start_factor <value>: Start the cache size at base cache * <value>
Default is 1
--cache_cap_size <value>: Caps the size of cache to this value. Default is no cap.
--nsizes <value>: Maximum number of cache sizes to do. Default is 4
--opt2 <value>: If value is not 0, then we will run with optimization level
2. Default value is 1
--opt3 <value>: If value is not 0, then we will run with optimization level
3. Default value is 1
--result_dir <string>: Directory to place results into. Default is
results_streams_tuned_<tuned using>_<date>
--size_list <x,y...>: List of array sizes in byte
--threads_multiple <value>: Multiply number threads by <value>. Default is 2
--tools_git <value>: git repo to retrieve the required tools from, default is https://github.com/redhat-performance/test_tools-wrappers
General options
--home_parent <value>: Our parent home directory. If not set, defaults to current working directory.
--host_config <value>: default is the current host name.
--iterations <value>: Number of times to run the test, defaults to 1.
--pbench: use pbench-user-benchmark and place information into pbench, defaults to do not use.
--pbench_user <value>: user who started everything. Defaults to the current user.
--pbench_copy: Copy the pbench data, not move it.
--pbench_stats: What stats to gather. Defaults to all stats.
--run_label: the label to associate with the pbench run. No default setting.
--run_user: user that is actually running the test on the test system. Defaults to user running wrapper.
--sys_type: Type of system working with, aws, azure, hostname. Defaults to hostname.
--sysname: name of the system running, used in determining config files. Defaults to hostname.
--tuned_setting: used in naming the tar file, default for RHEL is the current active tuned. For non
RHEL systems, default is none.
--usage: this usage message.
```

Note: The script does not install pbench for you. You need to do that manually.
19 changes: 16 additions & 3 deletions streams/streams_run
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
arguments="$@"

curdir=`pwd`

if [[ $0 == "./"* ]]; then
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
if [[ $chars == 1 ]]; then
Expand All @@ -28,9 +29,15 @@ if [[ $0 == "./"* ]]; then
run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
run_dir="${curdir}${run_dir}"
fi
elif [[ $0 != "/"* ]]; then
dir=`echo $0 | rev | cut -d'/' -f2- | rev`
run_dir="${curdir}/${dir}"
else
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
run_dir=`echo $0 | cut -d'/' -f 1-${chars}`
if [[ $run_dir != "/"* ]]; then
run_dir=${curdir}/${run_dir}
fi
fi

test_name="streams"
Expand All @@ -39,7 +46,7 @@ test_name="streams"
#
size_list="0"
opt_three=1
opt_two=1
opt_two=0
cache_multiply=2
nsizes=4
cache_start_factor=1
Expand Down Expand Up @@ -174,15 +181,21 @@ retrieve_line()
items=0
calc_line=""

info=`grep "${search_for}" ${file}* | tr -s " " | sed "s/ /:/g" | cut -d: -f 3`
numb_files=`ls ${file}* | wc -w`
if [ $numb_files -ne 1 ]; then
cut_field=4
else
cut_field=3
fi
info=`grep "${search_for}" ${file}* | tr -s " " | sed "s/ /:/g" | cut -d: -f $cut_field`

for i in $info; do
if [ $items -eq 0 ]; then
calc_line="("${calc_line}${i}
else
calc_line=${calc_line}"+"${i}
fi
let items="${items}+1"
let items="${items}+1"
done
calc_line=$calc_line")/"$items
out_line=$out_line":"`echo $calc_line | bc`
Expand Down

0 comments on commit f590ce4

Please sign in to comment.