AC86U - HTOP vs webUI CPU usage - major differences

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

jconly

New Around Here
Hey everyone,

Relatively old lurker here; have been happily running the Merlin firmware since wireless N on various devices in various installs.
Only recently though have I gotten into Entware, and the AMTM addon scripts.
(Spawned by a degrading connection on the WAN side, which I wanted to track and test.)

After getting entware up and running on a USB 2.0 thumb drive, implementing connmon and spdmerlin (and now recently giving flex QOS a go) I've found the webUI to show alarming CPU usage.
Having been familiar with HTOP, and finding it in the entware repository, I wanted to check it out.

To my surprise, while my webUI shows an almost always pegged processor (each core spiking up and down, and sustaining probably 75% usage min,) it seems HTOP shows very little processor usage at all.


So in an effort to help diagnose my connection issues, I wanted to reach out and get some clarification.
What should I expect here in this situation? Why the differences?

If the webUI is the accurate representation, I'd imagine this could be playing a role in my latency issues.


I've noticed some additional lags lately, which could be from a FlexQOS config that needs some tweaking (?) but these CPU stat discrepancies existing prior to installing Flex, and enabling QOS.



Would love you're thoughts.
Thanks in advance for all the incredible expertise out there in these forums.
 

jconly

New Around Here
Any thoughts?
Which of the two is accurate, or should they be the same?

With my thumb drive pulled, the webUI shows normal CPU usage (very low.)
Wondering if it's perhaps an entware / script install issue, or caused by the slower USB 2.0 thumb drive
 

dev_null

Senior Member
Any thoughts?
Which of the two is accurate, or should they be the same?

With my thumb drive pulled, the webUI shows normal CPU usage (very low.)
Wondering if it's perhaps an entware / script install issue, or caused by the slower USB 2.0 thumb drive
I have noticed the differences between htop and the GUI. I find the GUI trails htop by a second or two. I've seen others comment on the differences as well.

Anecdotally to your second statement: I have a RPi3 that I set up for HomeAssistant. Initially I used whatever spares I had around the house; this included a class 4 microsd card. The CPU was always nearly pegged. When I replaced the card with a class 10, (U3, V30), the CPU immediately dropped to 5-7%. So yes, it could very well be your old, slow drive.
 

jconly

New Around Here
Thanks for your reply!
Just before you posted I actually finished my testing w/ a USB3 drive, and ext2 (previous was ext4 w/ journaling.)

Night and day, CPU on the router is much more stable, and similar to HTOP results.

Still curious about the drastically different results, but much less hangs now, and much more responsive routing.
 

Make WiFi Great Again

Occasional Visitor
Noticed this cpu discrepency as well with 4 AC68Us and 1 AC66U-mips. My guess is that the cpu chart on index.asp shows process usage combined with kernel times. Would be nice if it at least told people this in a kittle side note.

I also noticed the Ram usage on index.asp includes Cache usage. Htop shows ram in green and cache in orange. Add them together and yu get the number shown on index.asp
 

jconly

New Around Here
Ah, good to know. That would certainly account for some of the differences I'm seeing now.
Things are much more stable now with the faster drives, and CPU AVG sitting between 15-40% in HTOP.
On the webUI, things are calmer than before, but I do still show these erratic spikes from one core to another.
This flops from one core to another are also visible in HTOP.
Screen Shot 2021-01-18 at 4.19.05 PM.png
Screen Shot 2021-01-18 at 4.19.15 PM.png


As far as memory, there is a discrepancy there as well... even on the overall available amount.
(Assuming 430M is the total being reported by HTOP)
Adding overall avail + cache does get me close to the webUI used amount, but not if adding HTOP's 'used' + 'cache'
Taken within a few seconds of each other:
Screen Shot 2021-01-18 at 4.25.06 PM.png
Screen Shot 2021-01-18 at 4.25.09 PM.png



Although I'm still curious why HTOP results differ, I'm not terribly worried, as the router is much more responsive now.
It's own webUI pages load in a timely manner, and http/s pages are also much faster to load on the client machines.


Adios USB 2.0
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top