Total Pageviews

Translate

Adds

Sunday, March 29, 2026

Why the Adopisoft system doesn't automatically spread the Node.js load across your 16 or 24 cores

Why the Adopisoft system doesn't automatically spread the Node.js load across your 16 or 24 cores.

1. Single-Threaded Architecture

Node.js, by its very design, is single-threaded. It uses an "Event Loop" to handle tasks. This means that even if you have a 24-core processor, a single instance of a Node app can only execute code on one core at a time. It's like having a massive 24-lane highway, but the Adopisoft "car" is only allowed to drive in one lane.

2. Startup Configuration (ExecStart)

Within your adopisoft.service file, the system starts using a simple shell script:

ExecStart=/opt/adopisoft/startup.sh

This launches the application as a single process. For the load to be distributed, the developers would need to use a Cluster Module or a process manager like PM2 in "Cluster Mode" to spawn multiple copies (workers) of the app. Without that specific code instruction, Linux will never split that 97% load into smaller pieces.

3. The "Sequential" Nature of PisoWiFi Logic

In a PisoWiFi system, many tasks must happen in a specific order:

  1. Detect a coin pulse.

  2. Update the database.

  3. Extend the user's time.

  4. Refresh the portal status.

If these tasks were split across 16 different cores without very complex synchronization, the system might accidentally credit time to the wrong user or miss a coin pulse. Many developers stick to a single thread to ensure data accuracy and stability, especially on lower-power boards like the Raspberry Pi.


How we fixed the "Impact" of this limitation

Since we can't rewrite the Adopisoft "Brain," our Universal Optimizer script fixed the surrounding environment:

  • Isolation: By moving PPPoE and Network Interrupts to Cores 0–7, we ensured that the "heavy" Node process on Core 11 (or whichever core it picks) has zero competition for resources.

  • Latency Removal: By locking the CPU to Performance Mode, we eliminated the "wake-up" delay when the Node process needs to jump from 1% to 97% usage instantly.

  • Bottleneck Clearing: The 97% load you see is now purely "thinking" time for the app, rather than the CPU struggling to handle both the app and the massive flood of network packets from your users.

Summary Table

FeatureStatus in AdopisoftOur Optimizer's Solution
App LoadSingle-Core (97%)Clear the core so Node has 100% priority.
Network LoadSingle-Core (Bottleneck)Spread across 8 Cores (Multi-Queue).
CPU SpeedVariable (Slows Portal)Locked at Max GHz for instant response.
Core JumpingRandom (Micro-stutter)Balanced IRQs to keep Node "quieter."

If Node.js is single-threaded, why does the Raspberry Pi 4 (4 cores) seem to spread the load better than a Mini PC (16 cores)?

The answer isn't that Node.js is suddenly multi-threaded on the Pi; it’s about "Resource Competition" and how the Linux kernel manages a smaller "playground."

1. The "Small Playground" Effect (Density)

On your 16-core Mini PC, there is so much room that the Linux Kernel tries to be "smart." It might put Node.js on Core 11 and all your networking on Core 3 to keep them away from each other. This makes Core 11 look like a "hotspot" at 97% while others are at 0%.

On a 4-core Raspberry Pi, the "playground" is small.

  • Because there are only 4 cores, the Network Interrupts (SoftIRQs) and the Node.js app are forced to share.

  • When you look at your Pi dashboard, you see 20% on Core 0, 30% on Core 1, etc. This isn't Node.js spreading out; it's the Kernel constantly moving tiny tasks around because it has nowhere else to put them.

2. The "Hidden" Workers (libuv)

While your JavaScript code (the logic of Adopisoft) runs on 1 core, Node.js itself has "hidden" helper threads (via a library called libuv).

  • These helpers handle File Reading/Writing and Database queries (Postgres).

  • On a Pi 4, the kernel is more aggressive at pushing these "helpers" to the other 3 cores because it wants to keep the main core free for the "Brain."

  • On a 16-core machine, the kernel is "lazy"—it might just leave them all on the same core because the CPU is so powerful it doesn't feel the "pain" yet.

3. Hardware vs. Software Interrupts

The Raspberry Pi 4 has a very simple Ethernet controller. It doesn't have "Multi-Queue" support like the 2.5G card in your Mini PC.

  • On the Pi: The CPU has to do more work in software to handle packets. This "software work" (ksoftirqd) naturally spreads across the 4 cores to keep up.

  • On the Mini PC: The 2.5G card is "smart." It can handle thousands of packets without bothering the CPU much. This is why the Mini PC cores look "idle"—the hardware is doing the work instead of the CPU!


Summary Comparison

FeatureRaspberry Pi 4 (4 Cores)Mini PC (16 Cores)
Node.js Logic1 Core (Jumps often)1 Core (Stays put longer)
Network HandlingSoftware-heavy (Spreads to 4 cores)Hardware-heavy (Stays on 1-2 cores)
Visual LoadLooks "Balanced" but is actually strugglingLooks "Unbalanced" but is actually efficient
Why?Small pool = frequent task shiftingLarge pool = tasks stay on their "assigned" core

The "Optical Illusion"

Your Raspberry Pi looks "balanced" because it is working near its limit. Your Mini PC looks "unbalanced" because it is so powerful that it can handle your entire business using just 5% of its total strength, leaving 15 cores essentially "waiting for a challenge."

By running the Optimizer Script on your Mini PC, you are telling the kernel: "Don't be lazy—spread that network work across the first 8 cores now, so that when the Node.js app hits a peak, it has 100% of its own core ready to go."

Tuesday, January 2, 2018

How Email is Important?

