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!

Are you sure there's not a typo in the amount of memory reported: 973MB?

Or, perhaps a typo in the router model: RT-AX86U (1GB RAM) vs. RT-AC86U (512MB RAM)?

I ask because 973MB is ~190% of 512MB total RAM for the RT-AC86U, and it would be an extremely large amount needed for just one process in a router.

Even if it were the RT-AX86U, 973MB is ~95% of 1GB total RAM which essentially leaves very little for anything else.

Just curious.
It is a memory guzzling process if the user is using a large size block list along side it.
 
This reminds me, tangentially, that htop reports pixelserv uses an unremarkable amount of memory on my N66, AC56 and AC87, but an improbably large 973M on my AC86, returning to an unremarkable amount on my AX88.

I have a sense that a common thread might be the processing of blocking lists in diversion, skynet, unbound and adguardhome.
The one thing I never particularly liked about pixelserv-tls is the block entries essentially are handled twice in the router memory. Once by dnsmasq, and then a second time once it gets passed off to pixelserv-tls per block request. On an RPI, this really isn't all that troublesome, but on the router it can quickly create an issue if using the larger size blocklist. The issue only amplifies in the presence of using ipv6 as well which means double the block entries for dnsmasq. All this and we are expecting the router to still cleanly operate with its very limited amount of memory.
 
I tried to push the limit to see how much it would take to fill the 2gb swap. Truth be told, once you are that deep in on swapping, there really is no saving grace. Either the process that is forcing that high of a usage must be killed, or crashing is inevitable. If anything, the 10gb swap might buy alittle extra time to find and kill the memory abusing processes, but that is about it. I don't think that is a valid enough point to flex out a 10gb swap.
Yes, once the system starts memory thrashing due to excessive use of swap, the system performance will inevitably deteriorate significantly as time goes by, and then it can lead to process thrashing, all of which can eventually grind the system to a halt. Often times the only solution is to kill some processes or a system reboot. Not a good situation to be in at all. A larger swap file is *not* a solution.
 
Are you sure there's not a typo in the amount of memory reported: 973MB?
Why I said "improbably". But with a 2GB swap, maybe. But same size list across all those models.
 
Last edited:
People really like to make things hard for themselves. And contradict themselves from one post to the other.

I'll try one more time.

I'm not advocating a large swap file (for it to be used).

I'm stating that a large(r) swap file has been shown to resolve issues.

No hardship for 'wasting' these small (10GB) capacities either, on any current USB drive we choose to use (although an SSD + enclosure is highly suggested).

A one-time setup, preferably on reliable media (i.e. not on a USB thumb drive).

Technical reasons for why this works are, irrelevant.

Of course, anyone can do as they please.

I do wish @Adamm could answer my questions in post 34 though.

In my view, I have the resources to 'waste' on this, and it has been working without issues for 9 months so far (since it was released).

All the technical reasons parroted so far, for not using it, are just so much 'blah, blah, blah', from my perspective.

While it's nice to have theory predict the real world, it rarely does. And I'd rather err on the side of caution (which is all a swap file is, after all).

And again, the point isn't to use the swap file (fully). It is to keep errant scripts or combinations of instructions from seeing that as an insurmountable obstacle from doing what they were designed to do.
 
I'm stating that a large(r) swap file has been shown to resolve issues.

No hardship for 'wasting' these small (10GB) capacities either, on any current USB drive we choose to use (although an SSD + enclosure is highly suggested).

Not saying you are "wrong" in your suggestions, but can you show a specific case where a "10GB" swap was required to resolve these errant script issues you so mention? Or would you say it is a fair assessment to say that in most cases a "2GB" swap would resolve these same errant issues?
 
Both statements are true. In most cases, a 2GB swap file would be sufficient. But not for all.

Using a 10GB swap file simply removes this reason (a too-small swap file) as an issue, when using testing various combinations of the available scripts.


As I've stated already, use search to find other examples.
 
