What's new

Is a USB swap file always recommended for merlin?

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

Indeed. I never managed to force swap use either. I would like to see an example/screen shot of... let's say 1GB swap used on an Asus router. Come on folks, give me something to play with on AX86U. :)


Here is my adguardhome test from way back when:

This literally almost halted the router, but it took a massive size block list (+5mil domains),

1mil bearly touched the swap.

The developers of adguardhome made it intending to use small filter list. (The filter lists are reduced size adlists, kinda like wildcard blocking-higher possibility of false positives.)
 
I'm looking at this one:

If you try that one, I will try snort. Maybe we can compare.
 
Will Asuswrt use the available swap by default or I need to adjust/change something?
 
Will Asuswrt use the available swap by default or I need to adjust/change something?
Should by default, you can check your swappiness. If it is 60, you should see your swap being used like it would for any other typical Linux distro. You can check whether your swap is mounted by running the free command in the ssh terminal. If the swap isn't present under the free command, then you may have to enable it using the swapon commands.
 
Last edited:
@SomeWhereOverTheRainBow, did you read the post above yours?


I am also a numbers person. There is no such thing as "dull teknical hoohaaa" when we're trying to define something for others to understand. Thank you for that link. I too like to learn and why I'm here too.

What everyone is missing here is that I do not doubt anything presented by others, except for their inaccurate conclusions, in this case.

Is a USB swap file always recommended for an RMerlin-powered router when amtm + many/different scripts are used?

Yes, it is.

On stable storage like an SSD + USB enclosure (I myself don't count USB thumb drives as stable or reliable, but let's just ignore that aspect, for now), using the biggest swap file has been shown to help certain people's environments.

In my specific environment, I have been using a 10GB swap file since the beginning of the year without issues, slowdowns, or lags, as those links might suggest. Because we're in uncharted territory on our routers here.

Nowhere have I stated that the 10GB swap file will be (fully, or significantly) used. But what it does is let me try different scripts without worrying if any errors generated were on the temp storage side.


So while some of the recommendations from your link range from 400MB to 3GB for currently known routers, I see nothing concrete that makes me want to change my settings, at least.
 
@SomeWhereOverTheRainBow, did you read the post above yours?


I am also a numbers person. There is no such thing as "dull teknical hoohaaa" when we're trying to define something for others to understand. Thank you for that link. I too like to learn and why I'm here too.

What everyone is missing here is that I do not doubt anything presented by others, except for their inaccurate conclusions, in this case.

Is a USB swap file always recommended for an RMerlin-powered router when amtm + many/different scripts are used?

Yes, it is.

On stable storage like an SSD + USB enclosure (I myself don't count USB thumb drives as stable or reliable, but let's just ignore that aspect, for now), using the biggest swap file has been shown to help certain people's environments.

In my specific environment, I have been using a 10GB swap file since the beginning of the year without issues, slowdowns, or lags, as those links might suggest. Because we're in uncharted territory on our routers here.

Nowhere have I stated that the 10GB swap file will be (fully, or significantly) used. But what it does is let me try different scripts without worrying if any errors generated were on the temp storage side.


So while some of the recommendations from your link range from 400MB to 3GB for currently known routers, I see nothing concrete that makes me want to change my settings, at least.
Great. If you find the time to download adguardhome and try it out, please make sure to select all the filters. Maybe add a couple of large Adlist to go with it. Let me know how far past 2gbs of swap you will actually be able to use your router. I am curious to see what all you are able to do in that scenario.
 
I may consider doing that, time permitting. But do note that having the swap file in use isn't the goal of my network.
 
Why I said "improbably". But with a 2GB swap, maybe. But same size list across all those models.
Ah OK, understood. Thanks for the clarification.
 
Math is tough. I have exactly 1GB, so I am caught between a minimum of 1GB and a minimum of the square root of 1GB. While calculating that puts me to sleep, fortunately the router never sleeps.

The square root of 4GB is not 2GB. :)
Just don't use MByte units in the square root! ;)
 
I only recommend the test so we can better understand any potential consequences of things recommended. Experience is the biggest teacher.
Experience, followed by proper analysis of said experience, is indeed the best teacher. ;)
 
I support this statement. Even with AMTM, ENTWARE and NGINX webserver, I still have not even touched my "10GB" swap. Note I am also running resource hungry transmission, but I limit how many connections. However, none of the other user scripts are being ran on this platform.


View attachment 44623

In the last 15 hours my memory usage has roughly stayed the same. And I have yet to touch the 10GB swap.

View attachment 44622

Note this is using an SSD, and not the typical USB flashdrive. Also, I use it in USB3.0 mode.

Code:
RT-AX88U:/tmp/home/root# free
             total       used       free     shared    buffers     cached
Mem:        903544     466876     436668       4696      16464      92832
-/+ buffers/cache:     357580     545964
Swap:     10485756          0   10485756
After 5 days uptime, still no need for the swap.

1665379090933.png


1665379439856.png


It is amazing how efficient these routers can be with their memory.
 

Similar threads

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