freebsd 6x slower than Raspbian 10 buster on RPi 4b

Mike Knell m at blat.at
Mon Feb 8 20:17:02 UTC 2021



> On 8 Feb 2021, at 21:12, Elwood Downey <elwood.downey at gmail.com> wrote:
> 
> Hello all!
> 
> Just wanted to share a comparison I did between freebsd and raspbian on the
> same RPi 4b with 1 GB RAM. I wrote a tiny C++ program that creates
> pthreads, each of which mallocs an array and spins filling it with sqrtf of
> the array index. Setting it to 3 threads (the hw has 4 cores), I found
> freebsd takes consistently 6.5x wall-clock time longer than with raspbian.
> Below are the sessions for each showing pertinent details. Attached is the
> program itself (if it doesn't make it through the newsgroup, mail me direct
> for a copy). One good news is the thread overhead for freebsd is about 100x
> smaller so kudos to the scheduler.
> 
> This is surprising and disappointing. Any comments welcome, especially what
> I'm doing wrong here. Thank you for your time.

It looks to me like you’re running a CURRENT snapshot - this is built with
the debugging kernel config which has a major performance impact. If
you build a kernel using the CURRENT-NODEBUG config (i.e. cd /usr/src && 
make buildkernel KERNCONF=CURRENT-NODEBUG ) you’ll probably find that speeds
things up a bit. -CURRENT is development code and should be treated as such.

Mike


More information about the freebsd-arm mailing list