TS-873A Excessive CPU Load

So wondering if some of you Linux experts out there may be able to help me. I’m treading in areas where I am not really strong.

My TS-873A has been reporting excessive CPU load in TOP lately. Regularly seeing numbers in the 40s and 50s and not going down. Nothing has really changed on the system in months. It seems like I first saw this shortly after updating to h5.2.8.33559. But it’s not the firmware. I’ve downgraded it and upgraded it several times. Same thing happens.

I opened a ticket with QNAP support but all they have said so far is, "You have a lot of apps installed. Disable QSirch, disable Container Station, etc. I tried all that - no dice. Load doesn’t go down. Also, I didn’t think those would affect things as all that has been running for months with no issue.

I thought I had a handle on the issue and I was seeing normal load numbers around 5 for nearly 2 days. Then yesterday evening, it shot back up again. Funny thing was, there was nothing I was doing or running on the NAS last night.

And oddly enough, when accessing the NAS web UI, it’s not exceedingly slow like you would think when you get a load of 50. It’s slower but not unusable. Still it’s slower than it should be.

I think there’s some process that has gone awry somewhere and has likely spawned some zombie processes that are out there taking up space and resources. Problem is, I can’t find it. I have tried shutting down nearly all of the “high usage” apps and nothing affects the CPU load.

So coming on here to see if perhaps there’s some Linux clean up I need to do or cron job or something. I’m just not sure.

It depends partly on the priority of the process that is “consuming” the cpu, this isn’t abnormal IMO.

Take a look at the output of “uptime” to see an average value.

[~] # uptime
 12:18:15 up 25 days, 21:38,  load average: 0.15, 0.13, 0.13

Try running “top -n 1>[logfile]” via a cron task, or in a sleep loop script to get an idea.

Check out the details in procstat also to see what is going on

It may not be a CPU issue at all. A filesystem issue, a filing hard drive, or many other factors can come into play.

Have you tried rolling back to firmware 4.5? LOL (just kidding - sort of)

You can also look at these tools (some would have to be installed)

Thank you. Excessive CPU load for hours is abnormal. I’ve managed now to get things to settle down after the last reboot a few hours ago.

17:53:21 up 7:47, load average: 2.91, 2.88, 2.87

So this is good - what it should be!

What I really want to see is what processes are contributing to the load. Top just shows CPU percentage per the top processes which may or may not affect the loading very much.

I’ll have to look into the other utilities you mention. Maybe something there will shed some light…

And no - 4.5 is not an option. I’m running Hero anyhow…

Resource Monitor, Processes, and then click on CPU twice to sort high to low.

That only shows CPU percentage not CPU load. They are very different.

OK, I’m going to sound like a blithering idiot here, but the apt command appears to be missing from the QNAP Linux distro. I would like to install htop.

sudo apt install htop

How does one install “normal” Linux commands like this on a QNAP?

I believe you would need to install entware or equivalent or run a container with a “real” linux distro (which actually isn’t a great idea because it means more overhead).

https://www.reddit.com/r/qnap/comments/nyyqj0/is_it_possible_to_upgrade_an_installed_qpkg_or/

Ah. Great! Thank you!

Hmmm… Installed Entware from the MyQNAP.org repo. No APT command or the path isn’t defined to it…

Sorry, I can’t provide further advise. I’ve never had a need to investigate resource issues or install core linux directly.

Maybe I’m just lucky, but my system uses very few resources in an idle state.

login as: admin
admin@192.168.1.30's password:
[~] # uptime
 14:27:57 up 27 days, 23:47,  load average: 0.08, 0.07, 0.10

Must be QTS 4.5! :smiley:

And I doubt you have as much loaded as I do either…

Right now I’m OK but I had to reboot to get here:

image

apt isn’t part of Entware (or QTS). Entware uses opkg instead. Example:

opkg install htop

Didn’t work…

:frowning:

Please ensure you’re logged-in via SSH as the admin user.

Sudo no workie?

Entware can be made to work on a regular user account, but you must first source the Entware profile, so your session $PATH is updated.

It’s easier to use the admin account instead. :wink:

1 Like

OK. That worked.

So looks like I have to use the Admin account for anything with Entware. I installed HTOP and it won’ run from my normal account.

How does one change that.

Also, do you know of a utility that shows the contribution of each process to the Load Average number? That’s what I really wan to see. What’s filling that up. I don’t think this really shows that either…

You must source the Entware profile first. Do this by appending the source command to .profile in your user $HOME. This file doesn’t exist by-default, so you may need to create it.

Login via SSH with your preferred user account, then run the following command:

echo '. /opt/etc/profile' >> $HOME/.profile

… then logout your SSH session, then back-in again. You should now be able to use the opkg command.

1 Like

The system load average metric is a tricky thing. I’ve been using Linux for 20+ years and I’m still figuring-it-out. :wink:

I’ve never actually had my load averages increase due to hardware issues (RAM, NIC, HDD, etc…), so I’ve never had to sit-down and work-out what was going wrong.

But - in-short - it’s not entirely about CPU load. The last instance reported on the forum turned-out to be defective RAM sticks causing processes to enter wait states.

I’m hoping someone more experienced will be able to help you diagnose this, as it’s beyond my abilities. :nerd_face:

Well, there’s actually quite a bit of customizations and information available in HTOP. Let’s see what I get as I go through this and examine what is happening…