What's new

AdGuardHome Adguard Home uses 97% of RAM

  • 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!

odiovidio

Occasional Visitor
I've read a number of threads regarding RAM usage and Adguard Home with no real consensus on a good way to reduce the memory footprint.

I'm on GT-AX6000 fw388.1 and using Adguard Home (Edge) with the default install from AMTM (also unbound with the defaults as the upstream)

When I do a reboot, the router is at 59% RAM utilization, which I'm fine with. As soon as I access the Adguard Home web interface, the RAM jumps to 97% and stays there forever. Although it doesn't seem to cause any performance issues, 97% mem utilization sounds like a lot and I'd like to try to reduce it.

I also have a 2GB swap file on USB, however it doesn't seem to get used. I noticed /proc/sys/vm/swappiness was set to zero, so I changed that to 60, but it didn't seem to help matters....Also, it goes back to zero on a reboot. Anyone know why?
 
I've read a number of threads regarding RAM usage and Adguard Home with no real consensus on a good way to reduce the memory footprint.

I'm on GT-AX6000 fw388.1 and using Adguard Home (Edge) with the default install from AMTM (also unbound with the defaults as the upstream)

When I do a reboot, the router is at 59% RAM utilization, which I'm fine with. As soon as I access the Adguard Home web interface, the RAM jumps to 97% and stays there forever. Although it doesn't seem to cause any performance issues, 97% mem utilization sounds like a lot and I'd like to try to reduce it.

I also have a 2GB swap file on USB, however it doesn't seem to get used. I noticed /proc/sys/vm/swappiness was set to zero, so I changed that to 60, but it didn't seem to help matters....Also, it goes back to zero on a reboot. Anyone know why?
As it's been repeated "hundreds" of times within the forum, there is no need to worry about managing RAM usage. LINUX takes care of it!
 
I've read a number of threads regarding RAM usage and Adguard Home with no real consensus on a good way to reduce the memory footprint.

I'm on GT-AX6000 fw388.1 and using Adguard Home (Edge) with the default install from AMTM (also unbound with the defaults as the upstream)

When I do a reboot, the router is at 59% RAM utilization, which I'm fine with. As soon as I access the Adguard Home web interface, the RAM jumps to 97% and stays there forever. Although it doesn't seem to cause any performance issues, 97% mem utilization sounds like a lot and I'd like to try to reduce it.

I also have a 2GB swap file on USB, however it doesn't seem to get used. I noticed /proc/sys/vm/swappiness was set to zero, so I changed that to 60, but it didn't seem to help matters....Also, it goes back to zero on a reboot. Anyone know why?
Haha I was just going to post this exact same thing. I guess we don't need to worry...
 
I've read a number of threads regarding RAM usage and Adguard Home with no real consensus on a good way to reduce the memory footprint.

I'm on GT-AX6000 fw388.1 and using Adguard Home (Edge) with the default install from AMTM (also unbound with the defaults as the upstream)

When I do a reboot, the router is at 59% RAM utilization, which I'm fine with. As soon as I access the Adguard Home web interface, the RAM jumps to 97% and stays there forever. Although it doesn't seem to cause any performance issues, 97% mem utilization sounds like a lot and I'd like to try to reduce it.

I also have a 2GB swap file on USB, however it doesn't seem to get used. I noticed /proc/sys/vm/swappiness was set to zero, so I changed that to 60, but it didn't seem to help matters....Also, it goes back to zero on a reboot. Anyone know why?
I will only "echo" what all the others have said- this seems like a normal memory percentage usage. Having a swap will be helpful when adguardhome runs automatic updates for filter lists. Asus has saw fit to choose zero to be the best default swappiness for the newer kernels. I am not sure if you should be concerned with adjusting the swappiness, I would let others advise on that; however, if you are intending to use the swap sooner it wouldn't hurt to run swappiness at 60. That is a typical default swappiness number of older asuswrt implementations and is even present as a default in current openwrt kernels.
 
Last edited:
I noticed /proc/sys/vm/swappiness was set to zero, so I changed that to 60, but it didn't seem to help matters....Also, it goes back to zero on a reboot. Anyone know why?
If you want to set the "swappiness" value whenever the USB disk partition is mounted (and therefore upon reboot as long as the USB disk is attached) you should add the command in the "/jffs/scripts/post-mount" script before the "swapon" command (which activates the swap file):
Bash:
echo 60 > /proc/sys/vm/swappiness
 
