Manage cookies

We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.

The necessary cookies help to make the website work properly.

Anonymous statistical cookies help to understand how visitors use the website.

  • Real Time Systems
    3 min | 12484

    #Rapberry Pi: Preempt-RT Kernel Performance on Rasbperry PI 3 Model B+

    Real Time Systems | 3 min | 12484


    The Raspberry Pi 3 Model B+ (Fig. 1) is now on sale and I bought one two weeks ago. The main modifications are the followings:

    • A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU
    • Dual-band 802.11ac wireless LAN and Bluetooth 4.2
    • Faster Ethernet (Gigabit Ethernet over USB 2.0)
    • Power-over-Ethernet support (with separate PoE HAT)
    • Improved PXE network and USB mass-storage booting
    • Improved thermal management
    Raspberry Pi 3 B+
    Fig. 1: Raspberry Pi 3 Model B+

    The Raspberry Pi uses now the LAN2515 chip from Microchip instead of the LAN9514 for Ethernet and the USB Ports.

    If you are looking for some Benchmarking of the new model, Gareth Halfacree has some nice graphics on his website.

    If you are planning to use a heatsink on the new model, please check that the new SoC packaging has a hole, and you shouldn't cover it. Some people are writing that the heat spreader (metal bit on the Fig. 1) reaches to dissipate the heat generated and you don't need an extra heatsink. But, if you are like me, and you are using the Raspberry Pi for (near) real-time applications, with data processing, you should use some additional cooling system. It goes really hot!. The PXE Ethernet Hat, which is coming soon, has a fan. It could be an option!

    As usual on my last posts, I compiled the last version of the Preempt-RT Patched Kernel to test its performance on this new model. As I wrote in this post, the Preempt-RT 4.14.y version is now a branch of the official Raspberry Pi repository. If you need help to compile it, I wrote this tutorial.

    The version that I used was the following: Linux version 4.14.27-rt21. That means, kernel version 4.14.27 with patch rt21. The repository updates very often, that means, may be when I finished writing this, it could be a different version. (Indeed: The version now is 4.14.29-rt25)

    Latency

    I used the RT-tools again to test the latency of the Preempt-RT and the Standard Kernels on the new Raspberry Pi 3 Model B+.

    sudo cyclictest -l50000000 -m -S -p90 -i200 -h400 -q > output.txt

    The results are the following:

    Standard Raspbian Kernel on Pi 3 B+Preempt-RT Kernel Latency
    Fig. 2 (a): Latency Using Standard Raspbian Kernel
    (4.14.27-v7+) on Raspberry Pi 3 B+.
    (b): Latency Using Preempt-RT Raspbian Kernel
    (4.14.27-rt21-v7+) on Raspberry Pi 3 B+.

    To compare the results, I repeated the test with the Raspberry 3 Model B. I used the same micro SD card with the same configuration. The ambient temperature was about 20°C.

    Standard Raspbian Kernel on Pi 3 BPreempt-RT Kernel Latency
    Fig. 3 (a): Latency Using Standard Raspbian Kernel
    (4.14.27-v7+) on Raspberry Pi 3 B.
    (b): Latency Using Preempt-RT Raspbian Kernel
    (4.14.27-rt21-v7+) on Raspberry Pi 3 B.

    The standard kernel on the model B+ is more irregular: There are more 'samples' between 160us and 400us and the maximal latency is slightly higher (390us (B+) vs 382us (B)). The latency improvement on the Raspberry Pi 3 Model B+ using the Preempt-RT kernel is better (109us (B+) vs 136us (B)).

    Performance

    I thought the new LAN2515 chip for USB and LAN, and the drivers would reduce the problem with IRQ39. But no, the problem remains. That means, if you are using the LAN or USB port/connection, you need to add the following line to /boot/cmdline.txt

    ~$ sudo nano /boot/cmdline.txt
    # Add the following options:
    dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0

    and you lose between 5-15% CPU performance (top results). But, to confirm the results of the top command, I programmed a script to resolve the "N-qeens Problem"! The results are here.


    Comments

    Manuel 07.18.2018

    Hi, I can't see your results for the N-queens problem, I'd like to see them!