TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: KIWI USER
from: ANDREW GABRIEL
date: 2018-01-15 00:51:00
subject: Re: Raspberry Pi node red

In article ,
 Kiwi User  writes:
> On Sun, 14 Jan 2018 10:32:05 -0500, Dennis Lee Bieber wrote:
>
>> I'm still of the opinion that the problem is in the CPU usage of
>> the monitoring program
>>
> You may well be right. I know nothing about Node-red except for a quick
> look at its Wikipedia entry, which says that it is written in node.js, is
> single threaded and uses async i/o.

If it's single threaded, it can't use more than one of the four CPU
cores. It may be that only being able to use 25% of a Pi is just not
enough CPU for acceptible response.

> I wasn't trying to solve the OPs problem directly. He doesn't seem all
> that familiar with the 'top' utility, so I thought a micro-tutorial on it
> might be in order, especially since its manpage is quite long.
>
>> So -- I'd consider noting the %CPU column and the associated
>> process/command... A partial grab (from a Debian install running in
>> VirtualBox -- USE FIXED PITCH FONT TO VIEW):
>>
> Good point, though it seems as though the node.js runtime should be at
> least as efficient as the Java jvm, provided that V8 generates code of
> similar efficiency to javac + the jvm's JIT compiler.

To see if you are swapping because system needs more memory than the Pi
has, use:
vmstat 1
and look at the si column. This is the rate of bringing stuff back in
from swap, and indicates the system needs stuff it's previously swapped
out. If this rate is high and little progress is being made by
applications, this would indicate the system is thrashing because the
working set size of the kernel and processes is larger than system
memory. If this is the case, and since you can't add more memory to
the Pi, you would have to find a way to reduce memory usage.

(Looking at the amount swapped out by itself isn't useful, because
swapping out stuff that isn't needed again is harmless.)

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.