Project

General

Profile

Improvement on CC errors

Added by Alfred Zastrow about 7 years ago

Hi,

I'm using very low end CPUs for my TVH server and the clients: Asrock N3700 with three PCIE slots for the sat cards from DD and Asrock N3700-ITX for the clients. The CPUs are Intel Pentium N3700 with 4 cores shown in /proc/cpuinfo (it could also be 2 cores with hyperthreading, I'm not sure).
I was facing increasing CC errors when one client was switching channel and I identified some reasons:

1st: During one of the Asrock UEFI-Bios Updates the ACPI-HPET was silent disabled (you can find it in the extended/advanced configuration under ACPI: Enable it

2nd: And this is also (mayby more) important for the KODI-boxes: Deinstall or diable the irqbalancer daemon. This one get's installed (under Debian for example), when in aptitude the switch "install recommended pakets" is set. It is also a good idea to unset this switch.

3rd: it's a good idea too to run this CPUs in performance mode. CPUfreq is a bit oversized, therefore I'm using a simple systemd unit which is started very early after booting.

[Unit]
Description=CPU frequency scaling daemon

[Service]
Type=oneshot
RemainAfterExit=no
EnvironmentFile=/etc/default/cpufrequtils
ExecStart=/bin/sh -c '/bin/echo $governor | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null'

[Install]
WantedBy=sysinit.target

With all these measures the CC errors are almost gone for me. Maybe it could be a help for other users.

br
Alfred


Replies (6)

RE: Improvement on CC errors - Added by Michael Wieland almost 7 years ago

What exactly is "$governor" in your case? I don't have the /etc/default/cpufrequtils file.

RE: Improvement on CC errors - Added by Alfred Zastrow almost 7 years ago

governor="performance"

is the content of my /etc/default/cpufrequtils file

RE: Improvement on CC errors - Added by saen acro almost 7 years ago

With this advice CPU will produce more heat.
In newer kernel's CPU is controlled by P states not by ACPI.
Removing IRQBalance will produce lag in some of real cores of cpu
you can see difference with

watch -d "cat /proc/interrupts" 

edit your /etc/modprobe.d/ddbridge.conf

options ddbridge adapter_alloc=3 msi=0
and restart

Use powertop
calibrate it run it use optimisations.

RE: Improvement on CC errors - Added by Alfred Zastrow almost 7 years ago

Point me to the "lag" please.

            CPU0       CPU1       CPU2       CPU3
   0:         16          0          0          0   IO-APIC    2-edge      timer
   5:          0          0          0          0   IO-APIC    5-edge      parport0
   8:          0          0          1          0   IO-APIC    8-fasteoi   rtc0
   9:          0          0          0          0   IO-APIC    9-fasteoi   acpi
  16:     157643     159155     157750     159162   IO-APIC   16-fasteoi   DDBridge
  17:        171        174        165        191   IO-APIC   17-fasteoi   DDBridge
  18:          0          0          0          0   IO-APIC   18-fasteoi   i801_smbus
 115:          0          0          0          0   PCI-MSI 458752-edge      PCIe PME
 116:          0          0          0          0   PCI-MSI 460800-edge      PCIe PME
 117:          0          0          0          0   PCI-MSI 464896-edge      PCIe PME
 118:       3808       3823       3827       3819   PCI-MSI 311296-edge      ahci[0000:00:13.0]
 119:         10          9          9          6   PCI-MSI 327680-edge      xhci_hcd
 120:     148599     147024     148489     147061   PCI-MSI 1572864-edge      enp3s0
 121:      14271      14307      14259      14256   PCI-MSI 32768-edge      i915
 122:        144        150        145        150   PCI-MSI 442368-edge      snd_hda_intel:card0
 NMI:         90         21         19         19   Non-maskable interrupts
 LOC:   12719085   11453043   12149559   11913869   Local timer interrupts
 SPU:          0          0          0          0   Spurious interrupts
 PMI:         90         21         19         19   Performance monitoring interrupts
 IWI:          3          0          0          0   IRQ work interrupts
 RTR:          0          0          0          0   APIC ICR read retries
 RES:       7164       5006       7572       6704   Rescheduling interrupts
 CAL:       2580       2525       4129       3126   Function call interrupts
 TLB:         76         72         56         41   TLB shootdowns
 TRM:          0          0          0          0   Thermal event interrupts
 THR:          0          0          0          0   Threshold APIC interrupts
 DFR:          0          0          0          0   Deferred Error APIC interrupts
 MCE:          0          0          0          0   Machine check exceptions
 MCP:        241        241        241        241   Machine check polls
 ERR:          1

btw.: regarding ACPI: The "High Precision Event Timer (HPET)" feature is listed within the ACPI-Options of the Asrock BIOS.
btw2: "more heat" needs more power consumtion, I can't measure it.

RE: Improvement on CC errors - Added by saen acro almost 7 years ago

your lan card how traffic pass?
https://www.phoronix.com/scan.php?page=article&item=intel_pstate_linux315&num=1

after kernel 4.4 ACPI is not used as before.

you can use lm-sensors

RE: Improvement on CC errors - Added by Alfred Zastrow almost 7 years ago

Sorry, but I stop this discussion now.

    (1-6/6)