Added documentation about effects of CPU scaling events on daemon streams and patched daemon test scripts to disable CPU scaling
This commit is contained in:
parent
acb1e55d08
commit
c68d53c9bc
19
README.md
19
README.md
@ -121,10 +121,11 @@ The following ARM platform have been used for testing:
|
|||||||
The BeagleBone® Black board with ARM Cortex-A8 32-Bit processor.
|
The BeagleBone® Black board with ARM Cortex-A8 32-Bit processor.
|
||||||
See [Ubuntu 18.04 on BeagleBone® Black](https://elinux.org/BeagleBoardUbuntu) for additional information about how to setup Ubuntu on this board.
|
See [Ubuntu 18.04 on BeagleBone® Black](https://elinux.org/BeagleBoardUbuntu) for additional information about how to setup Ubuntu on this board.
|
||||||
|
|
||||||
The NanoPi NEO2 with Allwinner H5, Quad-core 64-bit high-performance Cortex A53 processor.
|
The NanoPi NEO2 with Allwinner H5 Quad-core 64-bit Cortex A53 processor.
|
||||||
See [Armbian NanoPi NEO2 ](https://www.armbian.com/nanopi-neo-2/) for additional information about how to setup Ubuntu on this board.
|
See [Armbian NanoPi NEO2 ](https://www.armbian.com/nanopi-neo-2/) for additional information about how to setup Ubuntu on this board.
|
||||||
|
|
||||||
The [ubuntu-packages.sh](ubuntu-packages.sh) script can be used to install all the packages required to compile and run the AES67 daemon, and the [platform compatibility test](#test).
|
The [ubuntu-packages.sh](ubuntu-packages.sh) script can be used to install all the packages required to compile and run the AES67 daemon, and the [platform compatibility test](#test).
|
||||||
|
**_Important_** CPU scale events could affect daemon streams adding unexpected distortions, see [CPU scale events and scripts notes](#notes).
|
||||||
**_Important_** _PulseAudio_ must be disabled or uninstalled for the daemon to work properly, see [PulseAudio and scripts notes](#notes).
|
**_Important_** _PulseAudio_ must be disabled or uninstalled for the daemon to work properly, see [PulseAudio and scripts notes](#notes).
|
||||||
|
|
||||||
## How to build ##
|
## How to build ##
|
||||||
@ -267,6 +268,22 @@ make sure that no instances of the aes67-daemon are running, enter the [tests](d
|
|||||||
|
|
||||||
* All the scripts in this repository are provided as a reference to help setting up the system and run the platform compatibility test.
|
* All the scripts in this repository are provided as a reference to help setting up the system and run the platform compatibility test.
|
||||||
They have been tested on **Ubuntu 18.04 19.10 20.04** distros.
|
They have been tested on **Ubuntu 18.04 19.10 20.04** distros.
|
||||||
|
* CPU scale events could have an impact on daemon streams causing unexpected distortion for a few seconds, see #96.
|
||||||
|
Before running the daemon make sure you disable CPU scaling events:
|
||||||
|
|
||||||
|
Check if CPU scaling is enabled with:
|
||||||
|
|
||||||
|
cat /proc/sys/kernel/perf_cpu_time_max_percent
|
||||||
|
|
||||||
|
If result is not 0, (it's usually set to 25) set it to 0 with:
|
||||||
|
|
||||||
|
sudo sysctl -w kernel.perf_cpu_time_max_percent=0
|
||||||
|
|
||||||
|
You may also want to review the current CPU scaling governor with (cpu0 in this case):
|
||||||
|
|
||||||
|
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
|
|
||||||
|
See https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt for dditional info.
|
||||||
* **PulseAudio** can create instability problems.
|
* **PulseAudio** can create instability problems.
|
||||||
Before running the daemon verify that PulseAudio is not running with:
|
Before running the daemon verify that PulseAudio is not running with:
|
||||||
|
|
||||||
|
4
daemon/scripts/disable_cpu_scaling.sh
Executable file
4
daemon/scripts/disable_cpu_scaling.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo sysctl -w kernel.perf_cpu_time_max_percent=0
|
||||||
|
|
@ -107,6 +107,7 @@ trap cleanup EXIT
|
|||||||
|
|
||||||
#configure system parms
|
#configure system parms
|
||||||
sudo sysctl -w net/ipv4/igmp_max_memberships=66
|
sudo sysctl -w net/ipv4/igmp_max_memberships=66
|
||||||
|
sudo sysctl -w kernel/perf_cpu_time_max_percent=0
|
||||||
|
|
||||||
if [ -x /usr/bin/pulseaudio ]; then
|
if [ -x /usr/bin/pulseaudio ]; then
|
||||||
#stop pulseaudio, this seems to open/close ALSA continuosly
|
#stop pulseaudio, this seems to open/close ALSA continuosly
|
||||||
|
@ -94,6 +94,7 @@ trap cleanup EXIT
|
|||||||
|
|
||||||
#configure system parms
|
#configure system parms
|
||||||
sudo sysctl -w net/ipv4/igmp_max_memberships=66
|
sudo sysctl -w net/ipv4/igmp_max_memberships=66
|
||||||
|
sudo sysctl -w kernel/perf_cpu_time_max_percent=0
|
||||||
|
|
||||||
if [ -x /usr/bin/pulseaudio ]; then
|
if [ -x /usr/bin/pulseaudio ]; then
|
||||||
#stop pulseaudio, this seems to open/close ALSA continuosly
|
#stop pulseaudio, this seems to open/close ALSA continuosly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user