source: drbl-green-benchmark/diskfull-benchmark.sh @ 96

Last change on this file since 96 was 96, checked in by jazz, 15 years ago
  • diskfull-benchmark.sh
    • Benchmark for E2GC2 Paper Test Case 1 (Local Hard Disk)
  • diskless-benchmark.sh
    • Benchmark for E2GC2 Paper Test Case 2 (DRBL Client with Hard Disk installed)
  • Property svn:executable set to *
File size: 3.1 KB
Line 
1#!/bin/bash
2IP_LIST="192.168.100.1 192.168.100.2 192.168.100.4 192.168.100.5 192.168.100.11 192.168.100.12 192.168.100.13 192.168.100.14 192.168.100.21 192.168.100.22 192.168.100.24 192.168.100.25"
3export LANG=en_US
4export LC_ALL=en_US
5log_start=$(date +"%y%m%d-%H%M%S_")
6log_file="/var/log/${log_start}diskfull-benchmark.log"
7status_file="/var/log/${log_start}diskfull-benchmark-status.log"
8echo "0. Rebooting...." > $log_file
9echo "0. Rebooting...."
10/opt/drbl/sbin/dcs -h "$IP_LIST" local 2>&1 > $status_file
11source /home/jazz/.bash_aliases
12up-host-a > /root/.dsh/machines.list
13
14function mydsh()
15{
16  dsh -a -c "date > /var/log/$2.time.$1; /usr/bin/time -o /var/log/$2.time $3; cat /var/log/$2.time >> /var/log/$2.time.$1; date >> /var/log/$2.time.$1" 2>&1 >> $status_file
17}
18
19echo "START diskfull Benchmark ...." >> $log_file
20for ((i=1;i<=1;i++)); do
21  echo "[$i] 1. Booting...." >> $log_file
22  echo "[$i] 1. Booting...."
23  dsh -a -c "reboot" 2>&1 >> $status_file
24  `date >> $log_file`
25  sleep 120
26  dsh -a -c "echo 3 > /proc/sys/vm/drop_caches"
27  echo "[$i] 2. Running dd ...." >> $log_file
28  echo "[$i] 2. Running dd ...."
29  `date >> $log_file`
30  mydsh "$i" "dd" "dd if=/dev/zero of=/root/E2CC.img bs=1M count=500"
31  `date >> $log_file`
32  sleep 120
33  echo "[$i] 3. Running tar ...." >> $log_file
34  echo "[$i] 3. Running tar ...."
35  `date >> $log_file`
36  mydsh "$i" "tar" "tar zcvf /root/E2CC.img.tar.gz /root/E2CC.img"
37  `date >> $log_file`
38  sleep 120
39  echo "[$i] 4. Running bonnie++ ...." >> $log_file
40  echo "[$i] 4. Running bonnie++ ...."
41  `date >> $log_file`
42  mydsh "$i" "bonnie++" "bonnie++ -u root -d /root -s 500"
43  `date >> $log_file`
44  sleep 120
45  echo "[$i] *. Download Kernel ...." >> $log_file
46  echo "[$i] *. Download Kernel ...."
47  mydsh "$i" "download-kernel" "wget -O /tmp/linux-2.6.30.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2"
48  echo "[$i] *. Extract Kernel ...." >> $log_file
49  echo "[$i] *. Extract Kernel ...."
50  mydsh "$i" "extrac-kernel" "tar jxvf /tmp/linux-2.6.30.tar.bz2 -C /tmp"
51  mydsh "$i" "make-allnoconf" "make -C /tmp/linux-2.6.30 allnoconfig"
52  echo "[$i] 5. Running make -j 1 ...." >> $log_file
53  echo "[$i] 5. Running make -j 1 ...."
54  mydsh "$i" "make-clean" "make clean -C /tmp/linux-2.6.30"
55  `date >> $log_file`
56  mydsh "$i" "make-j1" "make -j 1 -C /tmp/linux-2.6.30"
57  `date >> $log_file`
58  sleep 120
59  echo "[$i] 6. Running make -j 2 ...." >> $log_file
60  echo "[$i] 6. Running make -j 2 ...."
61  mydsh "$i" "make-clean" "make clean -C /tmp/linux-2.6.30"
62  `date >> $log_file`
63  mydsh "$i" "make-j2" "make -j 2 -C /tmp/linux-2.6.30"
64  `date >> $log_file`
65  sleep 120
66  echo "[$i] 7. Running make -j 3 ...." >> $log_file
67  echo "[$i] 7. Running make -j 3 ...."
68  mydsh "$i" "make-clean" "make clean -C /tmp/linux-2.6.30"
69  `date >> $log_file`
70  mydsh "$i" "make-j3" "make -j 3 -C /tmp/linux-2.6.30"
71  `date >> $log_file`
72  sleep 120
73  echo "[$i] 8. Running make -j 4 ...." >> $log_file
74  echo "[$i] 8. Running make -j 4 ...."
75  mydsh "$i" "make-clean" "make clean -C /tmp/linux-2.6.30"
76  `date >> $log_file`
77  mydsh "$i" "make-j4" "make -j 4 -C /tmp/linux-2.6.30"
78  `date >> $log_file`
79done
Note: See TracBrowser for help on using the repository browser.