# Benchmark

## Raspberry Pi 4

**Date:** 12.02.2021\
**Version:** 2.1.0 (non-public release)&#x20;

**Goal:** Bandwidth Limitation Test (HLS Sessions)

{% embed url="<https://www.youtube.com/watch?v=z3Xd6AoZHpI>" %}

### Settings

{% tabs %}
{% tab title="Core enviroments" %}

#### ENV

```
CORE_SESSION_BANDWIDTH_LIMIT=800
```

{% endtab %}

{% tab title="Kernel tuning" %}
{% code lineNumbers="true" %}

```
sysctl -w net.core.netdev_budget_usecs=60000
sysctl -w net.core.netdev_budget=900
sysctl -w net.core.rmem_max=26214400
sysctl -w net.core.wmem_max=2621440
```

{% endcode %}
{% endtab %}

{% tab title="Network tunung" %}
{% code lineNumbers="true" %}

```
echo "6" > /proc/irq/33/smp_affinity
echo "1-2" > /proc/irq/33/smp_affinity_list
echo c > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo c > /sys/class/net/eth1/queues/rx-0/rps_cpus
echo c > /sys/class/net/eth0/queues/tx-0/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-1/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-2/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-3/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-4/xps_cpus
/sbin/ethtool -K eth0 rx-checksum on
/sbin/ethtool -K eth1 rx-checksum on
```

{% endcode %}

####

#### Knowledge

{% embed url="<https://www.linkedin.com/pulse/bifr%C3%B6st-rpi-4b-hybrid-routing-bridge-tuning-linux-network-corner?trk=read_related_article-card_title>" %}
{% endtab %}
{% endtabs %}

### Results

{% tabs %}
{% tab title="Test 1" %}

#### 1x H.264 Encoding (1280x720, 1 Mbit/s)

Active HLS-Sessions: 696
{% endtab %}

{% tab title="Test 2" %}

#### 1x H.264 Encoding (1280x720, 2 Mbit/s)

Active HLS-Sessions: 350
{% endtab %}

{% tab title="Test 3" %}

#### 1x H.264 Encoding (1280x720, 4 Mbit/s)

Active HLS-Sessions: 184
{% endtab %}
{% endtabs %}

{% hint style="success" %}
The limitation was the network card, not the CPU, memory, or application.
{% endhint %}
