Memory usage in Linksys MX5500 E8450

I have two Linksys routers running in two locations,

  • MX5500, qualcomm, 512MB ram, 256MB flash, Openwrt snapshot (now is r30083-d7f9e240c2)
  • E8450, MTK, 512MB ram, 128MB flash, Openwrt 24.10.1 (r28597-0425664679)

Setup are simple and more or less the same,
WAN - Linksys - wifi ---> mobiles

Packages - luci, ddns, zram, adblock, collectd
...no VPNs.
Adblock feeds: adguard_tracking, cpbl, disconnect, phishing_army, spam404

I understand these are two different routers and the system also different,
but why MX5500 eat so much memory than E8450 ?
In 'ps' I can't find anything that ate up over 200MB of memory.
Any idea can free up some :hushed_face:

.
.
.
.

Linksys MX5500

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r30083-d7f9e240c2'
DISTRIB_TARGET='qualcommax/ipq50xx'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r30083-d7f9e240c2'
DISTRIB_TAINTS=''
/etc# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 9984      9984         0 100% /rom
tmpfs                   221004     17692    203312   8% /tmp
/dev/ubi0_1              51720      7284     41752  15% /overlay
overlayfs:/overlay       51720      7284     41752  15% /
tmpfs                      512         0       512   0% /dev
/etc# free
              total        used        free      shared  buff/cache   available
Mem:         442012      356892       62012        5392       23108       46296
Swap:        299004       15616      283388
/etc# service
Usage: service <service> [command]
/etc/init.d/adblock                enabled         stopped
/etc/init.d/boot                   enabled         stopped
/etc/init.d/bootcount              enabled         stopped
/etc/init.d/collectd               enabled         running
/etc/init.d/cron                   enabled         running
/etc/init.d/ddns                   enabled         stopped
/etc/init.d/dnsmasq                enabled         running
/etc/init.d/done                   enabled         stopped
/etc/init.d/dropbear               enabled         running
/etc/init.d/firewall               enabled         stopped
/etc/init.d/gpio_switch            enabled         stopped
/etc/init.d/led                    enabled         stopped
/etc/init.d/log                    enabled         running
/etc/init.d/luci_statistics        enabled         stopped
/etc/init.d/network                enabled         running
/etc/init.d/odhcpd                 enabled         running
/etc/init.d/packet_steering        enabled         stopped
/etc/init.d/radius                 enabled         stopped
/etc/init.d/rpcd                   enabled         running
/etc/init.d/sysctl                 enabled         stopped
/etc/init.d/sysfixtime             enabled         stopped
/etc/init.d/sysntpd                enabled         running
/etc/init.d/system                 enabled         stopped
/etc/init.d/ubihealthd             enabled         running
/etc/init.d/ucitrack               enabled         stopped
/etc/init.d/uhttpd                 enabled         running
/etc/init.d/umount                 enabled         stopped
/etc/init.d/urandom_seed           enabled         stopped
/etc/init.d/urngd                  enabled         running
/etc/init.d/wpad                   enabled         running
/etc/init.d/zram                   enabled         stopped
/etc#

.

Linksys E8450

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='24.10.1'
DISTRIB_REVISION='r28597-0425664679'
DISTRIB_TARGET='mediatek/mt7622'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt 24.10.1 r28597-0425664679'
DISTRIB_TAINTS=''
~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 4864      4864         0 100% /rom
tmpfs                   250244     13540    236704   5% /tmp
/dev/ubi0_7              86012      3820     77760   5% /overlay
overlayfs:/overlay       86012      3820     77760   5% /
tmpfs                      512         0       512   0% /dev
~# free
              total        used        free      shared  buff/cache   available
Mem:         500492       86380      362872       13540       51240      357148
Swap:        268284           0      268284
~# service
Usage: service <service> [command]
/etc/init.d/adblock                enabled         stopped
/etc/init.d/boot                   enabled         stopped
/etc/init.d/bootcount              enabled         stopped
/etc/init.d/collectd               enabled         running
/etc/init.d/cron                   enabled         running
/etc/init.d/ddns                   enabled         stopped
/etc/init.d/dnsmasq                enabled         running
/etc/init.d/done                   enabled         stopped
/etc/init.d/dropbear               enabled         running
/etc/init.d/firewall               enabled         stopped
/etc/init.d/gpio_switch            enabled         stopped
/etc/init.d/led                    enabled         stopped
/etc/init.d/log                    enabled         running
/etc/init.d/luci_statistics        enabled         stopped
/etc/init.d/network                enabled         running
/etc/init.d/odhcpd                 enabled         running
/etc/init.d/packet_steering        enabled         stopped
/etc/init.d/rpcd                   enabled         running
/etc/init.d/sysctl                 enabled         stopped
/etc/init.d/sysfixtime             enabled         stopped
/etc/init.d/sysntpd                enabled         running
/etc/init.d/system                 enabled         stopped
/etc/init.d/ubihealthd             enabled         running
/etc/init.d/ucitrack               enabled         stopped
/etc/init.d/uhttpd                 enabled         running
/etc/init.d/umount                 enabled         stopped
/etc/init.d/urandom_seed           enabled         stopped
/etc/init.d/urngd                  enabled         running
/etc/init.d/wpad                   enabled         running
/etc/init.d/zram                   enabled         stopped

