What's new

Low-Power SSD for amtm, Diversion, Entware and Tailscale on the USB 2.0 Port (USB 3.0 configured as USB 2.0)

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

Status
Not open for further replies.
I am not sure how the enclosure steps the voltage down TBH.

Switching voltage regulators. They look like this:

1706577442882.png


The structure on top is a power MOSFET transistor.

The IC above is about 3x3mm package, surface mount. There are about 10x similar ICs in every Asus router.
 
Switching voltage regulators. They look like this:

View attachment 56053

The structure on top is a power MOSFET transistor.

The IC above is about 3x3mm package, surface mount. There are about 10x similar ICs in every Asus router.
😂. Right, thank you Tech9, you had me at MOSFET... my wife is an EE (SMT, COB, THT, ACF and all the other wonderful acronyms she comes home with), but it’s probably not a field I’m going into anytime soon.

If you can tell us in layman‘s terms (pebbles if you wish), about what happens when 5V is fed into an M.2 SSD enclosure and steps down to 3.3V, whether the SSD will be happy as Larry and live out it’s natural life, that’d be great 👍.
 
if you can tell us in layman‘s terms

The switching regulators have a frequency generator inside and drive the power transistor while monitoring the output via feedback circuit. The power conversion is very efficient and the size of the device can be very small. What you need to know is the power at the output. This same power + conversion loss is on the input. If your USB enclosure with SSD inside is under 4.5W and is plugged into USB 3.0 port - you're good. This USB 3.0 port can be set to work in USB 2.0 mode speeds by software.
 
To answer your question, I do not have any swap file running at all. At least the SW option in amtm is not running, nor does there appear to be any option for one in Diversion (any more).
I moved all non-adblocking features that I coded for Diversion over to amtm. The latter being the (true) Swiss Army knife for our routers, it made sense to consequently do it.
 
My recent (succesful) Tailscale install on my RT-AX86U prompted me to follow up on what I have been wanting to do for a while and replace my USB Thumb Drive (ext4) with an SSD, for reliability only; I do not care about speed or size.

Consider this...


At 512GB, it's large enough that trimming isn't really a problem - and we don't write that often anyways - nice for logs and storage...

One shouldn't be running any kind of swap flle on a router in any case - consider it just a router, not a NAS or other thing...
 
Everyone is drinking the juice and missing the whole point.

Nand specs are not the same across sizes and timelines. Old nand is superior. Nothing today is made like that anymore.

That is why larger drives are more reliable. Point.

SanDisk/WD are some of the worst SSDs I've thrown away.

When such a large SSD is in use, creating a 10GB swap file isn't a waste. It's insurance. And no, an SSD in a router's USB port is not only 100x slower than ram.

And that low speed difference is also why a router can't hit those power levels too. It simply can't be pushed that much.
 
One shouldn't be running any kind of swap flle on a router in any case - consider it just a router, not a NAS or other thing...
Obviously, you ignore the vibrant coder community hereabouts. And the features the routers come with - by Asus and @RMerlin
 
I moved all non-adblocking features that I coded for Diversion over to amtm. The latter being the (true) Swiss Army knife for our routers, it made sense to consequently do it.
Great thank you for clarifying this, was puzzled.🙏
 
As for the no swap file issue, with a large SSD, may as well add it (10GB/or max size allowed). Even if your current scripts seem to be stable without one.
I'm just now working my way through the thread so this might've been addressed, but I believe that setting (very much) more swap than likely needed will most certainly cause it to be used sooner.
 
Please let us not go down the swap rathole again.
 
Oops @elorimer , post this just as your posted the above….Sorry



Not to beat this swap discussion to death - but knowing what ”swap” means/implies is important to understand.
As @ColinTaylor pointed out, the Linux kernel thinks in terms of virtual memory. Virtual memory = real memory (i.e. 2GB in some routers) and some pre-allocated storage space it calls “swap”.

A very “general” rule of thumb (used by many of the major Linux Distrubutions) create a swap space on a drive that is 2X the real memory. Some do 1X. So in our 2GB memory based router a swap of 2GB to 4GB would likely be appropriate.
So, now the kernel has 2GB real memor and 2GB of swap space = 4GB virtual memory.

Here is the key point, and why it’s called “swap”.

The processor(s) can’t execute or even access the code or data in the swap area. If the system runs out of real memory (2GB) it selects a chunk of memory (often around 4KB - pagesize) and copies it out to the swap device/disk. Now that chunk of real memory is free to use. When and if the time comes that the processor needs to get to that “chunk” of memory, the system again needs to find another “chunk” of real memory, copy that to the swap device then copy the original chunk back into real memory. This is a “swap”.
Rinse and repeat as necessary.

Think about the delays in doing the above. As @Tech9 pointed out, the speed difference between real memory and an SSD/Disk/Storage is in the order of 100’s times!
And again, the processor can only run software and access data that is in real memory.
If the system gets to the point that this “swapping” happens often, the system slows to a crawl.

This is one of the reasons most Linux kernel people recommend against too large a swap space. The system begins to “thrash”. Either get more real memory (which can’t do done on our routers) or reduce the number of running programs or live with a very slow router…
 
Status
Not open for further replies.

Similar 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