不同速度的 SSD 分区

不同速度的 SSD 分区

我有三星 NVMe SSD 960EVO 250GB 磁盘,当使用 hdparm -tT 测试读取速度时,它给出了一些奇怪的结果。

修剪前速度

/dev/nvme0n1:
 Timing cached reads:   24486 MB in  2.00 seconds = 12256.70 MB/sec
 Timing buffered disk reads: 5502 MB in  3.00 seconds = 1832.95 MB/sec
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p1

/dev/nvme0n1p1:
 Timing cached reads:   24878 MB in  2.00 seconds = 12452.22 MB/sec
 Timing buffered disk reads: 190 MB in  0.09 seconds = 2151.12 MB/sec
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p2

/dev/nvme0n1p2:
 Timing cached reads:   24270 MB in  2.00 seconds = 12147.96 MB/sec
 Timing buffered disk reads: 5308 MB in  3.00 seconds = 1769.32 MB/sec
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p3

/dev/nvme0n1p3:
 Timing cached reads:   22976 MB in  2.00 seconds = 11499.27 MB/sec
 Timing buffered disk reads: 7140 MB in  3.00 seconds = 2379.80 MB/sec
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p4

/dev/nvme0n1p4:
 Timing cached reads:   23908 MB in  2.00 seconds = 11967.15 MB/sec
 Timing buffered disk reads: 7022 MB in  3.00 seconds = 2339.82 MB/sec

修剪后速度

jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1

/dev/nvme0n1:
 Timing cached reads:   25168 MB in  2.00 seconds = 12597.67 MB/sec                                                                                                                                               
 Timing buffered disk reads: 5548 MB in  3.00 seconds = 1848.97 MB/sec                                                                                                                                            
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p1

/dev/nvme0n1p1:                                                                                                                                                                                                   
 Timing cached reads:   25226 MB in  2.00 seconds = 12627.85 MB/sec                                                                                                                                               
 Timing buffered disk reads: 190 MB in  0.09 seconds = 2177.97 MB/sec                                                                                                                                             
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p2

/dev/nvme0n1p2:                                                                                                                                                                                                   
 Timing cached reads:   24356 MB in  2.00 seconds = 12191.47 MB/sec                                                                                                                                               
 Timing buffered disk reads: 5424 MB in  3.00 seconds = 1807.88 MB/sec                                                                                                                                            
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p3

/dev/nvme0n1p3:
 Timing cached reads:   24770 MB in  2.00 seconds = 12398.57 MB/sec
 Timing buffered disk reads: 7590 MB in  3.00 seconds = 2529.50 MB/sec
jkalmar@supercomp:~> sudo hdparm -tT /dev/nvme0n1p4

/dev/nvme0n1p4:
 Timing cached reads:   24532 MB in  2.00 seconds = 12279.30 MB/sec
 Timing buffered disk reads: 6960 MB in  3.00 seconds = 2319.36 MB/sec

可以看到,除了最后一个分区速度较慢外,trim 都起到了一定作用,但速度还是相当不错的。第二个分区的速度不太好。

安装选项:

/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/nvme0n1p2 on / type ext4 (rw,relatime,data=ordered)
/dev/nvme0n1p3 on /home type ext4 (rw,relatime,data=ordered)
/dev/nvme0n1p4 on /zaloha type ext4 (rw,relatime,data=ordered)

DF-H

Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2   23G  8,1G   14G  38% /
/dev/nvme0n1p1  188M  4,6M  183M   3% /boot/efi
/dev/nvme0n1p3  110G   27G   82G  25% /home
/dev/nvme0n1p4   82G   16G   65G  20% /zaloha

智能数据

=== START OF SMART DATA SECTION ===
SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)
Critical Warning:                   0x00
Temperature:                        34 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    1 168 294 [598 GB]
Data Units Written:                 470 952 [241 GB]
Host Read Commands:                 6 529 515
Host Write Commands:                4 815 912
Controller Busy Time:               22
Power Cycles:                       63
Power On Hours:                     59
Unsafe Shutdowns:                   9
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               34 Celsius
Temperature Sensor 2:               35 Celsius

根据智能数据可以看出该驱动器相当新。

分开

(parted) print                                                           
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 488397168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start       End         Size        File system  Name  Flags
 1      2048s       391167s     389120s     fat32              boot, esp
 2      391168s     49219583s   48828416s   ext4
 3      49219584s   283594751s  234375168s  ext4
 4      283594752s  457674751s  174080000s  ext4

(parted) align-check optimal 1                                            
1 aligned
(parted) align-check optimal 2
2 aligned
(parted) align-check optimal 3
3 aligned
(parted) align-check optimal 4
4 aligned

一切看起来都很好,但是分区 2 的速度比其他分区慢得多。有人知道原因吗?如果可以修复,如何修复?

相关内容