# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datarhei.com/core/development/benchmark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
