What's new

Memory usage

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

nospamever

Regular Contributor
AT the moment my RT-AC86U with Merlin 386_7, Diversion Standard and YazDHCP is running at 81% or 413mb memory usage. AI Protection uses 82mb and Diversion uses 19mb. Disabling both AI Prortection and Diversion while keeping YazDHCP, my memory usage is 315mb or 61%. Ai Protection and Diversion are on normal settings and I have not changed default values. Are these memory numbers look normal?
 
Thanks I read it but not sure what it means. Tried the command $ free -m but did not work for me. Sorry I am just starting out.
The command is "free -m" (without quotes), not "$ free -m".

Example:
mem.jpg
 
Basically, the system will use available memory to cache processes to increase performance. If you install RMerin firmware to allow running custom scripts, several of these scripts will create a swap file on a usb drive to use as virtual memory.

This is not the technical explanation, just a simplified version. :)
 
Ok got it. Since I started this post, I created a 2GB swap file using AMTM. So free -m looks like below:

1666960580130.png


1666960636649.png
 
AT the moment my RT-AC86U with Merlin 386_7, Diversion Standard and YazDHCP is running at 81% or 413mb memory usage. AI Protection uses 82mb and Diversion uses 19mb. Disabling both AI Prortection and Diversion while keeping YazDHCP, my memory usage is 315mb or 61%. Ai Protection and Diversion are on normal settings and I have not changed default values. Are these memory numbers look normal?
Sounds about right, I'd leave AI-Protect turned off. Firmware normally has that turned off by default. You also tried Diversion. You will actually have better control of what gets blocked when using diversion.
 
Sounds about right, I'd leave AI-Protect turned off. Firmware normally has that turned off by default. You also tried Diversion. You will actually have better control of what gets blocked when using diversion.
Done - just turned off the AI-Protect but it is so attractive to have it on! Will leave Diversion running. Many thanks.
 
Done - just turned off the AI-Protect but it is so attractive to have it on! Will leave Diversion running. Many thanks.
AiProtection and Diversion perform different functions, although there can be some overlap depending on how you configure Diversion.

Diversion is a hosts based ad-blocker. It can also block known malicious sites with an appropriate block list, the same as some DNS providers do. AiProtection is a Malicious Site Blocker, Intrusion Detection System, Content Filter and performs Infected Device Detection. That said, I don't use AiProtection because of the performance hit.
 
Not sure how AiProtection does this on underpowered hardware and with no true packet processing with NAT acceleration. In my experience it only gives false positives. Also does nothing with https traffic, but it's expected. It does best sending user data to TrendMicro servers.
 
My swap is getting used!

View attachment 45101
I wouldn't worry about it. Your memory usage is back down at 53% now.

IIRC Diversion has a daily scheduled job that downloads updated blocklists. As part of that process it's sorts the data. Linux's sort will grab all available free memory if it thinks it will speed up the sorting process. In your case it looks like it also grabbed 176kB of anonymous memory. If you didn't have a swap file it would have still worked.
 
... As part of that process it's sorts the data. Linux's sort will grab all available free memory if it thinks it will speed up the sorting process.
That's not technically correct. The Linux kernel memory manager would not allow all "available free memory" to be taken by one user space process. A certain amount of "free memory" is actually reserved for the system itself to ensure that a minimum set of critical system operations (e.g. kernel processes making atomic allocations of contiguous memory) can function properly and keep the OS running as long as possible even in the event that memory becomes low (i.e. low-water mark has been reached).

This minimum threshold is set by the "min_free_kbytes" value:
Bash:
cat /proc/sys/vm/min_free_kbytes
This value ("min" entry in pages) is found in "/proc/zoneinfo" as well:

For example, in my RT-AC86U router the value of "min_free_kbytes" is 20480 (20MB). Here's a screenshot showing the values:

RT-AC86U_MinMemThreshold.jpg
 
That's not technically correct. The Linux kernel memory manager would not allow all "available free memory" to be taken by one user space process. A certain amount of "free memory" is actually reserved for the system itself to ensure that a minimum set of critical system operations (e.g. kernel processes making atomic allocations of contiguous memory) can function properly and keep the OS running as long as possible even in the event that memory becomes low (i.e. low-water mark has been reached).
I think you're just nitpicking the language I used. Maybe I should have emphasised the word "available", or said "all free memory available to be used by user processes".
 
I think you're just nitpicking the language I used. Maybe I should have emphasised the word "available", or said "all free memory available to be used by user processes".
Well, that may have been what you meant to say, but it wasn’t really crystal clear, and it was not what was ultimately conveyed, IMO.

I consider this forum to be a technical forum, and while not everyone here is expected to have extensive technical knowledge, or be some kind of engineer or s/w developer, those of us who are could be more precise in our posts when explaining a concept or a scenario, or when providing feedback, for the benefit of all the people who are not "in the know" regarding the technical details of the subject at hand.

I realize that we might not always be able to do that in every single post, but I believe that many people come to this forum to learn as well, so we can take the opportunity to impart some additional knowledge along the way and expand the readers’ technical understanding. I don’t consider this to be nitpicking at all.

We, of course, can agree to disagree on any or all of the above.
 
Similar threads

Similar threads

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