Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1617527
  • 博文数量: 197
  • 博客积分: 10046
  • 博客等级: 上将
  • 技术积分: 1983
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-07 12:36
个人简介

在外企做服务器开发, 目前是项目经理, 管理两个server开发的项目。不做嵌入式好久了。

文章分类
文章存档

2011年(2)

2010年(6)

2009年(18)

2008年(30)

2007年(100)

2006年(41)

分类: LINUX

2007-08-31 18:00:09

bonnie++ 测试jffs2 和ramdisk 还有tmpfs

bonnie++ 是测试文件系统的好工具,
可以到这里下载:


以前在ixp425的开发板上测试 ramdisk 和 ntfs文件系统都是没有问题,

交叉编译bonnie++ 很简单, 就改一下Makefile的CXX = arm_9tdmi-linux-gnu-g++ 即可。

但是运行的时候 ,老提示 用切换到root执行, 在我们的板子上默认就是root , 所以, 要改一行代码:

bonnie++.cpp

CODE:
else if(geteuid() == 0)
    334   {
    335     //fprintf(stderr, "You must use the \"-u\" switch when running as ro        ot.\n");
    336     //usage();
    337   }

再运行就ok 了。

今天运行起来测试jffs2 ,ramdisk, tmpfs 却老有问题, 奇怪。

--
测试很简单, 进入 jffs2 mount的目录,  执行 bonnie++ -s0   即可。 却总是报错。

测试tmpfs :

QUOTE:
# ./bonnie\+\+ -s0
Create files in sequential order...Can't create file 0007697by7T7k
Cleaning up test directory after error.

测试jffs2 :看起来批量删除可能会有点问题,毕竟操作flash是比较慢的(相对于硬盘)
前几次老是不成功 ,这次居然成功了:

CODE:
# /tmpfs/bonnie\+\+   -s0  -d   /jffs2/
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.03       ------Sequential Create------ --------Random Create--------
(none)              -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   138  97  9752  97   144  95   135  94 26006  99   146  95
(none),,,,,,,,,,,,,,16,138,97,9752,97,144,95,135,94,26006,99,146,95

---第二天又测试了一遍:

CODE:
# /tmpfs/bonnie\+\+  -s0  -d /jffs2/
Create files in sequential order...



done.
Stat files in sequential order...done.
Delete files in sequential order...

done.
Create files in random order...

done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.03       ------Sequential Create------ --------Random Create--------
(none)              -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   135  97  9752  97   144  95   134  94 26006 100   147  96
(none),,,,,,,,,,,,,,16,135,97,9752,97,144,95,134,94,26006,100,147,96

测试ramdisk:也一会就出错, 看起来, 并不是文件系统的问题, 而是别的原因。

CODE:
# /tmpfs/bonnie\+\+ -s0
Create files in sequential order...Can't create file 00007207wtn
Cleaning up test directory after error.
阅读(1477) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-09-04 17:04:14

写的非常好!我在2410板子上对yaffs文件系统进行测试,发现creat操作的速度最慢,sequential和random都如此。