1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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!

    Dismiss Notice
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

[Solved] High RAM usage RT-AX88U, question.

Discussion in 'Asuswrt-Merlin' started by Skeptical.me, Feb 14, 2020 at 3:27 AM.

  1. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    My RT-AX88U is using up a lot of RAM ...

    [​IMG]

    Is there a way to see what is using up the RAM the most?

    I'm using Diversion, Skeynet, Unbound, OpenVPN clients, and uiDivstats.

    I'm curious to know which service is chewing up the RAM the most.

    [​IMG]


    [​IMG]
     
  2. Rik Stigter

    Rik Stigter Occasional Visitor

    Joined:
    Dec 13, 2017
    Messages:
    29
    Since you already have entware installed you could install htop or something like that, <opkg install htop> should do it.

    Alternatives can be found on https://pkg.entware.net/binaries/armv7/Packages.html

    But I don't think your memory usage is all that special. You have plenty of swap available, so I wouldn't worry too much.
     
    Last edited: Feb 14, 2020 at 4:48 AM
    Makaveli and Skeptical.me like this.
  3. Butterfly Bones

    Butterfly Bones Very Senior Member

    Joined:
    Apr 10, 2017
    Messages:
    1,178
    Location:
    USA
    Two things. This goes round and round. Windows users (and Microsoft) do NOT understand Linux RAM management. :rolleyes:
    https://www.linuxatemyram.com/

    This is my AC86U, looks like all the RAM is being used, right?
    [​IMG]
    Look at all the cached memory!
    Also the second line - buffers and cache, FREE and ready for any task!
    Code:
    [email protected]:/tmp/home/root# free
    
                 total       used       free     shared    buffers     cached
    Mem:        440420     408748      31672       1260       2376      69624
    -/+ buffers/cache:     336748     103672
    Swap:       524284      19552     504732
    
    More readily available to the router for use than the hardware RAM! Very cool, huh? Someone was really thinking about this! Welcome to Linux! I've run it as my main desktop computer OS for some 15-20 years. And my laptop is a Macbook, very similar OS to Linux, so drop me to a command prompt and I know my way around there too. :D
     
    Makaveli, a5m and Skeptical.me like this.
  4. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    Thanks for the reply.

    I'm actually exclusively a Mac and iOS user (2017 iMac 27" 5K) and have been for years. I know very little about Windows. But my knowledge of how RAM works in this regard could do with some educating.

    Thanks for the explanation. Good to know.
     
    Butterfly Bones likes this.
  5. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    Code:
    [email protected]:/tmp/home/root# free
                 total       used       free     shared    buffers     cached
    Mem:        903572     732008     171564       2516      74220     166372
    -/+ buffers/cache:     491416     412156
    Swap:      2097148          0    2097148
     
    Makaveli likes this.
  6. Butterfly Bones

    Butterfly Bones Very Senior Member

    Joined:
    Apr 10, 2017
    Messages:
    1,178
    Location:
    USA
    Ah, my bias exposed. :)

    Seems that majority of users here are Windows users, and I am one of the oddball few using an "alt" OS.

    Just keep in mind that RAM management and usage are a non-linear algorithms, and most of us humans like to think of everything in linear terms, to make them easier to understand.
     
    Makaveli and Skeptical.me like this.
  7. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    I've purchased some Raspberry Pi's to learn from, they use Raspbian (Debian) so I should learn a bit more about Command Line. I know the basics of CL but not much more than that.
     
    Butterfly Bones likes this.
  8. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,859
    Skeptical.me likes this.
  9. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia

    Ahhh, that's what that script does. I hadn't explored it yet. I'll test it out, cheers.
     
  10. rgnldo

    rgnldo Very Senior Member

    Joined:
    Nov 12, 2018
    Messages:
    691
    Location:
    Brazil
    Code:
    top -m
     
    Skeptical.me likes this.
  11. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    Looks like Unbound is using the most ...

    Code:
    Mem total:903572 anon:108892 map:19728 free:358420
     slab:290284 buf:1008 cache:55668 dirty:8 write:0
    Swap total:2097148 free:2097148
      PID^^^VSZ^VSZRW   RSS (SHR) DIRTY (SHR) STACK COMMAND
    20536 67712 60800 22040  3192 17736     0   196 unbound -c /opt/v
     1253 60596 42680  3484  2724   760     0   132 amas_lib
     1084 54540 50128 52056  2220 50028   192   132 dnsmasq --log-asy
     2153 49384 43628  6732  3388  2700     0   132 pixelserv-tls 192
      321 18524 16724   876   660   112     0   132 /bin/swmdk
     1238 17160  4428  2872  1824   740     0   132 cfg_server
     1160 15800  7356 10988  3480  6968     0   132 httpds -s -i br0
     6098 14692 10700  1356   992   192     0   132 dcd -i 3600 -p 43
     1219 14620  3024  3136  2588   540     0   132 conn_diag
     1081 14620  3024  2920  2396   524     0   132 /sbin/netool
     2627 13592  4736  3056  1044  1588     0   132 wred -B
        1 13588  1996  4828  2844  1760     0   140 /sbin/init
     1171 12572   980  3320  2728   576     0   132 watchdog
     1057 12572   980  3172  2608   564     0   132 /sbin/wanduck
     1207 12572   980  3132  2580   552     0   132 pctime
     1172 12572   980  3068  2532   536     0   132 check_watchdog
     1788 12572   980  3308  2756   532     0   132 disk_monitor
     1203 12572   980  3068  2540   528     0   132 hour_monitor
     2893 12572   980  3400  2860   528     0   132 bwdpi_wred_alive
     1456 12572   980  3236  2712   524     0   132 usbled
     1117 12572   980  2928  2412   516     0   132 wpsaide
     1176 12572   980  3108  2592   516     0   132 sw_devled
      944 12572   980  2680  2168   512     0   132 console
     1202 12572   980  2992  2480   512     0   132 bwdpi_check
     2901 11944   736  3048  2232   404    12   132 /usr/sbin/smbd -D
     2892 11776   568  2568  2276   196    12   132 /usr/sbin/nmbd -D
     1190 11748  4968  2536  2188   420   128   132 vis-dcon
     1079 11180  2704  1680  1368   304     0   132 nt_monitor
     1201  9652  1328  2320  1896   384     0   132 mastiff
     
  12. rgnldo

    rgnldo Very Senior Member

    Joined:
    Nov 12, 2018
    Messages:
    691
    Location:
    Brazil
    Report on the appropriate thread.
     
    eclp and Skeptical.me like this.
  13. Raphie

    Raphie Senior Member

    Joined:
    Sep 19, 2017
    Messages:
    226
    Got this issue on the ac5300
    After reboot 349mb around 60%, 5days later 490mb 99%
    Don’t care that you can swap it out. The point is it looks like a memory leak, it should not grow
    All services running after boot being 349mb, should not slowly flood into nearly 500mb with logging off after a couple of days. this is amtm diversion skynet only. Once you reach 99% processor utilisation gets through the roof and a reboot is needed
     
    eclp and Skeptical.me like this.
  14. rgnldo

    rgnldo Very Senior Member

    Joined:
    Nov 12, 2018
    Messages:
    691
    Location:
    Brazil
    The culprit may be the user. There is a way around it. Finding the problems, search for specific threads and report.
     
    Skeptical.me likes this.
  15. Raphie

    Raphie Senior Member

    Joined:
    Sep 19, 2017
    Messages:
    226
    The culprit is not the user, if the user is doing standard stuff and doesn’t tinker it should just work no?
    Memory leaks or bugs in entware is outside control of the user.
     
  16. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    @rgnldo helped me to fix any issue with my Router RT-AX88U RAM usage is lower. Thank you for your help, appreciated.
     
  17. Raphie

    Raphie Senior Member

    Joined:
    Sep 19, 2017
    Messages:
    226
    What was your specific issue?
     
    Skeptical.me likes this.
  18. Skeptical.me

    Skeptical.me Very Senior Member

    Joined:
    Sep 22, 2016
    Messages:
    622
    Location:
    Australia
    To be honest I'm not sure ha .... @rgnldo guided me through some steps to mitigate stress on the router. The RAM usage is lower so far. I'll see how it goes over the next few days and update here again.
     
    Last edited: Feb 14, 2020 at 8:48 PM
  19. jsbeddow

    jsbeddow Regular Contributor

    Joined:
    Oct 21, 2016
    Messages:
    131
    Location:
    SF Bay Area
    Actually, please stop worrying about RAM usage at all, I never even look at mine on any Linux based system, and I have never personally had any problem stemming from "running out of RAM". This subject keeps coming up periodically on this forum, please see this site that explains it very well:
    https://www.linuxatemyram.com/
     
    Makaveli likes this.
  20. Raphie

    Raphie Senior Member

    Joined:
    Sep 19, 2017
    Messages:
    226
    That’s not what happening. Memory fills, not with caching, doesn’t release when needed, processes start swapping, cpu chokes, router near bricks, performance gone. Even if it was caching, then it’s a less than optimal implementation, as it never gives back to the system when needed. If not caching, once boot completes, memory consumption should not increase.
    So one way or the other it’s wrong, as the end result should not be a router being brought to it’s knees after 5-7 days