What's new

Merlin thought that you should see this

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

I don't want to repeat yet again what was already discussed to death in that other thread. But in summary, it's trivial to force RAM usage beyond 100% and see that swap is being used (even with swappiness=0).
You are good. You don't need to repeat anything. I did edit the post. We know that there is the high-water mark position and low-water mark position where it "should" start swapping. But it would be interesting to see if it will prevent the router from crashing once the swapping starts.
 
Last edited:
@ColinTaylor another unanswered question I have is, are the high-water mark position and low-water mark position different on the older SDK routers. It kinda makes you wonder if they should be default 0 swappiness as well.
 
If this is an uptime contest, I won’t win, but I’ll post anyway. RT-AC86U on 386.7_2, 40 days and 3 hours and counting. I may have upgraded from 386.7 back then.

I have no swap configured (I try not to exceed the available RAM on any of my Linux systems), 430 MB RAM, 98 MB free, 84 MB buffers, 47 MB cache. That is, the "hard" RAM use is about 200 MB and the 98 MB is completely "wasted", not even serving as file system cache.

I am using it as a basic NAT router and wifi access point. The only extra beyond that is the XMPP server Prosody from an Entware package, running directly on the file system (instead of a RDBMS) on USB.

My uptime will be ruined again as soon as something newer becomes available.
 
No anomalous behaviors. I just wanted to make note of that. I'll continue the monitor memory usage over time, but at the moment I don't see any reason to alter the default swappiness value (0).
Awesome, keep in touch with letting us know your progress. I, for one, am happy to know adguardhome is working on it.
 
Not exactly sure what you guys are talking about. I setup a swap file as needed by Skynet. No swap is being used. Do I need to update another configuration setting. Why would the OS resort to using swap space if enough memory is available? I have AI protect flexqos, IPV6 etc. enabled. I have not observed any issues/reboots with this configuration.

So, can someone ask tell me precisely why I need to update the configuration to force swap file usage and what configuration parameters need to be set. Swappiness is set to 0.

I'm assuming here that by now you've probably read the other thread that @ColinTaylor already pointed to, particularly the info about swap & swappiness, "free RAM" & actual free RAM availability, so I won't rehash the topic here. I believe that the info given in that thread should answer most, if not all, of your questions.

However, I'd like to emphasize one point. When changing the value of "swappiness" from ZERO to something greater than ZERO, you're *not* forcing the OS to use the swap file; instead, you're effectively changing the triggering conditions under which the swap file will be used based on pre-determined "low & high water mark" thresholds.
 
Last edited:
I'm assuming here that by now you've probably read the other thread that @ColinTaylor already pointed to, particularly the info about swap & swappiness, "free RAM" & actual free RAM availability, so I won't rehash the topic here. I believe that the info given in that thread should answer most, if not all, of your questions.

However, I'd like to emphasize one point. When changing the value of "swappiness" from ZERO to something greater than ZERO, you're *not* forcing the OS to use the swap file; instead, you're effectively changing the triggering conditions under which the swap file will be used based on pre-determined "low & high watermark" thresholds.
@Martinski one thing I am curious about is why do the older models default to 60 swappiness, while the newer ones default to zero. My concern is - is there an actual difference between them in regards to the predetermined "low & high watermark" thresholds. Further, should it be something the older model owners should be concerned about if there is no difference in the predetermined values, or vice versa with the newer models? Has any one done any research of these differences? should either generation of model owners be concerned?
 
No anomalous behaviors. I just wanted to make note of that. I'll continue the monitor memory usage over time, but at the moment I don't see any reason to alter the default swappiness value (0).

One thing to have in mind is that when swappiness = 0, the triggering condition for swapping to occur tends to be an exceptionally rare scenario under normal router operations & workloads. That's why in most instances, it seems like swapping has been disabled.

-----------------------------------
When swappiness value == 0, swapping occurs only when the combined value of file-backed pages (nr_file_pages) and free pages (nr_free_pages) is less than the "high water mark."
-----------------------------------

What does the above really mean in practice?

On my RT-AC86U router, it would mean that for swapping to occur the number of free pages plus the number of file-backed pages must be *below* 30MB (the high water mark), which essentially means that to reach this point, almost all of the file-backed pages have been freed/discarded, and almost all used RAM has been allocated to anonymous pages. This would be a very rare situation to occur under normal router operations & workloads. You have to go out of your way to make this scenario happen (usually done for testing purposes), especially when you have 1GB RAM or more.

Moreover, on the chance that you've reached this rare scenario, you're likely to have some performance degradation because a lot of the currently active running processes may not have file-backed pages readily available in RAM (not enough page cache) so many more disk I/O operations would need to be made, which is not what you want for a smooth running system.

The bottom line is that having swappiness = 0 when you have a swap file available could be a "double-edged sword." Luckily, the triggering condition is unlikely to happen when you have 2GB RAM.

My 2 cents.
 
@Martinski one thing I am curious about is why do the older models default to 60 swappiness, while the newer ones default to zero.
I cannot answer that specific question since I'm not privy to the decisions made by ASUS/Broadcom WRT their system requirements & design of the routers. Anything I say would be completely pure conjecture & speculation.

My concern is - is there an actual difference between them in regards to the predetermined "low & high watermark" thresholds. Further, should it be something the older model owners should be concerned about if there is no difference in the predetermined values, or vice versa with the newer models? Has any one done any research of these differences? should either generation of model owners be concerned?

I don't know if there are differences in the "low & high water" threshold values between routers with 1GB RAM vs 2GB RAM. If there are, I suspect that they're bound to be small relative to total RAM size since the objective is to always use the available RAM as much as possible because it's not a resource that you want to waste by not using the free RAM when needed.

Also, keep in mind that the "low & high water" thresholds are also used for memory page reclamation, regardless of whether a swap file has been activated. So those thresholds are important for memory management to keep the system running smoothly, so I'd suspect they have been chosen with some care by the engineers in charge of that part of the system (at least that's been my experience when I've worked on s/w dev. projects for embedded devices).
 

Latest 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