catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
324 stars 78 forks source link

High CPU Load on my "GigaBlue UHD X3 4K" #1096

Closed misushot closed 1 year ago

misushot commented 1 year ago

Hi,

i have minisatip performance problems with my GigaBlue UHD X3 4K as server. When i start only one FTA stream to vlc or my other vtuners clients the cpu usage go up to 100% on one core and the stream have freezes.

On my old satip-axe "Telestar Digibit R1" no problems with cpu usage or freezes.

I need a solution to become my setup stable, what i can do?

/etc/default/minisatip MINISATIP_OPTS="-j 0:16-1530,1:17-1566,2:18-1602,3:19-1638,4:20-1716,5:21-1752,6:22-1788,7:23-1824 -x 8080 -k -E"

minisatip version 1.2.76~73a5630, compiled in Mar 31 2023 17:10:59, with s2api version: 050B [14/04 11:00:21.501 main]: Built with dvbcsa [14/04 11:00:21.501 main]: Built with CI [14/04 11:00:21.502 main]: Built with dvbapi [14/04 11:00:21.502 main]: Built with tables processing [14/04 11:00:21.502 main]: Built with pmt processing [14/04 11:00:21.502 main]: Built with satip client [14/04 11:00:21.502 main]: Built with linux dvb client [14/04 11:00:21.502 main]: Built with backtrace [14/04 11:00:21.502 main]: Built without netceiver [14/04 11:00:21.502 main]: Built without ddci [14/04 11:00:21.502 main]: Built without t2mi

root@gbx34k:~# cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 54.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32 CPU implementer : 0x42 CPU architecture: 7 CPU variant : 0x0 CPU part : 0x100 CPU revision : 0

processor : 1 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 54.00 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm aes pmull sha1 sha2 crc32 CPU implementer : 0x42 CPU architecture: 7 CPU variant : 0x0 CPU part : 0x100 CPU revision : 0

Hardware : Broadcom STB (Flattened Device Tree) Revision : 0000 Serial : 0000000000000000

thanks

catalinii commented 1 year ago

Can you upload a log? ./minisatip -f -l http ...

misushot commented 1 year ago

Sat.1 SD - on Astra 19.2E minisatip.log is this log long enough?

started with /usr/bin/minisatip -R /usr/share/minisatip/html -j 0:16-1530,1:17-1566,2:18-1602,3:19-1638,4:20-1716,5:21-1752,6:22-1788,7:23-1824 -x 8080 --satip-tcp -E -k -f -l http > /home/root/minisatip.log

or need you full log with -l general,http,socketworks,adapter,satipc,pmt,tables,dvbapi,lock,netceiver,ca,axe,socket,utils,dmx,ssdp,dvb

patacalas commented 1 year ago

Same problem on Gigablue UHD Quad 4K I get usage 100% on one CPU core and the stream have a lot of freezes, almost unusable. minisatip

I'm doing some testing and it seems that the 100% CPU problem is related to channels configured with Unicable system.

I have frontends 2, 5, 6, 7 configured by Unicable with Astra, Hotbird and Hispasat. In addition, I have the frontend 9 with legacy diseqc for Thor, BulgariaSat and Eutelsat 9 satellites.

I am surfing the diseqc channels and the minisatip process on the server is around 2% CPU. When I tune to a channel that comes through the Unicable frontends, the CPU goes to 100% and problems starts again.

Jalle19 commented 1 year ago

Do you know if this is a recent problem? Do older versions work better?

patacalas commented 1 year ago

1.1.92 is the last version without the 100% CPU issue on my receiver.

I have tried different 1.2.x versions and using any Unicable related frontend on FBC tuners causes 100% CPU issue. Moreover, to reduce video glitches, I run minisatip with param -1 0 forcing the use of the dvrX device. The system is usable for me in this way, but I think that having the CPU at 100% load is not good, it wears out the system, increases heat and power consumption.

