LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 904|回复: 8

hdparm的问题

[复制链接]
发表于 2005-7-14 22:13:02 | 显示全部楼层 |阅读模式
我用hdparm -a256 -A1 -c1 -d1 -m16 -u1 -k1 /dev/hda来增强硬盘性能,但是每次开机都要运行一次。我查了一下,-k1参数就是保持设置,但每次一开机就回到没有加速过的状态。我不知道怎么才能让它开机就自动加载我设置的参数,向各位大虾请教。
发表于 2005-7-14 22:23:59 | 显示全部楼层
修改你的/etc/conf.d/hdparm 文件,
然后把rc-update add hdparm default。
这样每次开机,都会运行你的hdparm了。
回复 支持 反对

使用道具 举报

发表于 2005-7-15 01:52:44 | 显示全部楼层
This may be a little bit better:

hdparm -a1024 -A1 -c1 -d1 -m16 -u1 -k1 /dev/hda

You can use hdparm -tT /dev/hda to do a benchmark before and after the change.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-16 08:52:54 | 显示全部楼层
我是笔记本的5400转的富士通硬盘,8m缓存,40g容量,-a1024不会损伤硬盘吗?
回复 支持 反对

使用道具 举报

发表于 2005-7-16 09:45:44 | 显示全部楼层
The -a flag is to set the readahead buffer.  Unlike the -X flag, it should not cause any troubles.

I am also using 笔记本的5400转的Hitachi and also a Samsung硬盘,8m缓存,40g容量.  I install them in USB HDD cases.  I don't experience any problems with the -a1024 flag.
回复 支持 反对

使用道具 举报

发表于 2005-7-16 11:32:30 | 显示全部楼层
楼上的,好像-a设置越大,对大文件的读写性能越好,但是对小文件的读写就……没说了……不过man里面有句话是,如果小文件多的话,建议把-a设置小一点,why?
回复 支持 反对

使用道具 举报

发表于 2005-7-16 13:12:21 | 显示全部楼层
Yes, the bigger is not always better.  It is already explained in the man page.  In fact, I don't see any improvements if I replace -a1024 with -a2048.  However, I am pretty sure the improvement from -a256 to -a1024.

It is may due to the fact that -a1024 well suit the amount of data being transferred during normal operations.  Well, you may do a benchmark test to determine the right value for you.
回复 支持 反对

使用道具 举报

发表于 2005-7-16 15:44:00 | 显示全部楼层
恩,我也发现了……从256到1024的提升很明显。
回复 支持 反对

使用道具 举报

发表于 2005-7-17 10:00:49 | 显示全部楼层
Post by playfish
我是笔记本的5400转的富士通硬盘,8m缓存,40g容量,-a1024不会损伤硬盘吗?
Maybe you can consider to add the -S option, e.g.  -S120 or -S180 etc, so that your harddrive will be spin down when it is idle for a fix period of time.  It may prolong the life of your harddrive.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表