What's new

How much RAM is enough in a router?

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

My "little" router.. hehe...

Stop by the house - it's seamless... there's a bit of DNS magic as well, but everyone that has camped out at Casa de SFX has been amazed that we have skinny pipes... 50MBit downstream these days isn't very fast compared to some...

Latency matters...

CPU load is around 5 percent - tuning...


I wish I could (stop by the house)!

'Latency matters'. Truer words were never spoken.

I knew an acquaintance that had a backyard built 'hot rod' with a big V8 and dual (quad?) carburetors. It was fast, but it needed some time to get there. A few years later I saw a Porsche Cayenne Turbo S that took off from a stoplight like it jumped to hyperspace with Han Solo driving.

While that old V8 might have been producing more power at the top end, that Porsche would have been at the finish line before the V8 would have even left the start. :)
 
'Latency matters'. Truer words were never spoken.

If you recall - I used to do this as part of my daily job :D

And yes, we're all hot-rodders at the end of the day...

(biz guys need to put checkbox features on the box, engineers just pile them on)
 
and your point being?
I saw your good hunt comment @ L&LD... Everyone likes a good hunt. I spotted an elusive 4 pointer a few posts back. If I had to choose between the two I'll take the speed over the ram any day. ;)
 
Last edited:
I saw your good hunt comment @ L&LD... Everyone likes a good hunt. I spotted an elusive 4 pointer a few posts back. If I had to choose between the two I'll take the speed over the ram any day. ;)

That's your opinion, and that's ok...

Not my design objective - clocks are nice, but with connectivity - there's a few bars, and there we need to flex the bars as clocks do not help there - hence RAM and memory performance...
 
My "little" router.. hehe...

Stop by the house - it's seamless... there's a bit of DNS magic as well, but everyone that has camped out at Casa de SFX has been amazed that we have skinny pipes... 50MBit downstream these days isn't very fast compared to some...

Latency matters...

CPU load is around 5 percent - tuning...

I'm curious about this 'little router' project, is there a thread somewhere relating to it?
 
I never said code needs to be stored in ram. It needs to be run in ram.

It doesn't. See my reference to a router's bootloader as an example of code that runs from ROM.

RAM is only needed to store dynamically generated data.
 
It doesn't. See my reference to a router's bootloader as an example of code that runs from ROM.

RAM is only needed to store dynamically generated data.

Yep, the ROM is addressable - little known item is that the ARM cores have a bootstrap address burned into the chip, that is the starting address for bootloader (whether CFE, uBoot, whatever...)
 
It doesn't. See my reference to a router's bootloader as an example of code that runs from ROM.

RAM is only needed to store dynamically generated data.
And I recall my father's office where code was stored in IBM patch panels with jumpers to-and-fro. Reprogramming meant switching the jumpers.

I'm am antique from the old school: Data is stored in memory. Program code is just data and can thus be stored in memory--any memory. IBM punch cards were also memory.

Processing takes place in CPUs. While CPU chips might have cache, that is still memory and no processing takes place there.
 
It doesn't. See my reference to a router's bootloader as an example of code that runs from ROM.

Bootloader yes - but the operational code is in a block based device, so we need to pop that into RAM once the bootloader is done...

Executable code lives in RAM in most devices - exceptions being NOR and ROM based code - which makes the recent Intel/Micron stuff kind of interesting, as it combines the benefits of Flash, plus NOR/RAM into one single package - remains to be seen where that tech goes, but it's definitely interesting...
 
Yep, the ROM is addressable - little known item is that the ARM cores have a bootstrap address burned into the chip, that is the starting address for bootloader (whether CFE, uBoot, whatever...)
Huh? ROM (read only memory) is addressable? I suppose you could argue the EPROMs (eraseable programmable read only memory) are "programmable" but to compare that to addressable RAM... meh. Now there is a mention of ARM design secrets. This conversion has almost moved into an argument about semantics. Yikes... I'll let the hardware and software developers continue with this debate... and Jackalope hunting season should be declared officially over...lol... o_O
 
Last edited:
You guys are welcome to continue the discussion, although I think it has run its course. But tone is getting pissy, SFX, and that needs to stop or thread will be locked.
 
What the hell is this thread :O ?
This thread can be easily solved. The amount of RAM you need is really dependent on how much data is going to be stored at one point and the size of the programs and the OS. So it really depends on what is needed. Nowadays 32MB is the minimum for a MIPS 24K router running the usual router stuff.

If you really are concerned about how much ram you need why not get one of those routers that you can change the ram such as the ERPRO, some mikrotik routers, x86 that isnt embedded and so on. Even many intel NUCs let you change ram.

