Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jun 2016 11:57:21 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        Gergely Imreh <imrehg@gmail.com>
Cc:        FreeBSD ARM <freebsd-arm@freebsd.org>, Ilya Bakulin <ilya@bakulin.de>
Subject:   Re: RPi2 i/o blocking and SD card performance
Message-ID:  <CABx9NuQVgCkT3u_jfLA=iML4nnCRRGLfrcUO%2BTRXbD2B9ChRqA@mail.gmail.com>
In-Reply-To: <CAJ3iQcoc5nVSFz3JKMG_Y9Q9k4PFizmp2rf3vfA7nv=u_12nBQ@mail.gmail.com>
References:  <CAJ3iQcoc5nVSFz3JKMG_Y9Q9k4PFizmp2rf3vfA7nv=u_12nBQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 9, 2016 at 2:37 AM, Gergely Imreh <imrehg@gmail.com> wrote:
> Hi,
>
> I've been testing FreeBSD 11.0-CURRENT on a RaspberryPi2. I'm relatively
> new to FreeBSD, and wondering if there's any advice for improving the
> performance a bit.
>
> First, it looks like there's a lot of i/o blocking behaviour going on. For
> example running MediaWiki on the board, if I compile any ports, the site
> itself is pretty much unusable (the PHP scripts time out even with 180s
> timeouts). The strangest thing is that the CPU usage is not at 100% all the
> way, can be that all 4 cores are ~99% idle, and still everything goes very
> slow. Once the ports compilation or any other i/o-related task is finished,
> it's snappy again.
>
> Any idea why it could be to have such big latency/lag even though the CPU
> is idle? Is there anything I could test?
>
> Second, I've also tried profiling the SD card a bit. The very same card
> (SanDisk 32GB), same RPi board once with a fresh install of FreeBSD and
> once with a fresh install of ArchLinuxARM, running bonnie++ -s 2000 (the
> results below)
>
> The block write perfomance on ArchLinux is ~55% higher (14M/s vs 9M/s),
> while rewrite and per char output is 4-5x larger. Block read is also ~70%
> larger (25M/s vs 15M/s). This is without any tuning. Any idea why the
> FreeBSD performance on the exact same hardware is so different, and whether
> it can be improved? I guess these two questions are related.

I would think that moving the ARM platform to Tier 1 will uncover lots
of nasty little performance bottlenecks that don't affect servers or
desktops? I actually noticed this discrepancy recently when creating
images on sd cards from the desktop (though I was using Debian for my
GNU/Linux machine) but shrugged it off because sd cards are so damn
slow, who cares anyhow? Although it's 55% faster on Linux, it's still
only a fraction of any other throughput...

I wonder if the new CAM based SDIO subsystem is any faster?


> FreeBSD:
> version  1.97       ------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
> rpi2          2000M    20  99  8924  14  2275   4    39  99 14873  14  33.9
>   4
> Latency               481ms    4407ms    8319ms     244ms     153ms
>  226s
> Version  1.97       ------Sequential Create------ --------Random
> Create--------
> rpi2                -Create-- --Read--- -Delete-- -Create-- --Read---
> -Delete--
>               files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec
> %CP
>                  16   660  25 10388 100  3483  99  1532  58 10702  99  3531
>  99
> Latency              2769ms     375us     754us    1967ms     253us
> 512us
>
> ArchLinux:
> Version  1.97       ------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
> alarmpi       2000M   102  99 13901  10  8089   7   579  99 25264   8  30.6
>   1
> Latency               115ms    5843ms    6381ms   22745us   54383us
> 40338ms
> Version  1.97       ------Sequential Create------ --------Random
> Create--------
> alarmpi             -Create-- --Read--- -Delete-- -Create-- --Read---
> -Delete--
>               files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec
> %CP
>                  16  4460  38 +++++ +++  6002  34  4137  34 +++++ +++  7440
>  43
> Latency              1391us    3885us    3757us    1068us     113us
>  1261us
>
>
> Cheers,
>    Greg
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuQVgCkT3u_jfLA=iML4nnCRRGLfrcUO%2BTRXbD2B9ChRqA>