- 论坛徽章:
- 0
|
nfsstat -s 显示getattr为44%,超过40%,
- $ nfsstat -s
- Server rpc stats:
- calls badcalls badauth badclnt xdrcall
- 503461052 0 0 0 0
- Server nfs v3:
- null getattr setattr lookup access readlink
- 56 0% 224073496 44% 36156045 7% 33355516 6% 88400679 17% 0 0%
- read write create mkdir symlink mknod
- 11706990 2% 42862051 8% 6578308 1% 1211151 0% 0 0% 0 0%
- remove rmdir rename link readdir readdirplus
- 134268 0% 88 0% 2 0% 0 0% 153777 0% 12197902 2%
- fsstat fsinfo pathconf commit
- 32461 0% 80 0% 0 0% 42800868 8%
复制代码
根据SUN的建议:
getattr > 40% Increase the client attribute cache using the actimeo option.
和一些参数资料:
调优 NFS 文件属性高速缓存
NFS 在每个客户机系统上为最近被访问过的目录和文件维护一个高速缓存。在 /etc/filesystems 文件中有五个参数可设置,用来控制某个指定条目在高速缓存中要保留多久。这些参数如下:
actimeo
在文件和目录条目被更新后,要在文件属性高速缓存中保留的绝对时间。如果被指定,则该值会覆盖 *min 和 *max 的值,事实上把它们都设成了 actimeo 的值。
acregmin
在文件条目被更新后,保留的最短时间。缺省值是 3 秒。
acregmax
在文件条目被更新后,保留的最长时间。缺省值是 60 秒。
acdirmin
在目录条目被更新后,保留的最短时间。缺省值是 30 秒。
acdirmax
在目录条目被更新后,保留的最长时间。缺省值是 60 秒。
每次文件或目录被更新后,从高速缓存中移除至少要等 acregmin 或 acdirmin 秒。如果是第二次或后续的更新,条目最多被保留的时间至少等于最近两次更新之间的间隔时间,但是不会超过 acregmax 或 acdirmax 秒。
我推断用actimeo参数不妥,还是直接调用其他四个参数,但我没有概念,调多大合适?
我做的客户端Mount方式:
- mount -t nfs -o soft,tcp,noatime,acregmin=6,rsize=16384,wsize=16384,nfsvers=3 192.168.4.57:/home2 /nfs &
复制代码
只改了acregmin这一个参数,但好像没啥效果。
请大家赐教,分享下经验,我该调成多大呢?调哪些参数?
不胜感激! |
|