[求助]linux速度慢的原因
脱离windows已经一个多星期了,感觉magiclinux对硬件的支持满不错的。就是感觉有些慢。前几天发过一个贴子求助magiclinux的优化问题(放电影很卡),由于不知道原因所在,所以没获得什么有用的帮助。不过今天终于找到瓶颈所在了。如下:# hdparm -Tt /dev/hdc
/dev/hdc:
Timing cached reads: 2140 MB in2.00 seconds = 1069.93 MB/sec
Timing buffered disk reads: 8 MB in3.90 seconds = 2.05 MB/sec
是在我的系统上得到的数据。系统慢的原因就在磁盘的读取速度太慢,可是当我用
# hdparm -X66 -d1 -u1 -m16 -c3 -k1 /dev/hdc
的时候不能改变其中的一些设置(单用户模式也不行)
/dev/hdc:
setting 32-bit IO_support flag to 3
setting multcount to 16
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
setting keep_settings to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
multcount = 16 (on)
IO_support =3 (32-bit w/sync)
unmaskirq =1 (on)
using_dma =0 (off)
keepsettings =1 (on)
# hdparm /dev/hdc
/dev/hdc:
multcount = 16 (on)
IO_support =3 (32-bit w/sync)
unmaskirq =1 (on)
using_dma =0 (off)
keepsettings =1 (on)
readonly =0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 78140160, start = 0
到底是什么原因?
对了,还有就是我的唯一一块硬盘怎么会是"/dev/hdc"。好像安装的时候就已经是它了,不是"/dev/hda"么? 对了,我的机子是七喜的v210ct,配置如下(本人加了一条256M的内存):
处理器: Intel Celeron M 360(1.4G)
内存容量: 512M
硬盘类型 ATA-100
硬盘参数 5400转
硬盘容量 40G
显示芯片: 集成Intel GMA900芯片 前面的不太清除,不过那个hdc是正确的,linux下对于ide设备的识别不是从连接顺序上判断,而是根据不同端口的主从来判断,可以确定你的硬盘是插在了第二个ide接口的主盘,开机时进bios,应该可以看到 我的机子(本本)也有跟你一样的问题!怎么也打不开那个DMA,至于电影卡的问题,我也曾遇到过,不过是播放rmvb时很卡,不过安了显卡的驱动程序后就解决了。那个dma问题,不知道哪位高手能指导一下?谢谢。 哪位高手能指导一下?先谢谢了。
我可不想重装windows。 播放卡请注意是否开启了wine服务,播放媒体经常需要wine支持。 我想你说的是xine吧
这个问题已经解决了,我用“hdparm -c3 /dev/hdd”后,光盘的读取速度提高,就不会卡了。问题是我的硬盘的读写速度和我的U盘一样快,太可怕了。我已经翻了n多资料都无法解决问题:
/dev/hdc:
Timing buffered disk reads: 6 MB in3.33 seconds = 1.80 MB/sec
/dev/sda:
Timing buffered disk reads: 6 MB in3.52 seconds = 1.70 MB/sec
hdc是我的硬盘,sda是我的一个U盘 关注中~ 希望有人来帮帮忙 :P因为我也是开始用Linux (ML2.0) 等了很久也没解决问题,可能我提供的信息太少。又顶一下,期待中,,,,,,,
#hdparm -I /dev/hdc
/dev/hdc:
ATA device, with non-removable media
Model Number: ST94813A
Serial Number: 5PJ0P514
Firmware Revision:3.04
Standards:
Used: ATA/ATAPI-6 T13 1410D revision 2
Supported: 6 5 4 3
Configuration:
Logical max current
cylinders 16383 65535
heads 16 1
sectors/track 63 63
--
CHS current addressable sectors: 4128705
LBA user addressable sectors: 78140160
LBA48user addressable sectors: 78140160
device size with M = 1024*1024: 38154 MBytes
device size with M = 1000*1000: 40007 MBytes (40 GB)
Capabilities:
LBA, IORDY(can be disabled)
bytes avail on r/w long: 4 Queue depth: 1
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16Current = 16
Advanced power management level: unknown setting (0x8080)
Recommended acoustic management value: 254, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240nsIORDY flow control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
SET MAX security extension
* Advanced Power Management feature set
* DOWNLOAD MICROCODE cmd
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 0 determined by CSEL
Checksum: correct 搜到了一些有用的自料,有兴趣的可以看一下:
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=151270
或许,我应该重新编译内核了。
页:
[1]