If you want to set the "swappiness" value whenever the USB disk partition is mounted (and therefore upon reboot as long as the USB disk is attached) you should add the command in the "/jffs/scripts/post-mount" script before the "swapon" command (which activates the swap file):
Bash:
echo 60 > /proc/sys/vm/swappiness
Thank you! Now my RT-AX86U has stopped restarting every two days!
1675002698530.png
 
View attachment 47722
And yet. Is this Adguard memory usage normal?
Yes it is. Adguardhome is a GO binary. It uses only as much memory as it has to reserve to perform tasks. For example, let's say you need to up date your filters, adguardhome GO binary will reserve that amount of memory necessary to perform that task so next time it doesn't have to go back to the memory to specifically ask for that amount of memory again. Adguardhome can be very memory hungry when it processes multiple or large size filter lists. So it will hold onto that memory for the next time it has to run as well. This is a normal behavior. It just so happens our routers don't have a lot of RAM memory. The router designers did not anticipate we would be here today running adguardhome straight on the router.
 
Virtual Memory Size (VSZ) in WebUI exists only to scare users:) Just compare it to Resident Set Size (RSS) that shows how much memory is allocated to AdGuardHome:

Code:
~ # grep Vm  /proc/`pidof AdGuardHome`/status
VmPeak:      748928 kB
VmSize:      748928 kB
VmLck:           0 kB
VmPin:           0 kB
VmHWM:       54600 kB
VmRSS:       37280 kB
VmData:       81576 kB
VmStk:         132 kB
VmExe:        7324 kB
VmLib:           4 kB
VmPTE:         148 kB
VmPMD:          20 kB
VmSwap:           0 kB
 
Code:
asus@RT-AX86U-C2E8:/tmp/home/root# grep Vm  /proc/`pidof AdGuardHome`/status
VmPeak:  1160664 kB
VmSize:  1160664 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:    414636 kB
VmRSS:    391016 kB
VmData:  1126112 kB
VmStk:       132 kB
VmExe:      7344 kB
VmLib:         0 kB
VmPTE:       936 kB
VmPMD:        16 kB
VmSwap:    44740 kB
 
Code:
asus@RT-AX86U-C2E8:/tmp/home/root# grep Vm  /proc/`pidof AdGuardHome`/status
VmPeak:  1160664 kB
VmSize:  1160664 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:    414636 kB
VmRSS:    391016 kB
VmData:  1126112 kB
VmStk:       132 kB
VmExe:      7344 kB
VmLib:         0 kB
VmPTE:       936 kB
VmPMD:        16 kB
VmSwap:    44740 kB
What lists do you use?
 
Yep that looks like a good bit. That would definitely explain the higher amount of memory usage.

Also, looking at the webui image you provided above, it looked like syslog-ng was using a good bit of memory too. If you don't actually use scribe for anything important I would recommend removing it. It will give you back a good 5~10 percent of memory.

1675870770344.png
 
Last edited:
More than a couple hundred thousand filter items and it will greatly slow down and grind to a halt.

Yep that looks like a good bit. That would definitely explain the higher amount of memory usage.

Also, looking at the webui image you provided above, it looked like syslog-ng was using a good bit of memory too. If you don't actually use scribe for anything important I would recommend removing it. It will give you back a good 5~10 percent of memory.

Thanks to experts! I have deleted syslog-ng and removed some of the lists.

1675973904435.png
 
Less than 30MB of free mem is normal...Until all CPU cores remain @100% usage at the same time. Had it happen to me twice in the past few days and on both occasions DNS resolution had stopped working completely = no internet for me. Had to make swapfile kick in to bring the router back to life.
 
Less than 30MB of free mem is normal...Until all CPU cores remain @100% usage at the same time. Had it happen to me twice in the past few days and on both occasions DNS resolution had stopped working completely = no internet for me. Had to make swapfile kick in to bring the router back to life.
Yea i do not recommend using adguardhome without a swap. However, its actual memory usage is normal.These router have very limited memory and a designed for operations that do not necessarily need as much as adguardhome requires to perform certain types of operations.
 

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!

Members online

Top