@@ -6,30 +6,34 @@ rate_array=(0.7)
6
6
7
7
# Result file
8
8
result_file=" benchmark_results.txt"
9
- echo " Benchmark Results" > $result_file
10
- echo " ===================" >> $result_file
9
+ {
10
+ echo " Benchmark Results"
11
+ echo " ==================="
12
+ } > $result_file
11
13
12
14
# Loop through all combinations
13
15
for concurrency in " ${concurrency_array[@]} " ; do
14
16
for rate in " ${rate_array[@]} " ; do
15
17
echo " Testing with concurrency=$concurrency , rate=$rate "
16
- echo " " >> $result_file
17
- echo " Concurrency: $concurrency , Request Rate: $rate " >> $result_file
18
- echo " -------------------" >> $result_file
18
+ {
19
+ echo " "
20
+ echo " Concurrency: $concurrency , Request Rate: $rate "
21
+ echo " -------------------"
22
+ } >> " $result_file "
19
23
20
24
# Run benchmark test
21
25
python /mnt/deepseek/vllm/benchmarks/benchmark_serving.py \
22
26
--backend vllm \
23
27
--trust-remote-code \
24
28
--model auto \
25
- --tokenizer /mnt/deepseek/DeepSeek-R1-W8A8-VLLM \
29
+ --tokenizer /mnt/deepseek/DeepSeek-R1-W8A8-VLLM \
26
30
--dataset-name random \
27
31
--random-input-len 4096 \
28
32
--random-output-len 1536 \
29
33
--ignore-eos \
30
34
--num-prompts 400 \
31
- --max-concurrency $concurrency \
32
- --request-rate $rate \
35
+ --max-concurrency " $concurrency " \
36
+ --request-rate " $rate " \
33
37
--metric-percentiles 90 \
34
38
--base-url http://localhost:8006 2>&1 | tee -a $result_file
35
39
@@ -38,15 +42,14 @@ for concurrency in "${concurrency_array[@]}"; do
38
42
done
39
43
done
40
44
41
- # Analyze results
42
- echo " Analysis Results" > analysis_results.txt
43
- echo " =================" >> analysis_results.txt
44
-
45
- # Extract and analyze TPOT data
46
- echo " TPOT Analysis:" >> analysis_results.txt
47
- grep " Mean TPOT" $result_file | awk -F' :' ' {
45
+ {
46
+ echo " Analysis Results"
47
+ echo " ================="
48
+ echo " TPOT Analysis:"
49
+ grep " Mean TPOT" " $result_file " | awk -F' :' ' {
48
50
printf "Concurrency %s, Rate %s: %s ms\n", $1, $2, $3
49
- }' >> analysis_results.txt
51
+ }'
52
+ } > analysis_results.txt
50
53
51
54
# Extract and analyze throughput data
52
55
echo -e " \nThroughput Analysis:" >> analysis_results.txt
0 commit comments