我在英特尔的 SSD 520 上运行全新安装的 Ubuntu 12.04 LTS 和 ext4。我的主板是华硕 Crosshair(最新 BIOS 1207),带有 Sil 3132 SATA 控制器,据称支持 SATAII。我启用了 TRIM。但与预期结果相比,我的结果相当糟糕:
sudo hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 2510 MB in 2.00 seconds = 1255.51 MB/sec
Timing buffered disk reads: 376 MB in 3.00 seconds = 125.21 MB/sec
我的主板是否造成了瓶颈?以下是有关正在使用的 SSD 的一些信息:
sudo hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: INTEL SSDSC2CW120A3
Serial Number: CVCV227301JE120BGN
Firmware Revision: 400i
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x0110)
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 234441648
LBA48 user addressable sectors: 234441648
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 114473 MBytes
device size with M = 1000*1000: 120034 MBytes (120 GB)
cache/buffer size = unknown
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 1
Advanced power management level: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
* Advanced Power Management feature set
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
* 48-bit Address feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
* IDLE_IMMEDIATE with UNLOAD
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* unknown 76[14]
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Data Tables (AC5)
* Data Set Management TRIM supported (limit 1 block)
* Deterministic read data after TRIM
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
4min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5001517bb29a74d4
NAA : 5
IEEE OUI : 001517
Unique ID : bb29a74d4
Checksum: correct
答案1
关于 SSD,我还有一个英特尔 520 系列 SSD 驱动器。我的是 120GB。我按照您提到的进行了测试,结果如下:
虽然这是使用 13.04 进行的测试,但两周前我在 12.04 上使用它,结果几乎相同(缓冲磁盘读取量大约少 40 MB,但仍然足够高)
这里唯一剩下的就是主板了。就我而言,我使用的是带有最新固件更新的 Intel DZ68DB。如果我能提供任何帮助,我首先会推荐:
更新主板固件这里如果你还没有这样做的话。
请务必阅读SSD 支持情况如何?
请务必阅读如何针对 SSD 优化操作系统?
答案2
使用 hdparm 进行速度测试(在 Linux 下获取/设置 ATA/SATA 驱动器参数)
# hdparm -Tt /dev/sda
输出:
/dev/sda:
Timing cached reads: 4476 MB in 1.99 seconds = 2244.15 MB/sec
Timing buffered disk reads: 714 MB in 3.00 seconds = 237.77 MB/sec
磁盘 I/O 测试
# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
输出:
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 4.69718 s, 229 MB/s
这是戴尔 1121 上的英特尔 520 ssd 180 gbhttp://namhuy.net/1541/intel-520-ssd-180gb-dell-1121-ubuntu.html
答案3
SSD 的随机写入性能很大程度上取决于设备内部的写入缓存。
使用两种不同的选项检查性能:
hdparm -W 0 /dev/sdX # disable write cache
hdparm -W 1 /dev/sdX # enable write cache