Lets take a router broadcom wireless ARM router that has 256MB of ram, that is more than enough for a consumer router but if you start using other things on it say openWRT and you start running lots of programs than obviously it is going to use more RAM. In the past with the mikrotik RB450G one question was what you could do with the 256MB of ram it had and one of the functionality of it was virtual router so you could run openwrt as a virtual OS within the RB450G or have many small routers running virtually so you can create your own virtual network or even do other things with it. So many things you can do but how much ram you need for a router only to do router related stuff really depends on the architecture and OS. For those who have RMerlin's firmware and only use the router as a router (including wifi) how much ram is used? Pretty sure 128MB provides plenty for connections and logs but than you also have the other features through USB too. Manufacturers will make the hardware available as best they can if they can. if you can add double RAM for the same price than pretty sure you will hence why the AC88U has 512MB of ram as ram density doubles for the same price. Think of it in terms of PCs as well, now the minimum for a desktop for smoothness is 8GB, last time people said 4GB was plenty and good for the future but desktop world progresses differently than routers as routers usually only have 1 job and no graphics/3D (except 3D security) to worry about. PCs on the other hands if games and software didnt push for more vram and also resolutions we would be stuck at low memory amounts. I still think that the amount of memory provided by today's GPUs are still too low considering the availability of software that can use GPUs, even browsers use GPU acceleration too and unstable vram is very apparent with the browsers periodically glitching.
 
SEM, the problem, as I see it, is that there is almost no pro-sumer router today that just runs the 'usual router stuff'. At least not for any user that buys these types of routers for the features they offer above a $10 'ebay special' basic router.

What this thread is about (for me) is that a processor is only as powerful as the ram it is coupled with. Together they allow for maximum system performance. The processor without ram cannot do anything useful for an end user. I do not care about prerequisites like booting up a BIOS. Or initializing a driver. I am talking about what happens after all these (expected) steps are completed so that I can now use the system to make it do what I want.

At this point, ram matters.

For those that really want USB attached storage, 4GB ram would not be 'too much', particularly for those who use multiple drives on a powered USB hub on their routers.

For those that like to connect all 253 possible devices to their router on a /24 subnet, more ram is not a 'want' it is a need.

For anyone that enables all or most of the features the latest routers offers, again limiting the ram is not an option if the best experience is to be expected and achieved.

When a mix of the above conditions is also a 'requirement' for a router with such features, the need for more ram is made even more obvious.

I don't think anyone is disputing the above?

But what some don't seem to understand is that the indicated 'free' ram on a running system does not negate the need for more ram for an even better experience on otherwise identical hardware (including an identical processor).

How can this be? Simple. Any os is tuned to conserve/use as much ram as possible at all times. If a system is tested with 128MB of ram, it will still show some 'free ram'. A system with 512MB of installed ram will still show 'free ram' too, of course. But if they are both capable of running the same features and network loads, the router with the higher capacity ram will do it more effortlessly, with less hiccups and with lower latency too.

If we were just talking about basic (wired) routing features here, more ram would be a wasted topic.

But we're talking about today's wireless routers with two or more radios inside that offer features and capabilities that would cost hundreds of dedicated dollars just a few short years ago. More ram is not an option anymore, imo. Even the latest routers with 512MB is still laughable to me, no matter how well tuned the os is to running on minimal hardware configurations.

I don't want just 'good enough'. I want much, much more. I want the hardware to match the price tags of these $300 to $500 'flagships'.

And I don't just want this for mere bragging rights. I want this because I know this will give my networks a real and tangible edge on not only performance aspects, but in stability too.

As I have hinted at before, a Synology or QNAP 8 port or higher (10GbE ports preferred), 8x8:4 'wireless router' offered with 'full' DSM/QTS support (in addition to routing abilities) and 4, 8 or 16GB of ram and the ability to have multiple hdd or ssd's running inside would be worth considering for each and everyone of my customers (including myself) even at the thousand dollar level.

If they could offer the above hardware with the level of support, stability and security that RMerlin offers select Asus routers today? At $2,000 they would still be worth considering too.

The reason I would entertain an almost 20x to 40x price jump (from my 'minimum' recommended RT-AC56U which can be found for around $50 on sale)? Such a router from Synology or QNAP would not be obsolete on a whim. And even with new technology available, it would still be stable and reliable (just like their NAS' are) for many, many years and stretching even into decades.

Because it would be an open system and not limited by notions of what a router 'should' do and how it 'should' do it.
 
Yep, the ROM is addressable - little known item is that the ARM cores have a bootstrap address burned into the chip, that is the starting address for bootloader (whether CFE, uBoot, whatever...)

That's pretty much the case for any CPU, AFAIK. For my graduation project, I designed a system around a Motorola MC6809. it also had a boostrap address, from where it knew where to "boot" from (I don't remember if it was the address of a jump vector, or the jump vector itself - that project was 20+ years ago...). So, I had to locate the EPROM at a certain address space, with the jump vector (was probably at $FFFE-$FFFF) accessible to the CPU.

