这就是我现在得到的,配备Crucial MX300 750GB SSD(具有最新固件[尚无固件更新])。
lptp [ blah ]: sudo hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 10202 MB in 2.00 seconds = 5103.20 MB/sec
Timing buffered disk reads: 128 MB in 3.06 seconds = 41.88 MB/sec
看到缓冲的磁盘读取速度!!!!SOOOO SLOWWW !!!! 首次安装笔记本电脑时,我看到的速度超过了400MB / sec,考虑到这是一台较旧的笔记本电脑,并且加密的一切都很好,因此这对我来说非常好。
这是我的/etc/fstab
。我已启用修剪,手动运行修剪,启用/禁用功能,重新启动等等。我无法让那些快的速度回来:
/dev/mapper/ubuntu--gnome--vg-root / ext4 noatime,nodiratime,errors=remount-ro,barrier=0,discard 0 1
显然,这些是我正在使用的选项。我尝试了它们的各种组合都无济于事:
noatime,nodiratime,errors=remount-ro,barrier=0,discard
有小费吗?这真让我抓狂。
哦,我还在带16GB内存和i7处理器的Lenovo T420上运行Ubuntu 16.04(x64):
lptp [ blah ]: lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Smartctl输出:
lptp [ blah ]: sudo smartctl /dev/sda -a
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-38-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Crucial_CT750MX300SSD1
Serial Number: XXXXXX
LU WWN Device Id: 5 XXXXX XXXXXXX
Firmware Version: M0CR011
User Capacity: 750,156,374,016 bytes [750 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Nov 1 21:22:05 2016 CDT
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: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 1987) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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: ( 10) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SCT capabilities: (0x0035) SCT Status 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 0x002f 100 100 000 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0032 100 100 010 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 52
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 41
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
173 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 1
174 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 11
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 000 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0022 059 052 000 Old_age Always - 41 (Min/Max 21/48)
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 100 100 000 Old_age Always - 0
202 Unknown_SSD_Attribute 0x0030 100 100 001 Old_age Offline - 0
206 Unknown_SSD_Attribute 0x000e 100 100 000 Old_age Always - 0
246 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 138859820
247 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 4354463
248 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 1675456
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 000 000 000 Pre-fail Always - 3558
210 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
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.
杀死我的是它正在运转一会儿。它一天有效,然后第二天停止,我什至没有做任何可以改变它的事情(我能想到)。
更新
测试了特定的设备(/dev/sda1
),但结果缓慢:
lptp [ ~ ]: sudo hdparm -Tt /dev/sda1
/dev/sda1:
Timing cached reads: 13130 MB in 2.00 seconds = 6568.77 MB/sec
Timing buffered disk reads: 128 MB in 3.06 seconds = 41.79 MB/sec
更新
在逻辑分区上也进行了测试:
lptp [ ~ ]: sudo hdparm -Tt /dev/mapper/ubuntu--gnome--vg-root
/dev/mapper/ubuntu--gnome--vg-root:
Timing cached reads: 11468 MB in 2.00 seconds = 5736.85 MB/sec
Timing buffered disk reads: 178 MB in 3.04 seconds = 58.47 MB/sec
UPDATE dd
测试
该测试表明它甚至比hdparm显示的还要慢...
lptp [ blah ]: dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 35.0156 s, 30.7 MB/s
lptp [ blah ]: sudo bash -c "echo 3 > /proc/sys/vm/drop_caches"
lptp [ blah ]: dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1066401792 bytes (1.1 GB, 1017 MiB) copied, 34.0193 s, 31.3 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 34.256 s, 31.3 MB/s
更新:分区对齐
这是笔记本电脑上的分区对齐方式:
lptp [ ~ ]: sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA Crucial_CT750MX3 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 512MB 511MB primary ext2 boot
2 513MB 750GB 750GB extended
5 513MB 750GB 750GB logical
(parted) align-check opt 1
1 aligned
(parted) align-check opt 2
2 not aligned
(parted) align-check opt 5
5 aligned
(parted)
我不确定对分区2未对齐的看法:^ /,但是分区1和5是对齐的。
另外,这是从 fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 1465147391 1464145922 698.2G 5 Extended
/dev/sda5 1001472 1465147391 1464145920 698.2G 83 Linux
更新:已修复?
我将调度程序更改为noop调度程序(而不是截止日期)。这似乎奏效了(通过更改/etc/default/grub
为以下行来完成此操作:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"
然后使用更新grub sudo update-grub2
并重新启动。
我将等待几天,以查看它是否在重新启动/使用几次后是否有效,然后我做出回答并接受。
更改调度程序后的当前速度:
lptp [ ~ ]: sudo hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 12388 MB in 2.00 seconds = 6197.19 MB/sec
Timing buffered disk reads: 1454 MB in 3.00 seconds = 484.59 MB/sec
fstab中的选项是:
noatime,nodiratime,errors=remount-ro,barrier=0
“修复”更新
在使用了一段时间并重新启动几次之后,它又回到了缓慢的速度 :( :( :( :( :( :( :(
更新-可能的“修复”
我曾想过,也许我的笔记本电脑在启动并用完电池时会进行一些节电的优化。在插入充电器的情况下进行一次简单的启动测试后,它又恢复了其真正的快速速度。我可以肯定是这种情况-一直以快速的速度进行测试,一直插上充电器。我将再进行一些测试以进行验证,但我可以肯定这是造成速度下降的原因。
/dev/mapper/ubuntu--gnome--vg-root
/dev/sda1
,也将测试逻辑分区
/dev/sda1
而不是,会发生/dev/sda
什么?