Hi,
i got a SSD Core 64GB recently for my Laptop (Lenovo Thinkpad X61s).
The migration was pretty straight forward as i used an external usb enclosure for the ssd first in order to copy the relevant partitions over.
Subjective impression
Subjectively the performance increase is quite impressive compared to the original drive (WD1600BEVS-08RS).
E.g. acroread starts within about 5s compared to 25s, firefox and other apps like pidgin and sylpheed-claws i use often instantly start.
Eclipse, OpenOffice etc. are also a lot faster now.
Real measurements
Some thing which botherd me a little bit though were the somehow strange results i got from e.g. running "hdparm -t ..." on that drive; the results are around ~96MB/s which of course is a lot faster then the original drive though i exspected to see more as the maximum speed should be even faster.
Other tools like piozone and bonnie++ show similar results.
After searching around quite a bit i found the hint from highlandsun in this thread to use dd to measure speed.
So i wrote a little script which automatically runs multiple test runs using dd with different block sizes and offsets on a given device.
Please note that this script is provided as is and without any warranty so you use it at your own risk.
Code:
#!/bin/bash
#Script for multiple test runs of dd on a hard disk using different block sizes and offsets.
#This script is provided as is and there is no warranty at all so use it at your own risk.
TEST_RUNS=20
DATA_SIZE=10000000
#read size of disk in sectors
DISK_SIZE=`fdisk -lu $1 | grep ".*sectors$" | awk '{print $8}'`
#get sector size
SECTOR_SIZE=`fdisk -lu $1 | grep "^Units" | awk '{ print $9}'`
echo "Size of $1 in sectors: $DISK_SIZE - With $SECTOR_SIZE bytes per sector."
echo "Size of $1 in bytes: $(($DISK_SIZE * $SECTOR_SIZE))"
echo "Size of data being read: $DATA_SIZE"
for j in 1 2 4;
do
BLOCK_SIZE=$(($SECTOR_SIZE * $j))
BLOCK_COUNT=$(($DATA_SIZE / $BLOCK_SIZE))
echo -e "\n\nPerforming reads with block size: $BLOCK_SIZE"
for ((i=0; i < $TEST_RUNS ; i++));
do
OFFSET=$(($DISK_SIZE / $TEST_RUNS / $j * $i))
echo -e "\nReading from offset $OFFSET blocks with $BLOCK_SIZE bytes per block. Offset in bytes = $(($OFFSET * $BLOCK_SIZE))"
#sync first.
#Changed this as suggested by highlandsun. Though for linux a single call of sync should be safe; but i do not know about other *nixes.
sync; sync
#clear caches. Caution this throws away all data not written to disk!
echo 3 > /proc/sys/vm/drop_caches
dd if=$1 of=/dev/null bs=$BLOCK_SIZE count=$BLOCK_COUNT skip=$OFFSET ;
done;
done
You must be root in order to run this script.
The device you want to do the test runs on must be given as parameter e.g.: "./benchmark_hd_script /dev/sda".
Pleas note that the script emptys the cache before each test run and this might result in loss of data.
Though "sync" is called to try to prevent actual data loss it still may not be safe this way.
So be sure to safe and close any important work before running this!
In order to get the min and max values this script produces it can be run in the following way:
Code:
./benchmark_hd_script /dev/sda 2> result
awk 'BEGIN {max=0; min=1000; avg=0; n=0;} {val = int($8); if(max<val)max=val; if(val!=0 && min>val)min=val; if(val!=0){avg+=val; n++;}} END {print "Max: " max " - Min: " min " - Average: " avg/n}' result
rm result
I dunno if this whole approach gives real consistent results at least it produces some number to work with.
Maybe someone can comment if this approach really makes sense.
Results
Hdparm -t~96MB/s
piozone~96MB/s
benchmark_hd_scriptMin: ~88MB/s - Max: ~120MB/s - Average: ~107MB/s
benchmark_hd_scriptMax: 116 - Min: 98 - Average: 110.207
bonnie++ with 2GB RAM and filesize 4GB, no other options set run on ext3
Code:
Version 1.93c ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
eddie 4000M 345 99 25291 12 22912 14 1623 99 111116 40 144.2 4
Latency 45699us 23854ms 7994ms 11929us 684ms 400ms
Version 1.93c ------Sequential Create------ --------Random Create--------
eddie -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 1530 3 +++++ +++ 14197 25 30732 69 +++++ +++ +++++ +++
Latency 1502us 1214us 779us 416us 33us 450us
1.93c,1.93c,eddie,1,1227132913,4000M,,345,99,25291,12,22912,14,1623,99,111116,40,144.2,4,16,,,,,1530,3,+++++,+++,14197,25,30732,69,+++++,+++,+++++,+++,45699us,23854ms,7994ms,11929us,684ms,400ms,1502us,1214us,779us,416us,33us,450us
bonnie++ with 2GB RAM and filesize 4GB, no other options set run on ext2
Code:
Version 1.94 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
eddie 4000M 820 98 31142 7 21215 10 1348 99 122917 42 140.7 2
Latency 21218us 3608ms 3623ms 9079us 397ms 467ms
Version 1.94 ------Sequential Create------ --------Random Create--------
eddie -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 912 30 +++++ +++ +++++ +++ 3053 97 +++++ +++ 9508 91
Latency 918us 104us 55us 816us 1487us 363us
1.93c,1.94,eddie,1,1227482065,4000M,,820,98,31142,7,21215,10,1348,99,122917,42,140.7,2,16,,,,,912,30,+++++,+++,+++++,+++,3053,97,+++++,+++,9508,91,21218us,3608ms,3623ms,9079us,397ms,467ms,918us,104us,55us,816us,1487us,363us
Configuration
Quite a few people suggest to use ext2 or at least mount ext3 as ext2 so the journal is not used because this i supposed to reduce write cycles on the disk thus increasing life time of the disk.
After doing some more testing, including a bonnie++ benchmark testrun, ext2 even appears to be a little bit faster then ext3 so i'll stick to this for now.
Output from "lspci -v":
Code:
...
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03) (prog-if 01 [AHCI 1.0])
Subsystem: Lenovo ThinkPad T61
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 16
I/O ports at 1c08 [size=8]
I/O ports at 183c [size=4]
I/O ports at 1c00 [size=8]
I/O ports at 1838 [size=4]
I/O ports at 18e0 [size=32]
Memory at f8426000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Count=1/4 Enable-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA <?>
Kernel driver in use: ahci
...
Output from "dmesg":
Code:
...
ahci 0000:00:1f.2: version 3.0
ahci 0000:00:1f.2: PCI INT B -> GSI 16 (level, low) -> IRQ 16
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 3 ports 1.5 Gbps 0x5 impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part
ahci 0000:00:1f.2: setting latency timer to 64
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
ata1: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 16
ata2: DUMMY
ata3: SATA max UDMA/133 abar m2048@0xf8426000 port 0xf8426200 irq 16
Clocksource tsc unstable (delta = -99233080 ns)
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ACPI cmd ef/02:00:00:00:00:a0 succeeded
ata1.00: ACPI cmd f5/00:00:00:00:00:a0 filtered out
ata1.00: ATA-8: OCZ CORE_SSD, 02.10104, max UDMA/100
ata1.00: 125206528 sectors, multi 0: LBA
ata1.00: ACPI cmd ef/02:00:00:00:00:a0 succeeded
ata1.00: ACPI cmd f5/00:00:00:00:00:a0 filtered out
ata1.00: configured for UDMA/100
ata1.00: configured for UDMA/100
ata1: EH complete
ata3: SATA link down (SStatus 0 SControl 300)
scsi 0:0:0:0: Direct-Access ATA OCZ CORE_SSD 02.1 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 125206528 512-byte hardware sectors: (64.1 GB/59.7 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 125206528 512-byte hardware sectors: (64.1 GB/59.7 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
sd 0:0:0:0: [sda] Attached SCSI disk
...
Output from "hdparm -iv /dev/sda":
Code:
/dev/sda:
IO_support = 0 (default)
readonly = 0 (off)
readahead = 256 (on)
geometry = 7793/255/63, sectors = 125206528, start = 0
Model=OCZ CORE_SSD , FwRev=02.10104, SerialNo=DC644000007C
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=63
BuffType=unknown, BuffSize=0kB, MaxMultSect=1, MultSect=?1?
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=125206528
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-1,2,3,4,5,6,7
* signifies the current active mode
Output from "sdparm -a --long /dev/sda":
Code:
/dev/sda: ATA OCZ CORE_SSD 02.1
Direct access device specific parameters: WP=0 DPOFUA=0
Read write error recovery [rw] mode page:
AWRE 1 Automatic write reallocation enabled
ARRE 0 Automatic read reallocation enabled
TB 0 Transfer block
RC 0 Read continuous
EER 0 Enable early recovery
PER 0 Post error
DTE 0 Data terminate on error
DCR 0 Disable correction
RRC 0 Read retry count
COR_S 0 Correction span (obsolete)
HOC 0 Head offset count (obsolete)
DSOC 0 Data strobe offset count (obsolete)
WRC 0 Write retry count
RTL 0 Recovery time limit (ms)
Caching (SBC) [ca] mode page:
IC 0 Initiator control
ABPF 0 Abort pre-fetch
CAP 0 Caching analysis permitted
DISC 0 Discontinuity
SIZE 0 Size enable
WCE 1 Write cache enable
MF 0 Multiplication factor
RCD 0 Read cache disable
DRRP 0 Demand read retention priority
WRP 0 Write retention priority
DPTL 0 Disable pre-fetch transfer length
MIPF 0 Minimum pre-fetch
MAPF 0 Maximum pre-fetch
MAPFC 0 Maximum pre-fetch ceiling
FSW 0 Force sequential write
LBCSS 0 Logical block cache segment size
DRA 1 Disable read ahead
NV_DIS 0 Non-volatile cache disable
NCS 0 Number of cache segments
CSS 0 Cache segment size
Control [co] mode page:
TST 0 Task set type
TMF_ONLY 0 Task management functions only
D_SENSE 0 Descriptor format sense data
GLTSD 1 Global logging target save disable
RLEC 0 Report log exception condition
QAM 0 Queue algorithm modifier
QERR 0 Queue error management
RAC 0 Report a check
UA_INTLCK 0 Unit attention interlocks control
SWP 0 Software write protect
ATO 0 Application tag owner
TAS 0 Task aborted status
AUTOLOAD 0 Autoload mode
BTP -1 Busy timeout period (100us)
ESTCT 30 Extended self test completion time (sec)
Overall i am very happy with this nice drive. 
I hope this information is usefull.
Edit: Added average to calculation of script results.
Edit2: Increasing TEST_RUNS in the above script leads to "more" normally distributed results (quite obvious as we increase the sample size).
With a value of 50 i got the following results:
Max: 116 - Min: 98 - Average: 110.207
Edit3: Switched to ext2; added bonnie++ results for ext2
Best regards
wonko
Bookmarks