nfs服务器性能测试,nfs-noatime性能测试

默认情况下,Linuxext2/ext3文件系统在文件被访问、创建、修改等的时候记录下了文件的一些时间戳,比如:文件创建时间、最近一次修改时间和最近一次访问时间。因

[root@nfs-server~]# cat /etc/redhat-release

CentOSrelease 5.8 (Final)

[root@nfs-server~]# uname -r

2.6.18-308.el5

[root@nfs-server~]# rpm -qa nfs-utils portmap

portmap-4.0-65.2.2.1

nfs-utils-1.0.9-60.el5

[root@nfs-server~]# cat /etc/exports

/data192.168.196.0/24(rw,sync)

[root@nfs-server~]# ls -ld /data/

drwxrwxrwx2 root root 4096 Sep 15 09:42 /data/

[root@nfs-server~]#

客户端:

[root@nfs-client~]# uname -r

2.6.18-308.el5

[root@nfs-client~]# rpm -qa nfs-utils portmap

portmap-4.0-65.2.2.1

nfs-utils-1.0.9-60.el5

[root@nfs-client~]#

测试:time dd if=/dev/zero of=/pw/data/testfile bs=16kcount=16484

[root@nfs-client~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             6.7G  2.2G 4.1G  35% /

/dev/sda1             145M   12M 125M   9% /boot

tmpfs                 249M     0 249M   0% /dev/shm

[root@nfs-client ~]# mount -t nfs192.168.196.3:/data /pw/data/

[root@nfs-client~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             6.7G  2.2G 4.1G  35% /

/dev/sda1             145M   12M 125M   9% /boot

tmpfs                 249M     0 249M   0% /dev/shm

192.168.196.3:/data   6.7G 2.2G  4.2G  35% /pw/data

[root@nfs-client~]# mount

/dev/sda3on / type ext3 (rw)

procon /proc type proc (rw)

sysfson /sys type sysfs (rw)

devptson /dev/pts type devpts (rw,gid=5,mode=620)

/dev/sda1on /boot type ext3 (rw)

tmpfson /dev/shm type tmpfs (rw)

noneon /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

sunrpcon /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

192.168.196.3:/dataon /pw/data type nfs (rw,addr=192.168.196.3)

[root@nfs-client ~]# time ddif=/dev/zero of=/pw/data/testfile bs=16k count=16484

16484+0records in

16484+0records out

270073856 bytes (270 MB) copied,13.4234 seconds, 20.1 MB/s

real    0m13.452s

user    0m0.004s

sys 0m0.533s

[root@nfs-client~]# umount /pw/data/

[root@nfs-client~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             6.7G  2.2G 4.1G  35% /

/dev/sda1             145M   12M 125M   9% /boot

tmpfs                 249M     0 249M   0% /dev/shm

[root@nfs-client~]# mount

/dev/sda3on / type ext3 (rw)

procon /proc type proc (rw)

sysfson /sys type sysfs (rw)

devptson /dev/pts type devpts (rw,gid=5,mode=620)

/dev/sda1on /boot type ext3 (rw)

tmpfson /dev/shm type tmpfs (rw)

noneon /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

sunrpcon /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

[root@nfs-client ~]# mount -t nfs -o noatime,nodiratime192.168.196.3:/data /pw/data

[root@nfs-client~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             6.7G  2.2G 4.1G  35% /

/dev/sda1             145M   12M 125M   9% /boot

tmpfs                 249M     0 249M   0% /dev/shm

192.168.196.3:/data   6.7G 2.5G  3.9G  39% /pw/data

[root@nfs-client~]# mount

/dev/sda3on / type ext3 (rw)

procon /proc type proc (rw)

sysfson /sys type sysfs (rw)

devptson /dev/pts type devpts (rw,gid=5,mode=620)

/dev/sda1on /boot type ext3 (rw)

tmpfson /dev/shm type tmpfs (rw)

noneon /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

sunrpcon /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

192.168.196.3:/dataon /pw/data type nfs (rw,noatime,nodiratime,addr=192.168.196.3)

[root@nfs-client~]# rm /pw/data/testfile

rm:remove regular file `/pw/data/testfile'? y

[root@nfs-client ~]# time ddif=/dev/zero of=/pw/data/testfile bs=16k count=16484

16484+0records in

16484+0records out

270073856 bytes (270 MB) copied,11.7239 seconds, 23.0 MB/s

real    0m11.753s

user    0m0.004s

sys 0m0.463s

[root@nfs-client~]# rm /pw/data/testfile

rm:remove regular file `/pw/data/testfile'? y

[root@nfs-client~]#

本文出自 “仰望天空” 博客,,请务必保留此出处

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值