我已经在富士通西门子 Lifebook E751 上运行 12.04 近一年了,没有任何问题,但几天前我注意到 CPU IOwait 非常高,导致系统响应缓慢(它会冻结几分之一秒,但这种情况经常发生,使计算机使用起来非常不舒服)。我尝试调试,iotop 识别jbd2
(日志块设备)为负责的进程。此进程仅在我执行常规活动时调用,而不是在计算机空闲时调用。问题似乎不是它被调用得太频繁,而是当它被调用时,它需要太多时间来完成其工作。所以我试着检查我的磁盘,并对其极慢的性能参数感到不快。
sudo hdparm -tT /dev/sdb6
/dev/sdb6:
Timing cached reads: 2 MB in 2.43 seconds = 842.41 kB/sec
Timing buffered disk reads: 22 MB in 3.01 seconds = 7.30 MB/sec
我全新安装了 13.04(我备份了所有数据,所以没有那么彻底),但还是没有解决任何问题。我还检查了从 USB 启动时的磁盘性能,磁盘性能相同(从 USB 启动的系统响应非常灵敏,所以我认为这不可能是 CPU 或内存问题)。这能修复吗(这是软件故障还是硬件故障)?
谢谢你的建议。
菲利普
附言:这里还有一些可能有用的数据。
sync ; time sh -c "dd if=/dev/zero of=testfile bs=100k count=1k && sync" ; rm testfile
1024+0 records in
1024+0 records out
104857600 bytes (105 MB) copied, 0,0837853 s, 1,3 GB/s
real 0m1.250s
user 0m0.000s
sys 0m0.100s
sudo hdparm /dev/sdb6
/dev/sdb6:
multcount = 16 (on)
IO_support = 1 (32-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 60801/255/63, sectors = 731281408, start = 198688768
sudo hdparm -i /dev/sdb6
/dev/sdb6:
Model=TOSHIBA MK5061GSYN, FwRev=MH000K, SerialNo=629GF6JIS
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=16
CurCHS=65535/1/63, CurSects=4128705, LBA=yes, LBAsects=976773168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-3,4,5,6,7
* signifies the current active mode
sudo smartctl -a /dev/sdb6
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.8.0-23-generic] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 2.5" HDD MK..61GSYN
Device Model: TOSHIBA MK5061GSYN
Serial Number: 629GF6JIS
LU WWN Device Id: 5 000039 416f03c89
Firmware Version: MH000K
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Jul 5 22:01:13 2013 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 25) The self-test routine was aborted by
the host.
Total time to complete Offline data collection: ( 120) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 126) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0027 100 100 001 Pre-fail Always - 2356
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 1413
5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0032 093 093 000 Old_age Always - 3160
10 Spin_Retry_Count 0x0033 128 100 030 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1149
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 26
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 7
193 Load_Cycle_Count 0x0032 098 098 000 Old_age Always - 22993
194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 59 (Min/Max 18/61)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
220 Disk_Shift 0x0002 100 100 000 Old_age Always - 8364
222 Loaded_Hours 0x0032 094 094 000 Old_age Always - 2550
223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 0
224 Load_Friction 0x0022 100 100 000 Old_age Always - 0
226 Load-in_Time 0x0026 100 100 000 Old_age Always - 266
240 Head_Flying_Hours 0x0001 100 100 001 Pre-fail Offline - 0
SMART Error Log Version: 1
ATA Error Count: 1
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 1 occurred at disk power-on lifetime: 310 hours (12 days + 22 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
84 41 30 ff ff 25 65 Error: ICRC, ABRT at LBA = 0x0525ffff = 86376447
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
61 00 40 00 01 26 40 00 05:26:41.826 WRITE FPDMA QUEUED
61 00 38 00 00 26 40 00 05:26:41.826 WRITE FPDMA QUEUED
61 00 30 00 ff 25 40 00 05:26:41.826 WRITE FPDMA QUEUED
61 00 28 00 fe 25 40 00 05:26:41.826 WRITE FPDMA QUEUED
61 00 20 00 fd 25 40 00 05:26:41.823 WRITE FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Aborted by host 90% 3155 -
# 2 Short offline Completed without error 00% 3155 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
答案1
这可能是由于您的硬盘有一些坏块造成的。我建议您再次从 USB 启动并从终端运行以下命令:
sudo fsck -c /dev/sdb6
这会将这些坏块添加到坏块列表中,这意味着它们不应再使用。
另一个选择是运行 gparted 并在那里触发磁盘检查。