🚀 The Ultimate Speed Guide: Optimizing Your PisoWiFi Vendo (x86 & Raspberry Pi)
Is your PisoWiFi dashboard taking forever to load? Does your system hang for minutes during boot? This guide will walk you through the essential fixes to eliminate "Network Wait" loops, CPU lag, and database sluggishness.
1. Fix the "Network Wait" Loop (The 15-Minute Hang)
By default, Linux waits for every VLAN and interface to be "online" before starting the dashboard. If one link is slow, your whole system hangs. We can fix this by telling the system to continue as soon as your main internet source is ready.
Why a Permanent Override is Necessary
Files in /run/ are temporary and wiped every reboot. To make the 2-second timeout stick, we must use a permanent systemd override.
Create the override directory:
Bashsudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.dCreate and edit the override file:
Bashsudo nano /etc/systemd/system/systemd-networkd-wait-online.service.d/override.confPaste the following configuration:
[Service] ExecStart= ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout=2 --interface=eth0
(Save and exit by pressing Ctrl+O, Enter, then Ctrl+X).
(Note: Replace eth0 with your actual internet source interface. This prevents the system from hanging while waiting for VLANs or secondary ports.)
Reload and Verify:
Bashsudo systemctl daemon-reload
systemctl cat systemd-networkd-wait-online.service
(Note: Replace eth0 with your actual internet source interface. This prevents the system from hanging while waiting for VLANs or secondary ports.)
Reload and Verify:
sudo systemctl daemon-reload
systemctl cat systemd-networkd-wait-online.service
2. Disable Boot-Time Update Lag
Ubuntu and Armbian often attempt to download updates the moment they detect an internet connection. This consumes bandwidth and CPU power right when your WiFi portal needs to start.
Run these commands to disable the daily background updates:
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
sudo systemctl stop apt-daily.service
3. CPU Optimization for Instant Portal Loading
When running 20–30 VLANs, your CPU (especially on a Pi 4) is managing 30 separate networks. In "ondemand" mode, the CPU slows down to save power, causing a 1-2 second lag when a customer hits the portal. Switching to Performance Mode keeps the CPU ready at all times.
Install the optimization tool:
Bashsudo apt update && sudo apt install cpufrequtils -ySet the governor to Performance:
Bashsudo cpufreq-set -g performanceMake it permanent:
Bashecho 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
4. Weekly Database Maintenance
Keep your sales and voucher data loading instantly by scheduling a weekly database cleanup every Sunday at 3:00 AM.
Open the crontab editor:
Bashsudo crontab -eAdd this line to the bottom:
Plaintext0 3 * * 0 -u postgres vacuumdb --all --analyze >> /var/log/db_maintenance.log 2>&1
Ctrl+O, Enter, then Ctrl+X).5. The Vendo Master Netplan Guide
Your Netplan configuration is the heart of your network. Using the wrong settings can lead to the dreaded "stuck at 100%" loading error.
Essential Netplan Settings
| Key | Value | Why it's Important |
| forward-delay | 0 | Fixes the 30s stall. Tells the bridge to open traffic immediately rather than "listening" for 15+ seconds. |
| stp | false | Speeds up connection. Spanning Tree Protocol is for complex offices; it only causes delays in a Vendo setup. |
| optional | true | The "Don't Wait" fix. Tells the system to keep booting even if a USB LAN or WiFi driver is slow to wake up. |
| dhcp4 | false | Prevents 60s timeout. Stops the system from searching for an IP on local ports that use static IPs (like 10.0.0.1). |
Optimized Template (Copy-Paste Example)
Here is a sample configuration for a setup with a built-in WAN, USB-to-LAN, and VLANs.
wlan0- bridge to 10.0.0.1
vlan8-eth0.8 with ip 8.0.0.1
VLAN22-eth0.22 in bridge to 10.0.0.1
eth1 -usb to lan with ip 20.0.0.1
br0-with ip 10.0.0.1 and members are wlan0 and eth0.22
network:
version: 2
renderer: networkd
ethernets:
eth0:
match:
macaddress: 'e4:5f:01:57:04:c8'
dhcp4: false
dhcp6: false
addresses:
- 192.168.90.250/24
nameservers:
addresses: [192.168.90.1, 1.1.1.1, 8.8.8.8]
routes:
- to: default
via: 192.168.90.1
eth1:
match:
macaddress: '80:3f:5d:f7:5f:25'
dhcp4: false
dhcp6: false
addresses:
- 20.0.0.1/20
nameservers:
addresses: [20.0.0.1]
optional: true # <--- Speed Fix: Don't wait for USB LAN
wlan0:
dhcp4: false
dhcp6: false
optional: true # <--- Speed Fix: Don't wait for WiFi driver Lets Dashboard load before WiFi is ready
vlans:
eth0.22:
id: 22
link: eth0
dhcp4: false
dhcp6: false
optional: true # <--- Speed Fix
eth0.8:
id: 8
link: eth0
dhcp4: false
dhcp6: false
addresses:
- 8.0.0.1/20
nameservers:
addresses: [8.0.0.1]
optional: true # IMPORTANT: Prevents PPPoE lag at boot
bridges:
br0:
dhcp4: false
dhcp6: false
addresses:
- 10.0.0.1/20
nameservers:
addresses: [10.0.0.1]
interfaces:
- wlan0
- eth0.22
parameters:
stp: false # Speed Fix: Disables loop-checking
forward-delay: 0 # <--- Speed Fix: Removes 30s "Listening" delay/hang at 100%
Pro Tip: Always use
sudo netplan trybefore applying. This gives you 120 seconds to confirm changes before they revert, preventing you from being locked out of your own system!
To save your changes:
sudo netplan try
(If it says "Configuration accepted," press Enter.)
Troubleshooting Checklist
Indentation: Netplan is very picky. Always use 2 spaces for indentation. Never use tabs.
Static IPs: Ensure your
eth1andbr0are set todhcp4: falseif you are assigning them manual IPs like11.0.0.1or20.0.0.1.Interface Names: On x86, your ports might be named
enp1s0instead ofeth0. Checkip linkto confirm names before editing Netplan.
6. Fix "Initializing Firewall" Lag (Walled Garden)
If your Walled Garden (unrestricted sites) is too large, the system wastes minutes performing DNS lookups for every domain.
Map Gateway IPs manually:
Open the hosts file:
sudo nano /etc/hostsand add these essential IPs to the bottom:Plaintext31.13.71.36 api.gcash.com m.gcash.com gcash.app www.gcash.com 110.173.128.0 os.alipayobjects.com render.alipay.com m.alipay.com 13.226.210.20 api.paymongo.com checkout.paymongo.com paymongo.com 3.1.181.233 api.xendit.co checkout.xendit.co xendit.co 142.250.190.46 gstatic.com googleapis.com
(Save and exit by pressing Ctrl+O, Enter, then Ctrl+X).Clean up your Admin Dashboard:
Delete redundant subdomains. Stick to these essentials for the fastest performance:
api.gcash.com/m.gcash.comgstatic.com/googleapis.comapi.paymongo.com/checkout.paymongo.comapi.xendit.co/checkout.xendit.co
No comments:
Post a Comment