What's new

Netgear P9000 or ASUS RT-AC86U

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

The people coding their FW obviously are smart enough to know they aren’t

The kernel's own task scheduler is probably spreading some processes over the multiple cores, just not in an optimal way if it's not done manually.

If you have a Netgear router, log into it, and run a "top". It will show you which core is running which processes. Pretty sure you will see processes running on both cores. On my Asus, I see various processes running on the second core without me having asked it to to so:

Code:
admin@Stargate88:/# top
Mem: 223932K used, 291252K free, 2520K shrd, 15736K buff, 60920K cached
CPU:  0.0% usr  5.0% sys  0.0% nic 95.0% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.18 0.12 0.07 1/140 24543
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  323     1 admin    S     5536  1.0   0  5.0 /sbin/netool
  683     1 admin    S     6568  1.2   1  0.0 networkmap --bootwait
  519   498 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  498   496 admin    S     6232  1.2   0  0.0 /usr/lib/ipsec/charon --use-syslog
  532   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  524   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  535   519 admin    S     6232  1.2   0  0.0 /usr/lib/ipsec/charon --use-syslog
  521   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  533   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  526   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  530   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  529   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  523   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  534   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  527   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  528   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  525   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  531   519 admin    S     6232  1.2   0  0.0 /usr/lib/ipsec/charon --use-syslog
  520   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  522   519 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
 1156     1 admin    S     6104  1.1   1  0.0 /usr/sbin/smbd -D -s /etc/smb.conf
 1155     1 admin    S     5868  1.1   0  0.0 nmbd -D -s /etc/smb.conf
  376     1 admin    S     5840  1.1   0  0.0 httpd -i br0
  381     1 admin    S     5784  1.1   0  0.0 watchdog
    1     0 admin    S     5540  1.0   0  0.0 /sbin/preinit
  330   323 admin    S     5536  1.0   1  0.0 /sbin/netool
  331   330 admin    S     5536  1.0   0  0.0 /sbin/netool
  314     1 admin    S     5520  1.0   1  0.0 /sbin/wanduck
 1416     1 admin    S     5516  1.0   0  0.0 bwdpi_wred_alive
  698     1 admin    S     5516  1.0   1  0.0 erp_monitor
  382     1 admin    S     5516  1.0   1  0.0 sw_devled
  781     1 admin    S     5516  1.0   1  0.0 ntp
  688     1 admin    S     5516  1.0   1  0.0 hour_monitor
  979     1 admin    S     5516  1.0   0  0.0 usbled
  348     1 admin    S     5516  1.0   1  0.0 wpsaide
  687     1 admin    S     5516  1.0   1  0.0 bwdpi_check
  391   381 admin    S     5516  1.0   1  0.0 ots
 1171     1 admin    S     5516  1.0   1  0.0 disk_monitor
  183     1 admin    S     5512  1.0   0  0.0 console
  375     1 admin    S     5412  1.0   0  0.0 httpds -s -i br0

So, no lie there. The router really has multiple cores, and the router actually runs things on both of these cores.
 
If you have a Netgear router, log into it, and run a "top". It will show you which core is running which processes. Pretty sure you will see processes running on both cores. On my Asus, I see various processes running on the second core without me having asked it to to so:

Code:
admin@Stargate88:/# top
Mem: 223932K used, 291252K free, 2520K shrd, 15736K buff, 60920K cached
CPU:  0.0% usr  5.0% sys  0.0% nic 95.0% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.18 0.12 0.07 1/140 24543
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  323     1 admin    S     5536  1.0   0  5.0 /sbin/netool
  683     1 admin    S     6568  1.2   1  0.0 networkmap --bootwait
  519   498 admin    S     6232  1.2   1  0.0 /usr/lib/ipsec/charon --use-syslog
  498   496 admin    S     6232  1.2   0  0.0 /usr/lib/ipsec/charon --use-syslog

So, no lie there. The router really has multiple cores, and the router actually runs things on both of these cores.
top in the Netgear R7800 does not show such information,
instead you can use e.g.:
Code:
pidstat | awk '{ print $8" "$7" "$3" "$9 }' | sort -r

and for interrupts:
cat /proc/interrupts
 
"the router actually runs things on both of these cores."

I thought you said it didn't. My bad I guess.

You might be misunderstanding what's being said.

The issue is "schedule granularity", openvpn (by the sound of it) is not written to have multiple scheduleable threads so it cannot utilize more than one CPU.
It may use sub-processes to get limited threading but that's not really going to cut it. For example if you had a lot of concurrent VPNs running even using a sub-process approach would work fairly well.

For an individual VPN connection, the OpenVPN application (as in the sort of job it needs to do) makes it difficult to decompose into sub-tasks that can be made into (scheduleable) threads in order to utilize multiple CPUs.

Having converted a decent size application to use threads it is a significant task and a long road from implementation to stability.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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