I also found that switching from Unicable to legacy frontend reduces CPU usage after the Unicable frontend timeout.

catalinii commented 1 year ago

Can u offer remote access?

patacalas commented 1 year ago

sorry, I can't give remote access

catalinii commented 1 year ago

I have a GB QUAD 4K UHD as well and I do not see anything similar. I do not have Unicable, so is hard to say. The only thing that would cause minisatip to take the CPU to 100% is decrypting. If that happens outside of decrypting of channels is not expected. Also, the difference between 1.1 and 1.2 is the fact that minisatip now can handle talking with the CAM directly on enigma.

catalinii commented 1 year ago

You can try compiling minisatip and commenting https://github.com/catalinii/minisatip/blob/master/src/ca.c#L2855-L2857

patacalas commented 1 year ago

I have a GB QUAD 4K UHD as well and I do not see anything similar. I do not have Unicable, so is hard to say. The only thing that would cause minisatip to take the CPU to 100% is decrypting. If that happens outside of decrypting of channels is not expected. Also, the difference between 1.1 and 1.2 is the fact that minisatip now can handle talking with the CAM directly on enigma.

But CPU 100% problem happens even on FTA channels. On legacy frontends works fine. Is there any option to disable decryption of channels? Clients can decrypt as well.

catalinii commented 1 year ago

Can u compile your own minisatip?

catalinii commented 1 year ago

Try this binary: http://minisatip.org/tmp/minisatip

misushot commented 1 year ago

@catalinii 100% CPU usage is gone with your binary, but i see problems with zap from one channel to another. i think its a problem with "Built without tables processing and Built without pmt processing" and my satip client in my enigma2 receiver setup. i see in the webgui not all pids. with sat-axe setup no problems. the second problem is a laggy stream with audio drops, i think a bufferproblem.

catalinii commented 1 year ago

Try removing -1 parameter. Again without remote access is hard to understand what is going on. It could be related to the CI....but is hard to understand why.

patacalas commented 1 year ago

Try this binary: http://minisatip.org/tmp/minisatip

What's new in this version? 100% CPU load solved for me on Gigablue UHD Quad 4k with this binary. Captura de pantalla 2023-04-23 a las 0 48 42

As with other recent versions, I have to use the -1 0 param to get video without audio lag and without dropped frames on client receivers.

patacalas commented 1 year ago

@catalinii 100% CPU usage is gone with your binary, but i see problems with zap from one channel to another. i think its a problem with "Built without tables processing and Built without pmt processing" and my satip client in my enigma2 receiver setup. i see in the webgui not all pids. with sat-axe setup no problems. the second problem is a laggy stream with audio drops, i think a bufferproblem.

Try adding -1 0 param to use dvrX device. It worked for me to solve laggy video problems.

catalinii commented 1 year ago

Just to be clear, -1 0 is just one way of getting the DVB data from the hardware. Issues such as broken audio are caused by the Gb drivers and that issue happens to me too

catalinii commented 1 year ago

TBH I am pretty unhappy with the drivers of GB quad 4k at the point that I want to buy something else.

for example gb quad (non 4k) does not have the issues the 4k version has, such as:

misushot commented 1 year ago

@catalinii thanks for compile a new binary without dvbcsa,CI,dvbapi,tables and pmt. @patacalas thanks for -1 0 (-1 --demux-dev [1|2|3]: -> 0 - use dvrX device) now it's 100% for me, fast tunning no audio/video drops :) the issue is resolved.

catalinii commented 1 year ago

On enigma boxes you should use 2 or 3 because otherwise scanning is not guaranteed to work.

If 0 works try 3. For me 2 works

misushot commented 1 year ago

0 and 2 works. but i use this box only for minisatip with init 4 without enigma2.

Jalle19 commented 1 year ago

Can this ticket be closed?

misushot commented 1 year ago

the problem is solved. you can close it :)

catalinii commented 1 year ago

I fixed in both next and master, seems there was a problem after all.