根据工作要求,需要对几种虚拟化进行性能测试,把简单的测试方法记录在此:
I/O 性能测试:iozone
[root@Testing
~]# cd /usr/local/src
[root@Testing
src]# tar xvf iozone3_373.tar
[root@Testing
src]# cd iozone3_373/src/current/
[root@Testing
current]# make linux-AMD64
[root@Testing
current]# cp iozone /usr/sbin/
CPU和内存测试:ubench
[root@Testing
src]# tar zxvf ubench-0.32.tar.gz
[root@Testing
src]# cd ubench-0.32
[root@Testing
ubench-0.32]# ./configure
[root@Testing
ubench-0.32]# make && make install
由于程序编译报错,在网上找到一个patch,讲以下内容保存为upatch
在解压目录下执行patch -p0 < /tmp/upatch
打上补丁。主要修改了两个C文件和configure文件。
---
membench.c.old 2008-05-18
21:21:02.000000000 +0800
+++
membench.c 2008-05-18
21:38:20.000000000 +0800
@@ -23,6 +23,7
@@
#define
MAX_CHILDS 128
#define
MUFSIZE 1024
+#include
#include
#include
#include
---
cpubench.c.old 2008-05-18
21:21:06.000000000 +0800
+++
cpubench.c 2008-05-18
21:38:16.000000000 +0800
@@ -22,6 +22,7
@@
#define
CPUREFSCORE 50190
#define
MAX_CHILDS 128
+#include
#include
#include
#include
---
configure.old 2008-05-18
21:39:14.000000000 +0800
+++
configure 2008-05-18
21:39:42.000000000 +0800
@@ -24,7 +24,7
@@
i486)
cat <
>> Makefile
CC =
gcc
-CFLAGS = -O2
-m486 -Wall -malign-loops=2 -malign-jumps=2 -malign-functions=2
-fomit-frame-pointer
+CFLAGS = -O2
-m486 -Wall -falign-loops=2 -falign-jumps=2 -falign-functions=2
-fomit-frame-pointer
LDFLAGS = -s
-lm
INCLUDES =
-I.
@@ -33,7 +33,7
@@
i586)
cat <
>> Makefile
CC =
gcc
-CFLAGS = -O2
-Wall -malign-loops=2 -malign-jumps=2 -malign-functions=2
-fomit-frame-pointer
+CFLAGS = -O2
-Wall -falign-loops=2 -falign-jumps=2 -falign-functions=2
-fomit-frame-pointer
LDFLAGS = -s
-lm
INCLUDES =
-I.
@@ -42,7 +42,7
@@
i686)
cat <
>> Makefile
CC =
gcc
-CFLAGS = -O2
-Wall -malign-loops=2 -malign-jumps=2 -malign-functions=2
-fomit-frame-pointer
+CFLAGS = -O2
-Wall -falign-loops=2 -falign-jumps=2 -falign-functions=2
-fomit-frame-pointer
LDFLAGS = -s
-lm
INCLUDES =
-I.
@@ -51,7 +51,7
@@
*)
cat <
>> Makefile
CC =
gcc
-CFLAGS = -O2
-Wall -malign-loops=2 -malign-jumps=2
-malign-functions=2
+CFLAGS = -O2
-Wall -falign-loops=2 -falign-jumps=2
-falign-functions=2
LDFLAGS = -s
-lm
INCLUDES =
-I.