RedHat Linux下IDE硬盘的加速。
默认中Redhat Linux将IDE硬盘配置得非常稳定,非常兼容,换句话来说,就是非常的慢。如果你的IDE硬盘是最近几年,特别注明是支持UltraDMA模式的,可以通过修改配置文件轻而易举地使得你的IDE硬盘加速它的运行。
编辑/etc/sysconfig/harddisks, 修改自己的IDE硬盘(注:对SCSI硬盘无效)。红色字体是修改后的参数:
#
# WARNING !!!
#
# The kernel will autodetect the correct settings for most drives.
# Overriding these settings with hdparm can cause data corruption and/or
# data loss.
# Leave this file as it is unless you know exactly what you're doing !!
#
#
#
# These options are used to tune the hard drives -
# read the hdparm man page for more information
# Set this to 1 to enable DMA. This might cause some
# data corruption on certain chipset / hard drive
# combinations. This is used with the "-d" option
USE_DMA=1 (这不用再说明了吧?)
# Multiple sector I/O. a feature of most modern IDE hard drives,
# permitting the transfer of multiple sectors per I/O interrupt,
# rather than the usual one sector per interrupt.When this feature
# is enabled, it typically reduces operating system overhead for disk
# I/O by 30-50%.On many systems, it also provides increased data
# throughput of anywhere from 5% to 50%.Some drives, however (most
# notably the WD Caviar series), seem to run slower with multiple mode
# enabled. Under rare circumstances, such failures can result in
# massive filesystem corruption. USE WITH CAUTION AND BACKUP.
# This is the sector count for multiple sector I/O - the "-m" option
#
MULTIPLE_IO=16 (这个以前叫multcount, 多少sector能在一次输入/输出中断中被校入)
# (E)IDE 32-bit I/O support (to interface card)
#
EIDE_32BIT=3 (打开这个是非常重要的,几乎可以提速一倍)
# Enable drive read-lookahead
#
LOOKAHEAD=1 (没什么话好说的,个人觉得都无所谓)
# Add extra parameters here if wanted
# On reasonably new hardware, you may want to try -X66, -X67 or -X68
# Other flags you might want to experiment with are -u1, -a and -m
# See the hdparm manpage (man hdparm) for details and more options.
#
EXTRA_PARAMS= -X66 -u1 (这里的选项很危险,要根据自己的情况填入。请先用/sbin/hdparm 命令确认这些选项不会危害到你的IDE硬盘,再将它们写入这里。
其实上面的参数都可以用hdparm来调整,但系统是不会记住hdparm调整后的参数的。所以每次开机又会回到默认的配置。修改/etc/sysconfig/harddisks文件是为了方便,用户也可以将hdparm的选项写入rc.sysinit。仁者见仁了。 俺习惯在rc里放hdparm命令了 俺习惯在rc里放hdparm命令了
PS:如果内核不能识别主板南桥,就无法打开DMA,怎么调都是白搭。如果内核支持了,不用调也会开DMA :mrgreen: EIDE_32BIT=3 这行应该是EIDE_32BIT=1 楼上的man hdparm好好看看
-c
查询/打开(E)IDE 32-bit I/O 支持.一个数字的参数可以被用来打开/关闭32-bit I/O 支持.当前支持的值包括 0 关闭 32-bit I/O 支持, 1 打开 32-bit 数据传输, 和 3 以一个芯片组要求的特殊的 sync 流程打开 32-bit data 传输. 值 3 几乎对所有的32-bit IDE 芯片组起作用,但导致稍微多一些的系统开销. 注意,32-bit数据传输仅仅用于通过PCI或VLB总线与接口卡的连接; 所有的IDE驱动器通过排线从接口卡获得的连接仅为16-bit.
页:
[1]