ITCooky Recipes

Lets cooky it yammy things!

Lets test disk speed with fio and use the Chinese PCIE-SATA adapter on Marvell 88SE9125!

дата November 10, 2019

Old computers can still be useful for all kinds of server functions. Unfortunately, some are so old that they already have pregnant capacitors, but now it’s not about that! I wanted a little more HDD speed, but for this we must first measure its speed, and then connect some HDD to the new SATAIII, and I will do it!

Previously, I measured the speed with the sysbench program, it gave the result in one digit, that was worth in relation to other measurements! To say who is faster. But they changed something with a new update and there isn’t a single number now … So, I changed to fio and measured a lot of my stuff again!

The results are valuable for me just to compare “how much better or worse”, so it is important to make all measurements with the same command (four), the values have nothing to do with what the manufacturer has declared, and neither they even correspond to the sensations!

fio -direct=1 -iodepth=128 -rw=randrw -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest1g4k -name=randrw_test1g4k
fio -direct=1 -iodepth=128 -rw=randrw -bs=4k -size=15G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest15g4k -name=randrw_test15g4k
fio -direct=1 -iodepth=128 -rw=randrw -bs=16k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest1g16k -name=randrw_test1g16k
fio -direct=1 -iodepth=128 -rw=randrw -bs=16k -size=15G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest15g16k -name=randrw_test15g16k

The size of the bs block is also very important, since once instead of 16 I wrote 15 and the speed was immediately halved. And by the way, the test lasts about 40 minutes! From the result I take the lines where reading and writing are written, somewhere in the middle of all the output! Well it’s here:

Here are some measures, the table describes in detail under what conditions.
The speed of the old and cheap SSD, compared to the new and not cheap! There is a difference and waaaaaaaaaaaaaa!

Compare on a matheboard, units on SATAII and SATAIII. SATA2 has old disks without SATA3 support, since each of them can die at any time, so they are in RAID miror software, MD / RAID. I expected that in SATA3 the speed was double … but its not!

And here is a comparison of the speed of the SD card in the Orange and Raspberry minicomputers. The better card (marked with speed characteristics), the higher the speed, of course, they are still lower than the looser eMMCs, which are not placed in any Raspberry, but are placed in an Orange! It is surprising that the speed of SD cards is comparable with SATAII and eMMC with cheap SSD!

I buy a PCIE / PCI-E adapter in SATAIII on a Marvell 88SE9125 chip like this
H1111Z добавить на карту контроллер SATA 3 PCIE SATA3 PCIE/PCI-E SATA карта/расширение/мультипликатор PCI Express SATA порт Marvell 88SE9125 658.46 rubles now with discount costs 437.93 rubles.

Specifically I searched for a card in Marvell 88SE9125, it is automatically detected in Ubuntu18 and FreeBSD11. It is equipped with two SATA ports, but the Chinese sometimes screw more! For normal operation, you need PCIe 2.0, the first one also works, but only in SATAII. The speed of PCIe 2.0 is 5.0 Gbps, and SATAIII is 6.0 Gbps, the units obviously connected through this adapter will show a lower speed than those subscribed to the SATAII controller on the motherboard.

This is how it looks

It comes with two slats, it looks good in the case!

This is what Ubuntu says about this device

03:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9125 PCIe SATA 6.0 Gb/s controller (rev 11)

lspci -vv

03:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9125 PCIe SATA 6.0 Gb/s controller (rev 11) (prog-if 01 [AHCI 1.0])
	Subsystem: Marvell Technology Group Ltd. 88SE9125 PCIe SATA 6.0 Gb/s controller
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 27
	Region 0: I/O ports at d000
	Region 1: I/O ports at d000
	Region 2: I/O ports at d000
	Region 3: I/O ports at d000
	Region 4: I/O ports at d004
	Region 5: Memory at f7d10000 (32-bit, non-prefetchable) [size=2K]
	Expansion ROM at f7d00000 [disabled] [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: ahci
	Kernel modules: ahci

First, I will connect MD / RAID discs.

Let’s see what SATA controllers are on the motherboard, without a PCI-E adapter
lspci | grep -i sata

00:1f.2 IDE interface: Intel Corporation 7 Series/C210 Series Chipset Family 4-port SATA Controller [IDE mode] (rev 04)
00:1f.5 IDE interface: Intel Corporation 7 Series/C210 Series Chipset Family 2-port SATA Controller [IDE mode] (rev 04)

I have it like this on my motherboard, one 2 SATA3 ports and another 4 ports in SATA2

Now let’s see the discs
dmesg | grep -i sata | grep 'link up'

[    1.440441] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 330)
[    1.440591] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 330)
[    1.752460] ata1.00: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
[    1.752481] ata1.01: SATA link up 3.0 Gbps (SStatus 123 SControl 330)
[    2.480433] ata2.00: SATA link up 6.0 Gbps (SStatus 133 SControl 330)

ATA is somehow mixed, but so far, two disks in SATA3, two in SATA2 and the archaic spin of the disks in SATA coincide!
Ubuntu automatically assigns a unique name to each unit, and you can plug it into any port, the boot will find it; Unlike FreeBSD, you must assign label units manually!

More information about the disks, there is a model name, size, but there is no speed and what ATA is using
sudo lshw -c storage -c disk

Well, before and after! The first is software-reflected RAID, MD / RAID with drives that only know SATAII

I definitely didn’t slow down, even a little better! To add more PCIE2.0 SATAII ports to the motherboard, you can take H1111Z!

Now I am testing the SATAIII unit that was connected to the motherboard.

Here the H1111Z produces something similar to SATAIII, the speed drops were inevitable, but I expected them to be less!

Now, about the sad thing, I have an anomaly in the motherboard GIGABYTE GA-H77M-D3H: SATA controllers work somehow badly. For example, the WDC WD10EZEX unit produces the same speeds on the SATA2 and SATA3 ports. It was possible to measure another disk on the board where SATA2 is the maximum, here:

The speeds for a 1 Gb file are the same in all ports, as in SATA2 in another motherboard, and 15 Gb in GA-H77M-D3H are twice as high, I don’t know what to explain it… sad …

Leave a Reply

Your email address will not be published. Required fields are marked *