Because Qualcomm's platform is designed that way, there is nothing you could change about that.

More RAM reserved for the hardware, significantly more RAM used by the wireless drivers (ath11k),

3 Likes

I see tks for quick respond to me.
Previously I don't use Adblock the qualcomm still have near 200MB free.
After using Adblock the free memory drained to very low,
but can't find adblock ate the memory.

Blocklists are huge (stored in tmpfs, non-evictable RAM) and dnsmasq not always the smartest cookie (tcp & forking). 512 MB RAM is the bare minimum for ipq50xx, you will have to adapt your expectations - and limit your blocklists severely.

1 Like

Check at least the first two bullet points of: https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md#best-practise-and-tweaks

If your router has an usb port you can move the list processing and the final blocklist away from tmpfs ... what remains is β€œonly” the memory consumption of the dnsmasq instance.

Previously without ZRAM the MX5500 always get dnsmasq crash.
In E8450 even added more feeds than MX5500, but still have more than 300MB free memory.
So I am curious .
Qualcomm really eating too much.

MX5500 doesn't have USB port (it only have onboard pins),
and tmpfs is fine, you can see in the first post, it has 200MB.

 OpenWrt SNAPSHOT, r30083-d7f9e240c2
 -----------------------------------------------------
~# service adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 4.4.2-r2
  + blocked_domains : 301 091
  + active_feeds    : adguard_tracking, cpbl, disconnect, phishing_army, spam404, stopforumspam
  + dns_backend     : dnsmasq (2.91-r2), /tmp/adblock-backup, 26.37 MB
  + run_ifaces      : trigger: -, report: br-lan
  + run_directories : base: /tmp, dns: /tmp/dnsmasq.cfg01411c.d, backup: /tmp/adblock-backup, report: /tmp/adblock-report, jail: /tmp
  + run_flags       : shift: βœ”, custom feed: ✘, force: βœ”, flush: βœ”, tld: βœ”, search: ✘, report: βœ”, mail: ✘, jail: ✘
  + last_run        : mode: boot, 2025-06-15T15:08:08+08:00, duration: -, 161.01 MB available
  + system_info     : cores: 2, fetch: uclient-fetch, Linksys MX5500, qualcommax/ipq50xx, OpenWrt SNAPSHOT r30083-d7f9e240c2
~# free
              total        used        free      shared  buff/cache   available
Mem:         442012      350580       66764        5508       24668       51768
Swap:        299004       15616      283388
OpenWrt 24.10.1, r28597-0425664679
 -----------------------------------------------------
~# service adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 4.4.2-r2
  + blocked_domains : 303 917
  + active_feeds    : adguard, adguard_tracking, certpl, cpbl, disconnect, phishing_army, spam404, stopforumspam
  + dns_backend     : dnsmasq (2.90-r4), /tmp/adblock-backup, 26.50 MB
  + run_ifaces      : trigger: -, report: br-lan
  + run_directories : base: /tmp, dns: /tmp/dnsmasq.cfg01411c.d, backup: /tmp/adblock-backup, report: /tmp/adblock-report, jail: /tmp
  + run_flags       : shift: βœ”, custom feed: ✘, force: βœ”, flush: βœ”, tld: βœ”, search: ✘, report: βœ”, mail: ✘, jail: ✘
  + last_run        : mode: restart, 2025-06-16T12:38:44+08:00, duration: 0m 19s, 328.82 MB available
  + system_info     : cores: 2, fetch: uclient-fetch, Linksys E8450 (UBI), mediatek/mt7622, OpenWrt 24.10.1 r28597-0425664679
~# free
              total        used        free      shared  buff/cache   available
Mem:         500492       93916      352956       15464       53620      347460
Swap:        268284           0      268284

your working dirs are still pointing to /tmp ... point it to an usb stick and restart adblock.

The tmpfs in MX5500 has 200MB free, similar to E8450,
looks like it is not a problem.
And MX5500 doesn't have USB port.

Ah Ok, thanks. Than disable dns shifting in this config...and remove at least stopforumspam & the phishing feed. Maybe it's better to switch to a compilarion like hagezi....

Tks mate,
The dns shifting can save memory ? or better disable it ?
I have tried adblock-fast in MX5500 but end up it also ate memory,
actually not adblock ate memory, feel like it triggered dnsmasq eat more ...