Bananian

SATA port multiplier support

107 45379
A sata port multiplier is essentially a multiplexer, it cannot increase overall bandwidth when you are using SSD's.

Using rotating media, you might get a slight speedup, if the software supports switching to drive B while drive A is seeking etc.

The bottlenecks are:

- max possible SATA read speed of the A20 chipset
- max possible transfer rate of the drives

Post Last Edited by ManuelOrtega at 2014-10-5 14:29

Post Last Edited by ManuelOrtega at 2014-10-5 14:24

Reply 30# dupont-y

...You have to configure your kernel with PMP AND patch linux-sunxi/drivers/ata/sw_ahci_platform.c
as explained before...
   
Please can you confirm that these are the steps to achieve the PMP activation:


  • apt-get install git build-essential libncurses5-dev u-boot-tools uboot-mkimage
  • cd ~
  • git clone https://github.com/LeMaker/linux-bananapi.git --depth 1
  • cd linux-bananapi
  • make sun7i_defconfig
  • make menuconfig
  • make -j2 uImage modules
  • make modules_install
  • mount /dev/mmcblk0p1 /boot
  • cp arch/arm/boot/uImage /boot
  • reboot


I supose that I have to remove the "AHCI_HFLAG_NO_PMP" from the <kernel source>/drivers/ata/sw_ahci_platform.c  after the step 3. Is it correct?


Sorry but I am begining in linux and I need the easiest explanation possible.
Thanks in advance.

Post Last Edited by dupont-y at 2014-10-5 16:49

Reply 31# mikronauts


Yeah sure, you obviously can't go higher than the upstream single sata channel ! But BananaPI is sata3 and sata3 is 3 Gbps, which gives roughly 300 MB/s. It's probably optimistic, but I already tested bananapi  with SSD over 200 MB/S if I remember correctly. I don't have a SSD to test right now, but 3 SATA disks, each is able (alone) of ~ 100 MB/S.

When I use Parallel read/write on 3 disks, I only get ~30 MB/S for each disks, and an aggregate Bandwidth lower than 100 MB/S . I was hoping for a little more.

That's why I talked about bottleneck somewhere.

tkaiser  
Reply 33# dupont-y

I already tested bananapi  with SSD over 200 MB/S if I remember correctly


Then it's likely you tested disk cache/buffers. I measured different SATA devices on a few A20 based boards and never got more than 48 MBytes/sec writing and close to 120 MBytes/sec reading. Regarding Port Multipliers: You will only be able to achieve higher speeds than a single disk could provide if both SATA host adapter and Port Multiplier will support FIS-based switching (instead of CBS like the cheaper ones eg. the aforementioned JMB321 do).

tkaiser  
Reply 34# tkaiser

never got more than 48 MBytes/sec writing and close to 120 MBytes/sec reading


Oops, I've been wrong before. Just did a few tests using a Samsung 840 EVO SSD (ext4 with TRIM), different cpufreq settings, different SMP affinity for the SATA IRQs:
  1. iozone -a -g 2000m -s 2000m -i 0 -i 1 -r$record_size
Copy the Code
With 1008 MHz I get these speeds:
  1. echo -n ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  2. echo -n 1008000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

  3. reclen   write rewrite    read    reread
  4.      4   45011   44520   196259   198424
  5.    512   43142   43635   160186   161174
  6. 16384   43827   43430   163864   164410
Copy the Code
With 1.2 GHz these:
  1. echo -n ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  2. echo -n 1200000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

  3. reclen   write rewrite    read    reread
  4.      4   44706   45128   208987   210481
  5.    512   43911   44096   186855   187892
  6. 16384   43910   43283   190909   191371
Copy the Code
And this might be the maximum transfer speeds one can achieve while not overclocking the BananaPi too much:
  1. echo 2 >/proc/irq/$(cat /proc/interrupts | grep sw_ahci | cut -f 1 -d ":" | tr -d " ")/smp_affinity
  2. echo -n performance >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  3. echo -n 1200000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

  4. reclen   write rewrite    read    reread
  5.      4   44760   45039   215875   216835
  6.    512   43978   43786   189857   190282
  7. 16384   44098   43250   193948   194755
Copy the Code

Post Last Edited by dupont-y at 2014-10-6 06:44

Reply 34# tkaiser


    HUm good point. Ignored the difference between FIS & CBS based switching.

cf :  http://en.wikipedia.org/wiki/Port_multiplier

and also https://www.sata-io.org/port-multipliers

Of course , it explains a lot !
Thanks,

Of course, if you know cheap FIS based switching card (or chipset) I'll glad to hear !

Reply  thermopyle

I could compile a separate kernel and provide it for download. Would that help y ...
Bananian Posted at 2014-10-4 03:37


Yes please


Hi all,
rwelteroth, Bananian, thermopyle:
I am also looking for a PMP support activation. I am newbi ...
ManuelOrtega Posted at 2014-10-4 17:10



that image should provide what you're looking for.

tkaiser  
Of course, if you know cheap FIS based switching card (or chipset) I'll glad to hear !
dupont-y Posted at 2014-10-6 06:39


AFAIK the only Multiplier chip that supports FIS based switching is SiliconImage's SiI 3726. But they're not cheap (twice as much as a BananaPi). And the host adapter (the A20 SoC) has to support the feature also (the only ARM SoCs I know that do this for sure: Marvell Kirkwood/ARMADA)

Post Last Edited by dupont-y at 2014-10-6 14:26

Of course if it's 2x the Bpi price, interest is questionable. For the same price you can also find JMB393 based card , doing native RAID,  and in that case you don't even need pmp.
No idea  of the performance of that beast. And for some particular needs (I want to drive each sata dik independantly), it's not an answer.

You have to log in before you can reply Login | Sign Up

Points Rules