First, a couple of things:
1. It's impossible to search for "RAM" because SmallNetBuilder's forum search blocks keywords that are too short.  This probably leads to additional threads.  Not the user's fault; that's something the site admin needs to fix.
2. It's not helpful or productive to go around telling people they "don't understand" Linux memory management; that's just condescension and mockery.
Now I bumped this thread because I, too, have this problem with an RT-AX88U running 384.17.  After a reboot, the RAM usage is about 500MB.  Over the course of a 1-2 weeks, the RAM usage climbs slowly until it hits ~99% and WAN performance suffers.  LAN performance remains unaffected.  A typical speed test for me yields 10ms, 200Mbps down, 22Mbps up.  When the RAM is maxed out, the pings are all over the map and throughput plummets to about 30Mbps, 10Mbps up.
Just a wild guess ... but I think this is a memory leak from there is a table that stores a recent list of WAN connections from LAN clients, and it's failing to release memory when these connections are closed.  Once the RAM hits 99% and this table is full, the router must make a decision about how to handle additional connections and this causes a slowdown.  Not sure if it's hitting swap space (in RAM) or just waiting until the connections are purged.
Has anyone else observed such a memory leak?  Is there anything in the code that *might* lead to a memory leak?  One would need a lot of devices on the LAN (I have ~30 right now) and also share a lot of "Linux ISOs" to generate this level of activity.
The top RAM consuming processes on my RT-AX88U are as follows:
	
	
	
		Code:
	
	
		Mem total:903572 anon:32452 map:15656 free:484176
 slab:271444 buf:0 cache:26728 dirty:0 write:0
Swap total:0 free:0
  PID   VSZ VSZRW^^^RSS^(SHR) DIRTY (SHR) STACK COMMAND
 1275  9064  4584  5872  1524  4296     0   132 networkmap --bootwait
    1 13636  2008  5056  3076  1784     0   144 /sbin/init
 1171 10308  1848  5044  2736  1580     0   132 httpd -i br0
 1278 10164  1532  3956  2624   556     0   132 mastiff
 1539 34384 17992  3948  2208   960     0   132 /usr/lib/ipsec/charon --use-syslog
 1359 60640 42688  3568  2788   780     0   132 amas_lib
 1179 12608   980  3380  2800   576     0   132 watchdog
 3548 12608   980  3376  2836   532     0   132 bwdpi_wred_alive
 1308 20820  7396  3340  2708   620     0   132 roamast
 1682 12608   980  3300  2768   532     0   132 disk_monitor
 1310 14656  3024  3292  2748   540     0   132 conn_diag
 1521 12608   980  3208  2688   520     0   132 usbled
	 
 
If you are having this problem, log in via ssh and run the "top" command.  Press the "S" key repeatedly until you see ^^^RSS^ indicating memory is being sorted by Real (memory) Size.  Then paste your results.
This is busybox's version of "top," a stripped down variant of the top command you know from Ubuntu, Redhat, and BSD varieties like MacOS.
Finally, I'm just one systems engineer who knows how to use the tools but not necessarily what to look for.  We could use some input from rmerlin.