3 3
Madozu

A20 SATA write speed improvement

Recommended Posts

I tested the recently added sunxi-dev patch to improve the SATA write speed. Here are the results:

 

Board: Cubietruck
OS: Ubuntu Bionic (18.04.2), Armbian 5.86
Kernel: 5.1.0 with and without RFC-drivers-ata-ahci_sunxi-Increased-SATA-AHCI-DMA-TX-RX-FIFOs.patch

SATA-device: SAMSUNG SSD 830 Series, 256GB

 

Measurement method: dd if=/dev/zero of=/tesfile bs=? count=? oflag=direct

bs: measured 4k, 64k and 1M block sizes
count: adjusted to ensure that data written is ~500MB

 

Measurements below are made with kernel 5.1.0 without (before) and with the mentioned patch:

dd bs  Before MB/s  After MB/s  Increase
4k            13.3        19.0       43%
64k           35.9        82.0      128%
1M            42.5       112.0      164%

As you can see, the SATA write speed improved, especially when using larger block sizes. Up to now, no negative side-effects encountered.

 

Share this post


Link to post
Share on other sites

Hi, could you indicate a step by step procedure for installing this kernel? I would love to try it!

Share this post


Link to post
Share on other sites
7 hours ago, Sigge said:

Hi, could you indicate a step by step procedure for installing this kernel? I would love to try it!

Either grab the build script and build your own kernel package (https://github.com/armbian/build) or simply wait until the next version bump and do a standard apt upgrade to get the fresh packages.

Share this post


Link to post
Share on other sites

 

Samsung SSD 840 Pro 256 GB @ Cubietruck

iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2

Kernel 3.4.y
                                                               random   random
                  reclen    write  rewrite     read   reread     read    write
          102400       4    10714    15285    31921    32280    16328    14767
          102400      16    21757    25767    57812    58010    45695    25201
          102400     512    33403    32429   128245   116062   109591    33595
          102400    1024    34846    35240   129965   131121   129515    35227
          102400   16384    37895    37918   207564   204627   204340    38019

Kernel 4.19.y with SATA improvement patch

          102400       4    22876    32704    37686    39143    22571    30990
          102400      16    54254    69325    94749    97225    61354    68529
          102400     512   110670   113325   190346   163677   186012   112679
          102400    1024   113971   115928   206044   207406   184936   115069
          102400   16384   127084   127588   243400   253305   252148   127611

without

          102400       4    18053    22336    45249    46338    24860    22292
          102400      16    30692    32188   106052   106577    71526    32746
          102400     512    39632    39978   186433   185444   178097    39939
          102400    1024    39860    40163   189900   191076   188446    40098
          102400   16384    38875    41508   241939   244088   243405    41314

 

Share this post


Link to post
Share on other sites
4 hours ago, Igor said:

Samsung SSD 840 Pro 256 GB @ Cubietruck iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2

Thank you Igor, the report of Madozu was not promising, not enough numbers. Yours look nice, some day I my Lamobo R1 comes back to life  :thumbup:

 

Share this post


Link to post
Share on other sites

This patch is included in -next already? I can test it with BananaPi M1.

 

::edit

commit messages seems to confirm it is in -next. ;) Bleh, more like in -dev. I need more coffee...

 

::edit2

4.9.38 (next), only one test made.
fs: btrfs
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     3951     5919    14107    14547     1337     4955
          102400      16     9908    14394    17473    32988     3338    10818
          102400     512    26440    27888    62459    73201    31875    30057
          102400    1024    26543    29481    61408    74973    36113    28225
          102400   16384    30315    34723    57029   109099   103228    38344

5.1.0-sunxi #5.86 SMP Mon May 13 21:11:09 CEST 2019 armv7l GNU/Linux (3 tests made)
fs: btrfs
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     6056     7318    19250    19427     1376     4393
          102400      16    16210    16483    42932    45765     5118    16473
          102400     512    57882    44149    58178    69361    38018    61066
          102400    1024    49587    55798    51267    78644    45696    63254
          102400   16384    30345    66470    64869    82639    80843    58395

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     5115     5813    18911    17605     1259     5124
          102400      16    16791    20273    18971    38345     4750    13755
          102400     512    36974    56462    62740    80449    33872    62893
          102400    1024    44808    34004    51920    83809    43962    66327
          102400   16384    57777    47181    44560    78107    79185    53640

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     4989     6186    16698    16474     1138     3173
          102400      16    11646    10015    38828    42461     4455    15354
          102400     512    47299    49030    57053    82134    29582    61737
          102400    1024    45468    35288    58417    81450    32958    64807
          102400   16384    55345    65883    78657    99487   104514    56825

This was made on 1TB spinning rust:

Device Model:     ST1000LM035-1RK172
User Capacity:    1,000,204,886,016 bytes [1.00 TB]

Share this post


Link to post
Share on other sites
58 minutes ago, lzb said:

Bleh, more like in -dev. 


... or nightly builds. It will soon be pushed to stable repository since there seems to be no reports on problems.

 

1 hour ago, lzb said:

I need more coffee...


Here :)

P1130568.JPG

Share this post


Link to post
Share on other sites
5 hours ago, MacBreaker said:

OT

 

Igor,

 

where i can get/buy some Cups for coffee like these?

 

Markus

 


This is/was a limited edition (6pcs, two already broken) gift by TJoe @Code4Sale LLC He made them for Ohio Linux fest:

_ForIgor.png

Share this post


Link to post
Share on other sites

I just got an Olinuxino Lime2 and will soon get a cheap SATA SSD. What would be a good way of testing if the patch messes up read/write access or does any other harm to the system? I remember a message in another thread talking of edge cases of some sort - is there a way of artificially creating them or having a higher probability for those? I am willing to let the board run on tests for some weeks if necessary to find out.

Share this post


Link to post
Share on other sites

Thanks @Tido for this link, I hadn't seen it and it gives quite a good explanation to why it took so long and why it's so difficult to have a decent SATA speed on Allwinner boards. :-)  So I think testing should include all different kinds of transfer block sizes, verifying the write result on the fly, just to be sure that one trial-and-error-finding is as good as the previous trial-and-error-finding, which has already been tested since 2014. :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
3 3