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!

cljackhammer

New Around Here
38 days of uptime running Adguard, Skynet and Unbound.
1665010508170.png
 
I am surprised you are doing all that with only a 2gb swap, and for 38 days.
Au contraire, mon frère!
He is doing it with 0 used Swap - what a waste on the usb device: defining 2gb of space, but not needing it!

Nevertheless interesting: The AXE16000 does not even need/use 50% of the RAM - so clearly no need for Swap at all!
 
I can smell a SWAP file bun-fight brewing .... :D:D
 
Au contraire, mon frère!
He is doing it with 0 used Swap - what a waste on the usb device: defining 2gb of space, but not needing it!

Nevertheless interesting: The AXE16000 does not even need/use 50% of the RAM - so clearly no need for Swap at all!
Application wise- anything past 1GB, I thought it was routine to atleast have a swap double the size of the ram capacity. (~4GB since RAM is ~2GB). It is so odd that the router doesn't even flench with AdGuardHome, Skynet, and unbound running on them. The NVRAM usage is getting pretty full. JFFS is at a reasonable size.
 
Last edited:
Au contraire, mon frère!
He is doing it with 0 used Swap - what a waste on the usb device: defining 2gb of space, but not needing it!

Nevertheless interesting: The AXE16000 does not even need/use 50% of the RAM - so clearly no need for Swap at all!

Yeah, having a 2GB RAM will certainly help minimize significantly the use of swap during daily router operations, but there might be other factors as well.

First, what's the current value of "swappiness" in this particular router? Is it the default ZERO like found in some AX routers? Has it been modified to something else once the swap file was activated?

Also, we don't know the size of all the blocked/allowed/filter lists being used by Adguard & Skynet. For example, small/medium size lists are less likely to trigger swapping when the router has 2GB RAM.

In any case, it's still nifty to clearly see the positive effects/advantages of just doubling RAM size from 1GB.
 
Yeah, having a 2GB RAM will certainly help minimize significantly the use of swap during daily router operations, but there might be other factors as well.

First, what's the current value of "swappiness" in this particular router? Is it the default ZERO like found in some AX routers? Has it been modified to something else once the swap file was activated?

Also, we don't know the size of all the blocked/allowed/filter lists being used by Adguard & Skynet. For example, small/medium size lists are less likely to trigger swapping when the router has 2GB RAM.

In any case, it's still nifty to clearly see the positive effects/advantages of just doubling RAM size from 1GB.
I am curious to know what router applications are also being utilized. The NVRAM is getting quite full.
 
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.
 
Swappiness = 0 means the system will never use swap. Mine is the default 60. How did you change yours?
 
Last edited:
I think there may be another advantage to a swapfile that I wasn't aware of, having to do with syslog-ng. If I follow, syslog-ng sets up an output buffer for each defined destination. The size of the buffer is dependent on the maximum number of messages that can be sent and the maximum length of each message. I have 16 destinations, most of which are used for only an occasional message of at most 50 characters. Looking at htop, I have 346MB of VIRT memory allocated (about twice the calculated size of the buffers), but only 12000 RES. Might that mean that syslog-ng has requested an allocation, but not actually used it? I wonder what happens if those buffers are requested but there is no swap file defined?

EDIT: Not really. I reduced my maximum message size from 2048 to 512, and the allocated memory did not change. I reduced the number of messages in the output queue from 4096 to 2048, and the allocated memory did not change. In theory my output buffers should have changed from 16x2048x4096 = 134MB to 16x512x2048 = 16MB but my allocated virtual memory stayed at around 345MB.
 
Last edited:
Incorrect. See the other thread about swap and what the swappiness value means.


swappiness = 0 is the default value on some routers (like my RT-AX86U). Again, see that other thread.
I completely agree; however, at the same time one way to encourage swap use is to increase the swappiness value. If left at 0, it is hard to say beyond the shadow of doubt that the swap will get used when needed aside from what has already been mentioned about in the other thread. We know at somepoint it will trigger, but not until it is very close to the OOM. One way to test this theory is to obserdly force RAM usage until it is full. A good way of doing such is to load too many adlist on either adguardhome or diversion. The user will find out quick if the swappiness of zero will allow their swap to be used when it is truly necessary.

My working theory on why the new AX models have a default swappiness of zero is because the amount of ram some of them have. I suspect this default is only true for the models that have 2GB of ram. Correct me if I am wrong on this though because I might be.

EDIT: as @ColinTaylor pointed out, my working theory was wrong. But I figured it was wrong.
 
Last edited:
I completely agree; however, at the same time one way to encourage swap use is to increase the swappiness value. If left at 0, it is hard to say beyond the shadow of doubt that the swap will get used when needed. One way to test this theory is to obserdly force RAM usage until it is full. A good way of doing such is to load too many adlist on either adguardhome or diversion. The user will find out quick if the swappiness of zero will allow their swap to be used when it is truly necessary.
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).

My working theory on why the new AX models have a default swappiness of zero is because the amount of ram some of them have. I suspect this default is only true for the models that have 2GB of ram. Correct me if I am wrong on this though because I might be.
My RT-AX86U has swappiness of 0 and it only has 1GB of RAM.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top