I have 64Gb RAM on UM server, which isn't a lot these days, but it's still sufficient that I rarely find myself with memory problems (on the machine, that is. My own aging memory is a different story). But I do experience them.
Since it's a server, it runs 24x7x365 except when it needs a reboot due to a system upgrade. But 99.9% percent of the time I access it from a laptop over RDP. And I've noticed that after a period of days, my connections get slower, responsiveness get jerky, noticeable buffering of keyboard input occurs, and at times my connection seems frozen, as if I'm locked out.
So, where's the culprit? I suspect it's either a browser (I keep two open - Firefox and Brave), the xrpd program, network congestion, or something else. I'm less inclined to think of network issues, as my other devices and computers continue to run fine.
I run Webmin and a few tabs (like the one I'm using for this site) in Brave, and Firefox for my other web work. I'm a lazy sort, as quitting a browser after every time I use it seems like a waste of time, but I'm also aware that browsers can consume a lot of memory. Oddly enough, Webmin never notifies me that I'm running low on memory, even though it seems like that's often the case. (I stand corrected on this last comment; I just checked and Webmin reports that I'm using 80% of real memory - which is higher than I expected).
The reason I included xrdp is that sometimes I can clear up my connection difficulties by connecting via ssh and issuing sudo systemctl restart xrdp. I recently received an upgrade to xrdp and now I wonder if somehow a regression wasn't introduced?
What is the best way to isolate runaway memory? I use bashtop at times, but that introduces its own memory overhead (it's more informative thatn top, in my opinion, and friendlier to read than htop). And the two highest consumers are, of course, Brave and Firefox. Should I just close them periodically and hope their memory and cpu consumption get reclaimed by the system?