HC4 CPU utilization

Hi all, what’s the normal idle CPU utilization?
doing literally nothing, everything possible disabled (mariadb, tvheadend, sundtek driver and so on, everything that was possible to be disabled and make sense to be disabled) and ~40-50% of CPU is utilized. which is insane.
updating library and CPU utlization goes to ~80%, running any media file during that time, it goes to ~100%, but fortunatelly it runs smoothly.
but running TV channel via TVH client using sundtek skytv 6 dongle and it goes over 100% and the stream is lagging. little bit better it is when playing TV channels over LAN on the Windows laptop Kodi.
I understood that HC4 has plenty of computing power for this. is there something wrong with CE?
previously I ran LE, but that’s still not finetuned and has it’s flaws regarding TV channel processing. that’s why I went to CE. but LE didn’t have this high CPU utlization. idle about 25% and playing media file and updating library about 60%.

Connect to it via SSH and run top.
This should list the processes that are using up CPU at the top.
Post a screenshot.

Hi, thanks for response. I took three screenshots.

  • after reboot updating library
  • playing TV Channel (TVH Server and client on the same box) having heavy lags, with library update already manually stopped
    I tried all three TVH Server version available, 4.2, 4.3 and Docker image
    it’s almost without lag if I’m using TVH client connected to the other box TVH Server, when I switch the tuner there. it’s Sundekt skytv 6 and it’s working and was working with LE Krypton flawlessly.
  • and doing nothing - no idea why smbd is taking any CPU during that time and I don’t like it that I don’t know is it doing.

btw, those values don’t match what’s shown on the tv screen when I enabled logging in the system settings. that’s showing even higher figures.

I understand that HC4 image is still in development and it’s support is based on best effort of developers. I’m not bitching I just want to resolve it, as I did want to use the HC4 as cheap NAS solution with Kodi capability.

and I saw kodi.bin took ~25% of the CPU in the morning, but then I rebooted and it was back again. so other thing is not only the CPU usage, but I don’t like really it’s background activity.

I would suggest to do a clean install.
It’s possible that there’s something that’s screwed up with your installation.
Also check what are the SoC temps. It’s possible that if it’s overheating, the system is throttling, and processes that are usually very light are using a lot of CPU.

I have it in a closed cabinet, I opened the cabinet and did put it on the improvised stand. 61 deg. Celsius, doing nothing.

btw, do you know some recommended USB hub that I may use with it?
I need to connect remote IR dongle (as it’s in the closed cabinet and can’t utilize the builtin IR), BT dongle, Sundtek tuner and once perhaps 2nd Sundtek tuner and also to have one spare port if needed. so at least 5 ports.

Any hub should work, if you want to run tuners from it, it’s preferred to use a powered USB hub.
61C is pretty hot, but it’s still well below the throttling point. So my suggestion is to do a clean install.

the sundtek tuners have their own power supply, but I’ll get powered one, just to be sure. i’ll try fresh install. I had LE HC4 image installed just before I went to CE, because I was used to LE before. LE HC4 have some video driver issue, scrambling picture of live TV and from time to time other media as well. I guess it’s jsut less mature then CE HC4 image, as the development obviously started later, but there wasn’t problem with this CPU utilization. so I’ll try fresh installation of CE.

To minimize CPU usage I recommend you to use native linux file systems like ext4 for example on your storage. NTFS also could use enough of CPU resources.

I’ve tested my HC4 with tvheadend server and client and my dvb-c USB tuner and CPU usage is low. Are you sure you didn’t disable HW decoding for your live tv?

I suggest doing a clean install on a different sd card and don’t copy the configs. Then see what the cpu usage is. I bet it will be normal which means it’s your setup/settings

how do I format the drive from SSH of CE? I didn’t find any guide, sorry.

You don’t. Just follow the install guide.

ok, so I did clean install. it works fine now. cpu utilization is ok.

however I see other issues. dunno why random videos each freeze at every time at same point and other play just fine. when I play same file over network from my laptop, it works fine.

and sundtek skytv dongle, even it worked great before on x86 LE 8, I already learned it doesn’t with latest LE or CE.

so one issue solved, two new popped up. :smiley:

What exactly is the issue?

Quite often playback issues are due to poor encodes. This doesn’t always effect all platforms equally as some software decoders have better error correction/rejection procedures than others. The only way to establish if it is your individual install that is at fault or if its a general failure of CE to handle your encodes is to try them on another distinct CE machine and see if the behaviour is replicated. Basically the fact that your vids play on a PC is evidence of little.

it’s not lagging, I found out. It;s the TVH PVR client on the HC4 is dropping scrambled bits and when I tried TVH PVR in Kodi client on my laptop I see the scrambled frames. so I guess, this is the “lagging” I see. what’s weird is that some channels do it a lot, I guess same transponder (haven’t checked yet), some lesser. but even those that do that a lot sometimes are better sometimes worse. my signal quality is 89%, which is more than sufficient.
I’m not sure if this is Sundtek driver or TVHeadend server, but on LE8, x86 it worked without this issue. latest LE or CE has both issues with this. I’m not sure if there is difference in sundtek driver between now and then or difference in TVHeadend server. hopefully someone would be able to fix this.

TVH server 42 was always more reliable than 43 for me.
You can install them in parallel and switch between to see if it makes any difference.

Shoog

And how would I test that if I don’t have another box capable to have CE installed? I don’t see x86 version of CE. anyway, latest LE, not sure if there is any similarity, didn’t have this issue.
what’s your other thoughts on how can I fix it on my end?

Of course you have to try to understand what is the cause before you can apply a solution, otherwise its all guesswork. However which version of TVH are you running, as I just said it can make a difference as its TVH that does a lot of the error filtering and 42 will tune streams which 43 wont touch.

those are two different things. one is obviously scrambled frames that are just cut off by TVH client on HC4 CE image, which looks like lagging in the end. and I see they are actually scrambled frames when I play the same over the network on Windows based Kodi client. that scrambled frames were not there when I used same sundtek dongle, with same dish, same LNB on the previous x86 based old LE8. the signal quality is ~90%, but there is quite high BER rate (~500). dunno why, haven’t tried on the previous box. but I think I’d need to in the end.
second problem with CE on HC4 is that some videos just freeze during playback and can’t be stopped for long time which doesn’t also occur when played over network, which you explained is due to some sensitive decoder problem.
I bought HC4, because I didn’t want to purchase regular NAS for my home use. and I naively thought I could use it as Kodi box either…