As I've stated already in post , use search to find other examples.
I don't necessarily need a search to tell me that in most cases a "2GB" swap is sufficient. These "Unbound" operations probably were the result of using oversized blocklist. Unbound is known for blowing up memory usage if giant lists are used. Especially if the lists are being used in parallel between dnsmasq and unbound, or an over sized list (>1 million entries) is being used on unbound in general. The only reason why the "10GB" helped in this scenario was it solved an OOM case of abusive application use that the "2GB" did not.
 
Okay, since you know it all, why keep replying? You asked for an example, and I gave you one.

You may need to re-read what I've written. Your understanding of my posts is low, given your responses.
 
Okay, since you know it all, why keep replying? You asked for an example, and I gave you one.

You may need to re-read what I've written. Your understanding of my posts is low, given your responses.

No, I am more confused by your advocating of the "10GB" swap use "just because it is there." That is like telling a world leader to use the NUKE button in times of crisis, just because it is there. I wanted you to elaborate more. Speak more clearly. Define your rational better.

But you are advocating, which is in the context of what you say.

I'm not advocating a large swap file (for it to be used).

I'm stating that a large(r) swap file has been shown to resolve issues.

No hardship for 'wasting' these small (10GB) capacities either, on any current USB drive we choose to use (although an SSD + enclosure is highly suggested).

A more fair assessment would be to say that in some cases of script "abuse", the 10gb swap has been shown to improve the operations of the script in question. The term "abuse" being used to show that the script was being used past what was considered an acceptable capacity for the router it was used on.

However, that does not necessarily mean that it should be the accepted standard for all routers concerned.

After all the goal of having a swap -is not to encourage the use of swap as a memory replacement, but to reduce the possibility of an out of memory situation occurrence.
 
Last edited:
It isn't 'just because it is there'. Keep reading to understand what I've posted already.

Your argument is slowly twisting itself around, while you blatantly ignore what you quote me stating.
 
And again, the point isn't to use the swap file (fully). It is to keep errant scripts or combinations of instructions from seeing that as an insurmountable obstacle from doing what they were designed to do.
I think the main difference is you use the word "errant", while i use the word "abuse".
 
No, I know which words I'm using.

Errant is not using that size but thinks it needs to.

Abuse is the opposite.

Now, you may begin to appreciate what I'm trying to convey. Stop substituting words where they don't belong.
 
I know which word I'm using. Try to understand that. No correction is needed.
 
I know which word I'm using. Try to understand that. No correction is needed.
Okay, a vocabulary lesson is for short order here:

It is to keep errant scripts or combinations of instructions from seeing that as an insurmountable obstacle from doing what they were designed to do.

A script is not straying away from standard use here if the user is the cause for miss-lap in use. There is no "accepted" standard the scripts adhere to except for the ones the developers set for them. And the ones who control the operation of the script are the users using them. Now whether the miss-use case was inadvertent is left for interpretation, but whatever the case may be; the script never changed course on its own. So "errant" is a bad choice of words.
 
Last edited:
Reel it back in guys.
 
Either the process that is forcing that high of a usage must be killed, or crashing is inevitable.

Yes, and I can crash every Asus router (ab)using just GUI options available. 1GB models hold a bit longer, but still don't survive no matter what size swap is available. All TrendMicro components enabled, 500Mbps speed download and 20GB mixed size files USB3 file transfer to SSD - gone! 512MB models are gone in 60 seconds. Swap file is useless even on SSD. Swap on USB stick... what?
 
Yes, and I can crash every Asus router (ab)using just GUI options available. 1GB models hold a bit longer, but still don't survive no matter what size swap is available. All TrendMicro components enabled, 500Mbps speed download and 20GB mixed size files USB3 file transfer to SSD - gone! 512MB models are gone in 60 seconds. Swap file is useless even on SSD. Swap on USB stick... what?
I still swap on Asus routers, but my latest test subject doesn't need a swap...

1664927510201.png
 

Sign Up For SNBForums Daily Digest

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