Email- To some people they dont pay attention to the important of email. They created an account used it to register to a site then forgotten it its username and usually its password. The result when they need email again, they always create a new one. 

Even in this modern times teenager doesn't pay attention how important email is specially those does not study computer and some those that people who finished only high school level.Anyway, email is like a cellphone number where everyone can contact you. It has inbox and outbox.There are many server and company that lets you create free email. The top 3 website are gmail.com- created by Google who created android OS, yahoo.com, and Hotmail.com - a website created by Microsoft..
email username can be combination of first and lastname without space with or without  number.Other uses their alias, their company name, or the name of services they offered preceded by the symbol @ then the website s mail server address such as juandelacruz@gmail.com mario234@yahoo.com, jay_basco2@hotmail.com.You cannot create an account username if the username is already exist which means someones already used that name.

Lets go to the security password. The pasword combination on some website forbid you to create account when your password is your name or your password is too easy to guess. Other sites, they want you to create a password with at least 8 characters or more with small letter, capital letter and number combination. Now in case you forgot your password they provide you a question during your registration such as "What was the name of your first teacher,  first school, first pet, name of your pet, your favorite fruit and so on. They provide you 3 questions in which you have to remember every answer of that because when you forgot your password, it will be ask again in the future when retrieving your account.It is case sensitive so be careful such as "Apple" is different from "apple".

Email is used in registering website, private and government site such as getting NBI clearance, getting a passport appointment, registering to any social sites such as facebook, twitter, instagram, online music such as spotify, online streaming sites such as Netfllix, iflix, Youtube-although you can used youtube even without logging in to your account  but you cannot watch rated Parental Guidance video  or those that contain censored  content, and so on.

Email is mainly used in sending messages, sending files to any person in the world who have access to internet.So next time dont forget your email account username and password.You have to give it an importance like an ATM card and like your cellphone number.



Friday, October 30, 2015

Can't play movies or video on android phone?

If youre having an HD android phone. There are times that you can't play movies. That's because not all video formats are supported by your android built in video player. They usually support only mp4, AVI, MPEG, But not all mp4, avi or mpeg are supported because it depends on what the codecs is used during encoding.

To address this issue, just install a VLC media player for your android device. You can get it at Google Play Store for free.VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.It plays most codecs with no codec packs needed:
MPEG-2, DivX, H.264, MKV, WebM, WMV, MP3 etc...

exFat for Android

Are you wondering why you can't copy more than 4gb of a single file on a micro sdcard?Its because your're sdcard is formatted to a Fat32 file system which  is the default file system for micro sdcard. A Fat32 limit only up to 4gb of a single file to be stored in an sdcard.  So if you're copying an HD movies that are morethan 4gb of file, it will not be copied. Unless you format you're sdcard through a computer to an exFat file system..  An exFat file system is a Microsoft file system optimized for flashdrives that can be used where the NTFS file system is not a feasible solution due to the file size limit of a standard fat32 file system.

So if you are planning to copy a large file of data in the future that is morethan 4gb, specially HD movies, I suggest to format you're micro sdcard to an exFat file system to avoid incompatibility or error that may occur in the future.


Wednesday, January 14, 2015

Failed To Connect To Windows Service

Failed to connect to windows service is a windows 7 bug that happened after installation of windows update. This bug automatically fixed itself after two to three proper rebooting of  the PC.  One problem cause by this error is Windows Aero theme has been disabled. You cannot set any windows aero theme because all aero themes has been disabled, you cannot select it because it appears gray in the Control Panel personalization. You can only select Basic and High Contrast themes. Another problem with this bug is that using right click on the desktop takes time almost 2 minutes before selection appears. Also you cannot login to Guest account if this error occur."Windows Could Not Connect to Sens Service". Then the Windows will totally blackout. Sometimes if it return to user account selection and selecting guest account again, if login to guest account is success, means the problem is fixed temporarily. Now you can login lo any administrator user account of your choice-the Aero theme is perfectly working. But not after you restart the computer.

Fixing this problem doesnt work always. I found out that stoping the THEMES service and starting it again fixed the problem of AERO theme as well as the Failed to connect to windows service error after login. But it's only temporary because the problem comes back again after restart.

Another solution is using the comman prompt as an administrator. Go to browser C:\windows system32\. Inside that folder path type NETSH then press enter, type WINSOCK RESET then hit Enter, and then RESTART your Computer.

If it doesn't fix your problem, this hotfix is came from microsoft. You can download it here. Perhaps these will solve your problem.Failed To Connect To Windows Service Hotfix


Thursday, December 25, 2014

Where Can You Find the Start Menu\All Programs in Windows 8 and 7

From windows 95 to Windows XP, we can see the Start Menu at the left bottom side of our desktop but not anymore in windows 8 because it replaces with Metro Style. Installing older games, does not create shortcut on the desktop and sometimes does not show inside the Metro Style of windows 8 such as when installing Microsoft Office 2013.  But using a shortcut, you can still acess the windows 8 start menu\all programs by creating a shortcut.

Here's how:

On your desktop, right click on an empty space, select New then select shortcut.Under the "Type the location of the item:", type this path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs". Press Next then type the name of the shortcut say "start Menu-All Programs" and press Finish. That's All.

To make it visible open the shortcut you've just created, right click on an empty space select View then select Medium Icons.

There is another method.This method will make your desktop look likes you have a start menu.
1.Right-click on the Taskbar and click Toolbars and then New toolbar
2. Paste this path in the Folder text Box C:\ProgramData\Microsoft\Windows\Start Menu\Programs then press select Folder button.

Please I apologize if you find any wrong grammar in my blog.


If you find this helpful, please don't forget to say thanks.