如何使用ubench测试服务器CPU性能
warning:
这篇文章距离上次修改已过1629天,其中的内容可能已经有所变动。
按照如下步骤完成:
1、下载生成ubench工具Ubench_0.32.zip
2、解压完成之后,包含以下文件:
rwxr-xr-x 1 root root 3103 11月 7 20:49 configure
-rwxr-xr-x 1 root root 4826 11月 7 20:49 cpubench.c
-rwxr-xr-x 1 root root 4640 11月 7 20:49 cpubench.o
-rwxr-xr-x 1 root root 1379 11月 7 20:49 creadok.c
-rwxr-xr-x 1 root root 1381 11月 7 20:49 cwriteok.c
-rwxr-xr-x 1 root root 4516 11月 7 20:49 diskbench.c
-rwxr-xr-x 1 root root 986 11月 7 20:49 Makefile
-rwxr-xr-x 1 root root 4535 11月 7 20:49 membench.c
-rwxr-xr-x 1 root root 4056 11月 7 20:49 membench.o
-rwxr-xr-x 1 root root 862 11月 7 20:49 netbench.c
-rwxr-xr-x 1 root root 4163 11月 7 20:49 README
-rwxr-xr-x 1 root root 1407 11月 7 20:49 signals.c
-rwxr-xr-x 1 root root 1092 11月 7 20:49 signals.h
-rwxr-xr-x 1 root root 980 11月 7 20:49 signals.o
-rwxr-xr-x 1 root root 4918 11月 7 20:49 tlock.c
-rwxr-xr-x 1 root root 9976 11月 7 20:49 ubench
-rwxr-xr-x 1 root root 2111 11月 7 20:49 ubench.8
-rwxr-xr-x 1 root root 4330 11月 7 20:49 ubench.c
-rwxr-xr-x 1 root root 624 11月 7 20:49 ubench.lsm
-rwxr-xr-x 1 root root 2476 11月 7 20:49 ubench.o
-rwxr-xr-x 1 root root 1721 11月 7 20:49 ubench-patch
-rwxr-xr-x 1 root root 1733 11月 7 20:49 utime.c
3、执行./ubench
,如果不能使用,执行Makefile生成ubench。
4、查看执行结果,建议测试之前清除系统缓存echo >3 /proc/sys/vm/drop_caches
,建议多测试两三次,取平均值。
Ubench CPU: 1613470
Ubench MEM: 376535
———————————
Ubench AVG: 995002