What's new

RT-AX88U Swapfile

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

Svensationell

New Around Here
Hello,

first time, i`m sorry for my maybe bad english.

I have created a Swap File, and i see this Swapfile under my Memory Overview.

Why didn`t use my Router this Swapfile? I have under 30MB free Space in Memory, the Router don`t use the Swapfile.

The Memory stay`s full and will only clear after restart, but I use SMB the Memory will go full in fast Time and stay without to Swap

Greets Sven


Swap File.JPG
 
It will use it as it needs it. :)

No need to worry or monitor this. ;)
 
Swap only is used on my router when I get to 94 - 95% utilization of primary memory and the swap has never been larger than 150 MB. What you are seeing is normal.


Sent from my iPhone using Tapatalk
 
I've seen 500+ MB swap usage on a SSD drive, RT-AC86U router, but it didn't stop processes crashing from low RAM condition anyway. It was a router torturing mode though, I just wanted to see how far it can go with NAS-like heavy file transfers to USB storage. Swap file usage 0 is actually perfect, that means the router doesn't need it, as indicated above.
 
What is the optimal size of such a swap file? And does this also depend on the number of scripts used?

:)
 
What is the optimal size of such a swap file? And does this also depend on the number of scripts used?

:)
You might as well ask if vi or emacs is better (the answer is vi of course, but you'll get a chorus of people wrongly claiming otherwise). :D

There are a lot of differing opinions. Some say as large as possible (amtm will create up to 2 GB IIRC). There used to be a rule of thumb of twice system memory, but that was a decade or so ago, although people still follow it. Personally, I use a 512 MB swap on my AC86U, with quite a few scripts running, and I've never seen over 150 MB used. Assuming you have a fairly large USB device, a large swap file won't hurt, your router will just take longer to crash if something starts chewing up memory. My personal belief (rightly or wrongly) is that if you are using a large amount of swap, you're probably at a point where you're spending more time swapping memory in and out than you are running programs (known as "thrashing"), and since USB storage is pretty slow, your router is probably barely functioning.

Pedantically, it isn't the scripts themselves that take up a lot of memory, it's a function of what the scripts actually do. Diversion and Skynet could use quite a bit with the rulesets they create. Scribe loads the syslog-ng daemon, which if you have a fairly complex configuration, could take quite a bit. Amtm and scMerlin use zero memory when they're not actually running, as they don't do anything to affect the continuing operation of the router.
 
@cmkelley has made great points about the swap file size, as have others in different threads too.

So, why do I stick to my recommendation to have a 2GB swap file on the current crop of Asus routers?

As I have stated many times, I believe that our routers need a minimum of 2GB RAM, with 4GB or more even more optimal. Yes, there will be a lot of RAM free for most users, but Asus (and other manufacturers), let us upgrade the RAM if we want to!

On my RT-AX88U with a 2GB swap file and 1GB RAM, the free RAM has been as low as 16MB with almost 458MB of the swap file used. No slowdowns observed, no crashes, and after I rebooted (after another round of testing all the scripts I'm interested in), the free RAM was back to normal at around 28MB and the swap file at about 100MB.

The point of a swap file is 'catch' a crash and so far, 2GB is enough, even for me. Same reason I use a 256GB USB drive even if all the scripts + Entware are using just 0.17GB after 2 days uptime. Having extra storage is cheap, so I'd rather use it.

Even if amtm allowed for an unlimited swap file size (yes, I know, that makes no sense), I might be pushing for 3 or 4GB sizes, but I know that is overkill on today's routers and the work they can and need to do today. Maybe some future router when we have multi-gig connections and the ports (all ports) on the routers to use them.

I'd rather have a (much) larger swap file go unused than a 'correctly' sized swap file that may not be enough in certain usage (to keep the router from crashing). :)

Of course, I have tried many different USB drives and have found one that works great with the RT-AX88U (and the RT-AC86U before too) in USB 3.0 mode in a USB 3.0 port, the Patriot Supersonic Rage Elite 256MB. When prices fall again or I find one on sale, I also want to try the same model in the 512GB capacity because it's even faster. But I'll have to see if it's faster in the RT-AX88U too. ;)

I'll repeat again what a great router will be for me: a quad-core or better CPU, 4GB of RAM and more, and an SSD for both/all storage the router and I need. Until then, a 2GB swap file on a fast 256GB USB drive will have to do.

For the record, I had a horrible experience with a home-built pfSense box with Intel LAN (search the forum for more details). At default install values, it would just get slower and slower. Very 'over-built' with 16GB RAM and an i5 Intel CPU, the pfSense box failed miserably vs. any of the Asus routers I've owned.

Great hardware doesn't make a router great. But great firmware needs great hardware (more). :)
 
@cmkelley ...

Thank you for your detailed and insightful answer!

:):):)
 
Last edited:
I believe that our routers need a minimum of 2GB RAM, with 4GB or more even more optimal.

Yes! But they won't give us more RAM... The minimum required to run the firmware is there. Manufacturers need us to buy a new router over time to keep the business going. The price of hardware has to be at the minimum, every dollar counts.

I have tried many different USB drives

What worked best in my tests was an external USB 3.0 to SATA enclosure with an SSD drive inside. I see budget drives like Kingston A400 120GB are about $25 now on Amazon. The other benefit is it doesn't heat up or add heat by/to the USB port.

the pfSense box failed miserably vs. any of the Asus routers I've owned.

Something wasn't right there... hardware, drivers, etc. You abandoned the project too early. My x86 box with quad-core i5 limited to 1.6GHz is faster than anything AIO, running popular pfSense packages in the same time (including packet inspection).
 
There was nothing to be right or wrong about (at least on my part) of the pfSense router I built around this time last year. Defaults used. Nothing added. Nothing changed. i5, 16GB RAM, SSD 2x Intel NICs. Everything on the recommended list.

