1

I hope that, as long as this question refers to Linux, could be answered here:

I have a DSL router from Observa Telecom, model BHS-RTA :

Modem Name :    BHS_RTA
Serial Number : D861940E5088
Time and Date : 2015-12-13 01:30:37
HardwareVersion :   BHS_RTA_R1A
SoftwareVersion :   BHS_RTA_ES_050
Firmware Version :  1.1.3

This device features a embedded Linux, so I am checking the CPU usage in order to detect possible overloads:

~ $ top
Mem: 19360K used, 4544K free, 0K shrd, 1444K buff, 5240K cached
Load average: 2.04 2.18 2.18

If I correctly understood the meaning of CPU Ussage (load average) concept, unless my router will have a 2-core CPU, a value of 2 or above indicates some sort of overload in the system. But the scan was performed at low internet speed (no heavy downloads/uploads).

I repeated the test with another router whose model is ZXHN_H108N firmware version 2.1.1 at low internet speed (no heavy downloads/uploads):

~ $ top
Mem: 19036K used, 37504K free, 0K shrd, 1560K buff, 5616K cached
Load average: 2.04 2.17 1.83

And this is the test with a D-Link DSL-2640B Firmware Version: EU_2.04 router under heavy load (uTorrent at maximum download speed):

# top
Mem: 30248K used, 30716K free, 0K shrd, 3200K buff, 10828K cached
Load average: 0.48, 0.35, 0.29    (State: S=sleeping R=running, W=waiting)

My question, as long as I can not believe a so simple router features a multi-core CPU, is:

  • According to the top tool report, may I say that load average value of 2 indicates there is any overload in my routers?
  • Is there anything that I could configure to solve it? Maybe some temporal solution killing process each reboot?
  • What could be the software consequences of this overload? Maybe device hang up?

Further details:

  • Whenever I repeat the top tests on the apparently overloaded DSL routers (the first and the second above examples) values are not very different: 1.90, 2.05, 2.15 ... etc.
  • All the tests were performed with only 1 computer (desktop PC) connected to the DSL routers.
  • I am not using VPN or VLAN services with this routers. Just some trivial port forwarding.
  • It seems all firmwares are at its latest version.

%CPU stays low (near 0%). The only process that uses to go up a bit is logic. Example:

Mem: 21956K used, 1948K free, 0K shrd, 1096K buff, 6088K cached
Load average: 2.34 2.29 2.29
  PID USER     STATUS   VSZ  PPID %CPU %MEM COMMAND
  584 root     RW      4660   583 22.9 19.4 logic
 3284 root     RW      1908  1927  0.5  7.9 top
 1774 root     SW      1908   581  0.1  7.9 telnetd
  619 root     DW      1504     1  0.1  6.2 adslstart
 2644 root     SW       848   583  0.1  3.5 radvd
  596 root     SW      2672     1  0.0 11.1 mini_httpd
  581 root     SW      1916     1  0.0  7.9 inetd
    1 root     SW      1908     0  0.0  7.9 init
 1926 root     SW      1908  1775  0.0  7.9 sh
  610 root     SW      1908     1  0.0  7.9 sh
 1927 root     SW      1908  1926  0.0  7.9 sh
  582 root     SW      1900     1  0.0  7.9 dropbear
  583 root     SW      1856     1  0.0  7.7 pc
 1775 root     SW      1848  1774  0.0  7.7 cmd
 2487 root     SW      1596   583  0.0  6.6 pppd
  587 root     SW      1512   583  0.0  6.3 ip6aac
  586 root     SW      1504   583  0.0  6.2 ramon
  585 root     SW      1504   583  0.0  6.2 ip6mon
  622 root     DW      1504     1  0.0  6.2 adslstart
 2645 root     SW      1480   583  0.0  6.1 dhcp6s
^C966 root     SW      1288  1911  0.0  5.3 3g-mngr
  • Your routers use official firmware, right? Do you see that CPU is loaded actually? (some processes stay on top with 50% or more cpu, or cpu bar shows it's loaded?) – user140866 Dec 13 '15 at 3:22
  • Just because routers are so much "not a user visible" thing from inside, chinese manufacturers are free to completely mess the firmware to the state that it will be so much crazy inside, but looking nice outside to user. I have a same device provided by my ISP, and I once hacked it (I got a second board) and I will not touch it anymore because it's firmware is pure [censored]. – user140866 Dec 13 '15 at 3:25
  • I have official firmware, @siblynx . Furthermore: it is the provider (MoviStar Spain) who remotely manages firmware matters. Added more top info as requested. – Sopalajo de Arrierez Dec 13 '15 at 3:28
  • uptime values do not correlate directly to CPU usage. They are a composite value of cpu usage, io usage, and number of processes. A really high usage in load often is more than 15. BTW, the hardware from the provider often is crap - slow, cheap and buggy, whenever possible I disable everything, put it in bridge mode and put much better hardware doing the layer 3 and up job. Please post the output of vmstat – Rui F Ribeiro Dec 13 '15 at 8:13
  • @RuiFRibeiro : it seems there is no vmstat command on any of my routers. Some expanding (i.e: links) on why 2 for load average on routers is not so high would be welcome. Thanks you. – Sopalajo de Arrierez Dec 13 '15 at 12:00
2

In your last top listing, you see two adslstart with D process state - that's your culprit. It for some reason stuck inside kernel mode, and that's why kernel increases Load Average on your routers. It's a sign of buggy firmware, and actually, probably a buggy vendor device driver or something like that, unless your routers do some heavy disk/flash storage IO (which is unlikely). Actual CPU load (and wasted heat) is near to zero if you do not see any more running processes.

Maybe that adslstart does actually talk to device in such a manner, but it's still is not a right thing. The kernel is smart enough to tell how much time a processes are in kernel mode: if you constantly see Load Average does not drop below 2.00, then these two processes probably stuck forever.

If you cannot/wish not replace firmware with something more reasonable, or there is no alternative firmware for your devices, then this is unfixable unless you will call the manufacturer and explain them in details how they messed it.

But if a device does not malfunction with this firmware (does not reset, hang or deny service to it's user), then it's safe to run with this and just forget about.

  • So the above 2 readings for load average are not real? How much could we say reaches my load average, then? – Sopalajo de Arrierez Dec 13 '15 at 3:46
  • They're not real if you worry about cpu overload/overheat. You see that two adslstart use sum 0.1% CPU, but they actually a source of such an odd load average because they stuck in syscall, and kernel counts that as "being loaded". But actual work done by them is shown by their cpu usage, so = 0, and router is idle (if not counting other real processes). – user140866 Dec 13 '15 at 3:48
  • The D process state is usually means "large disk IO", but this actually shows that process entered uninterruptible mode, invoked a syscall to kernel that did not returned yet (or will never return because of buggy driver implementing it or staying beyond it). Maybe these processes do only syscall work and no more, it's hard to say what is going on without having a source code to look at. – user140866 Dec 13 '15 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.