My "OS" was stored in an EPROM, with a few KBs of RAM available for uploading user software to it. Software was uploaded over a serial port, using a special terminal client written in Turbo Pascal.

Feels like yesterday...
 
The reason why 512 MB of RAM on a router is overkill for 90%+ of users, here's what memory usage is like on my RT-AC88U:

Code:
admin@Stargate88:/tmp/home/root# free -m
             total         used         free       shared      buffers
Mem:        515308       123256       392052            0         9304
-/+ buffers:             113952       401356
Swap:            0            0            0

I'm barely using half of what a router with 256 MB of RAM would offer.

Don't forget that heavy caching for file services is only useful if the same data is requested multiple times - a scenario that's very rarely the case when dealing with shared data (be it movies, music or other documents). Caching becomes important mostly with data that gets a lot of random access. For instance, a database. You wouldn't store a database or your Outlook PST on a network share hosted by a router, as your bottlenecks would be pretty bad.

The other scenarios that would involve a lot of random seek access are highly unlikely to be used with a router (video/audio editing for instance).

So for a router that shares a USB disk, you typically want enough caching to contain filesystem metadata. The file data itself rarely needs to be re-read a second time, so you would most likely NEGATIVELY impact performance, as that file that gets only one single access would force cache maintenance on top of the file sharing. Maintaining cache data comes at its own price, overhead-wise.

So, 512 MB might be nice for a router, but for the next couple of years, I'd say that the vast majority of users will not even fill up their 256 MB RAM with their home router. So right now, I wouldn't consider 256 vs 512 MB RAM to be a decision factor when choosing a new router. The CPU speed is far more important (and even then, only if doing anything more than providing LAN/wifi access).

Once we start getting memory intensive applications such as IPS (snort and the likes), then we'll start worrying about the memory on our router.
 
When it comes to routing one of the features that will use a lot of RAM is BGP so a router with a lot of RAM is useful for that but barely any consumer or SOHO uses this and BGP is not available on consumer routers. RAM size doesnt have to correlate with processor speed. This is because when with BGP it will store a lot of routes in RAM and the processor speed only relates to the throughput for the network because for a larger table size if the index size is constant than no additional processing is required. What makes BGP compute intensive is when it is updating the routes.

@L&LD i know its nice to have more RAM but i am explaining the RAM needs and usages. Having 253 devices on the network doesnt equate to lots of RAM usage (remember the router programs that run on x86 work differently than those embedded SoCs in the way they work and handle things). Also each x86 instruction is much much bigger than a MIPS instruction for the same number of bits. If you dont believe me, connect 1000 devices to your network using the 10.... network. I've done before in college with the college network, using a pentium 3 dual PC with a bit of RAM had so much free ram regardless of how many users.

So if you're asking why some routers have a lot of RAM such as the ERPRO or mikrotik CCR as they both support lots of RAM, the reason is because some functionalities like BGP require a lot of RAM, holding large databases in RAM or even running software alongside as well. Take mikrotik for example, you cant run other things on them but my CCR uses 1GB of ram all the time out of the 4GB it has and this is just for normal consumer usage but even though i set 32MB of DNS cache and have 140K IP addresses in the address list (this feature isnt really used in consumer routers). When it boots the CCR uses about more than 500MB of ram and it is a highly paralleled CPU so there are bound to be multiple threads of the same thing. I also use the web proxy feature on it which only uses a few MB of RAM.
 
One can actually do an experiment directly, and see the impact of memory and capacity - I mentioned the RPi earlier, and it's a great little platform to test this against, as you can limit the amount of memory available to to the CPU by adjusting the CPU/GPU memory split in the config.txt file - and this can be done using OpenWRT directly, or Raspbian if one wants to roll their own using Bridge-Utils or the iproute2 package.

Thruput itself should be consistent across all allocations - but load testing and the number of connections will improve as you increase the CPU side of the split.

The major OEM's are moving to 512MB, not for today's traffic usage models, but they're considering the life cycle challenges that one might face a couple of years down the road.

256MB is, what I consider, the practical minimum these days - considering the services that are running on it, and the number of clients that can be supported. One can run less (there are a couple of AC1900 class devices with 128MB), but I wouldn't consider them longer term options...
 
For my graduation project, I designed a system around a Motorola MC6809. it also had a boostrap address, from where it knew where to "boot" from (I don't remember if it was the address of a jump vector, or the jump vector itself - that project was 20+ years ago...). So, I had to locate the EPROM at a certain address space, with the jump vector (was probably at $FFFE-$FFFF) accessible to the CPU.

My "OS" was stored in an EPROM, with a few KBs of RAM available for uploading user software to it. Software was uploaded over a serial port, using a special terminal client written in Turbo Pascal.

Kindred spirit - except my project was on 6502... thanks for sharing.

The fun part about these little single board computers these days - all the hard stuff is done (but can still go there if one wants).
 
Similar threads

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