https://www.snbforums.com/threads/ac86u-vs-edgerouter.55615/page-2#post-472682

https://www.snbforums.com/threads/ac86u-vs-edgerouter.55615/page-2#post-472689

https://www.snbforums.com/threads/ac86u-vs-edgerouter.55615/page-3#post-472923

There is no router I've ever had that ran as inconsistently as that pfSense build from less than a year ago.

Btw, that i5, 16GB RAM and SSD are still in use today running Windows 10 x64 Home. No stability issues, no glitches and no slowdowns like was very apparent when used as a pfSense box. ;)

At some point in the future, I would like to try again with pfSense, after all, it is constantly updated too. But if those future defaults give me such obviously worse network responsiveness and consistency than the RT-AC3100, RT-AC86U and the current RT-AX88U with a 1Gbps up/down (symmetrical) ISP connection, the serious testing will stop there once again.

Because not only do I have a need for routing the ISP connection, but also a need to do so wirelessly too. Which to me means it needs to bring more than just a warm fuzzy feeling of 'better' because the cost to run the network just increased immensely (having to buy/run both a pfSense box and a class-leading WiFi router in 'AP' mode too). :)

In the end, all the pfSense experiment did was make me appreciate our Asus + RMerlin routers more. And since then, the bar has been raised immensely for projects like pfSense or similar to equal, let alone surpass. Particularly when 'ease of use' is included too. :)

Edit: Just read this post and thought it was on-topic here too.

https://www.snbforums.com/threads/best-router-for-packet-priortization.54648/page-2#post-548115

Pfsense is like managing a toddler and doesn't seem to give as good of performance as dedicated routers.

Doesn't seem like I'll be testing pfSense any time soon. :D
 
Last edited:
pfSense is not logical, at least to me.
Defaults used. Nothing added. Nothing changed.

As you already know, pfSense is not really Click -> Click -> Done. You never had configured pfSense running on your computer. What you are fighting for with ASUS routers with custom firmware and scripts is available there with much more options and fine tuning. Once you know what, where, how and set it up as you need it, no consumer router will match the performance. Yes, you need a switch and access points for full experience and the price is going to be higher than AIO router. Would you be surprised if I tell you that a single EAP245 V3 access point actually pushes higher simultaneous throughput to multiple clients than an AC2900 class "gaming router" as RT-AC86U? This same router, "best of the best" on your list just recently. And this is a relatively cheap AP, there are much more capable ones available.
 
Check out OPNsense.

OPNsense looks probably fresher, but not all available packages in pfSense run on OPNsense, the community is smaller, the support is weaker. OPNsense looks like a rich router interface actually, with the menus on the left side of the screen. For a home firewall OPNsense is not a bad thing to try, especially if starting from no knowledge whatsoever on both pfSense and OPNsense.
 
From my second link in post 12 above.

I said:
I have a feeling that the 'free' software is highly unoptimized for anything but their prebuilt hardware for a reason. To justify the high prices charged. If, I can only assume, that the network remains stable and also very responsive when used on their hardware.

Similar to needing Apple taxed hardware to run macOS. :rolleyes:
 
I have a feeling that the 'free' software is highly unoptimized for anything but their prebuilt hardware for a reason.

Hardware drivers are from FreeBSD. Whatever runs FreeBSD with no issues, will run pfSense too. pfSense Community Edition is not optimized for Netgate hardware in any way. pfSense on Netgate hardware may have some optimizations to run on that specific hardware. Community Edition indicates the level of support in the free-to-download version. PCIe Gigabit NICs are totally fine for a small network setup. PCIe throughput exceeds the required data transfer speeds multiple times. What can make pfSense feel responsive is optimizations as per ISP speed/type in Firewall, Traffic Shapers section, Limiters (Bandwidth), Queue Management Algorithm (QoS); Unbound settings in DNS Resolver section (local domains resolution is not enabled by Default, on DHCP leases, DHCP static, for example); UPnP Service (and NAT-PMP) is not active by Default, or Port Forwarding may be needed if no UPnP; in System, Advanced, Miscellaneous, Power Savings (PowerD); In System, Genaral what and how uses what DNS servers; IGMP Proxy (if needed) is also not enabled by Default... Then further with packages how Snort/Suricata are configured, what they inspect and how they react to it (some things may be CPU hungry), etc. There are many things. Definitely not Plug-and-Play. And no need to reboot and reset, so I'm not sure what your next 5000 posts will be about, if you switch to pfSense. :)

Similar to needing Apple taxed hardware to run macOS.

Not even close. About macOS, some specific models PC run it pretty good, actually. It's a different story though.
 
The main thing that bothered me about *sense was that QOS won't work in a virtualized environment - it requires direct hardware access to the NIC (and also requires you to disable various offload features when virtualizing it). Don't have similar restriction with Linux-based solutions.

So if one truly wants to exploit *sense, they need a bare metal solution (like a dedicated Qotom PC).
 
pfSense Community Edition is not optimized for Netgate hardware in any way. pfSense on Netgate hardware may have some optimizations to run on that specific hardware.

Thank you for making my point. :)

Totally illogical, it is. ;)
 
The main thing that bothered me about *sense was that QOS won't work in a virtualized environment

I personally never run it on a VM, but I believe they solved this issue:
https://redmine.pfsense.org/issues/8954
Other people say it also works with VT-d enabled, if supported.
https://software.intel.com/en-us/ar...ms-for-efficient-virtualization-of-io-devices

Thank you for making my point.

You're welcome, but the meaning is just the opposite of what you think it is.
Anyway, leave it alone. Continue inventing Reboot and Reset procedures in consumer routers. :)
 

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