Flint 2 USB3 Speeds | How fast is it practically?

The Flint 2 has a USB3 port and on paper, it should support up to 5 Gbit/s of input/output.

I intend to attach an external SSD or hard disk to let the Flint 2 serve as a NAS.

  1. What are the actual speeds you guys are seeing on the USB3 port?
  2. What kind of disk are you using? SSD/HDD?

Please keep in mind that this file sharing feature is not a proper way to replace a NAS.

The speeds depend highly on the used drives, you can have a search here on the forum, there are plenty of people with different speeds.

5 Gbps is something you will never reach because of the slower LAN / Wi-Fi speed.

1 Like

I understand that wifi and lan speeds are a bottleneck but the read/write speeds should equal the link bandwidth if I'm not wrong?

I read on reddit that people are only getting a max of 80MB/s even over gigabit LAN, which equals only 640 Mbps. They all get speeds of at least 900 Mbps when testing through iperf on the same link.

The same drives connected directly to their laptop/desktop read at well over 200MBps. So what's going on here?

Can you immagine a router that is faster than your laptop?
I'll be more than happy to see an stable 10MB/s in a router used for file sharing.

Easy: A router isn't a NAS.

1 Like

@Renato I can, since the chip's processing power is enough to handle this task. A chip with a similar IPC does handle those read/write speeds.

Even my 7-year-old Xiaomi Router 3G with a lower specced processor does 50-60 MB per second.

@admon NAS stands for Network Attached Storage, so to be pedantic, technically this is storage attached to the network. I understand it's not a full-fledged Mini PC with hard drive bays which is what people conventionally consider a NAS, but the specs on paper should be able to handle 5 Gbps to the SoC itself.

Can an engineer from the team answer where the bottleneck is? htop shows that the CPU is not fully utilized during SMB operations, nor is the RAM saturated, so I find it hard to believe as a programmer that the bottleneck is the processing power of the SoC. I suspect that the USB 3 port is somehow not up to spec.

Please feel free to correct me.

Do you know what eating power for use NAS?

Okay to clear things up:

  1. The Flint 2 USB port is 5 Gbps (which is roughly 450 megabytes/second (theoretically 625, but there's USB overhead)).
  2. If you attach an NTFS-formatted (Windows format) drive, it will go through a slow userspace translation layer (NTFS-3G FUSE) and will only achieve around 80 megabytes/second. Mainly because the driver isn't native inside the kernel and constantly has to contact userspace (FUSE) which is very slow. It also uses a lot of CPU on the router.
  3. If you want good speeds, you need to reformat the drive as a Linux-native format, such as Ext4. Then you will achieve around 400 megabytes/second or more. And the CPU usage will be much lower. (Beware of modern Linux formats though, primarily you need to avoid BTRFS; the GL-iNet kernels are extremely ancient, and BTRFS has historically been a very buggy filesystem until very recently, so it isn't recommended to be used unless you have a top-modern kernel, preferably 6.12.x or newer, which has sufficiently bug-fixed the BTRFS drivers and made the filesystem stable enough to be safe).
  4. Beware that there's been reported issues about the USB port interfering with the WiFi antennas (thus slowing down your WiFi). It seems to be a rare issue, but at least be aware of it and research it if you care about that. The person who I've seen talking about it used a small USB stick though, and the stick itself may be radiating a bunch of nearby interference (which then most likely interferes with the antenna's ability to sense the incoming WiFi signals from devices). It may not be a problem with a USB disk enclosure with a long cable. But the cable should be high quality (well shielded), since USB 3 uses 2.5 GHz which is very close to 2.4 GHz WiFi and can interfere (I have literally seen a MacBook Pro 2016 drop its WiFi to 0% due to a specific low-quality USB cable that was radiating interference, so it can definitely be a problem with bad cables that lack shielding). By the way, the general hint that a USB cable has good shielding is that it is thick and stiff/hard to bend.
1 Like

And in addition: Keep in mind that HDDs (so spinning hard drives) are only capable of around 80 - 150 MB/s, however it strongly depends on the used drive, the amount of data and so on.

1 Like

ext4 is an overkill for flash disk drives.

Try ext3 or ext2

ext3 has journaling (as ext4, NTFS).
ext2 does not.

I don't believe journaling is needed for Flash Disk Drive. It will just reduce the lifespan of your device.

Could be nice GL-iNet adding a native format feature in their admin panel.

Don't use Ext2. It's a terrible filesystem from 1993 and has no extents, meaning that every block has to be individually addressed (rather than saying "this file needs 123883 blocks", it needs to say "this file needs block 1, block 2, block 3, block 4, ... block 123882, block 123883"). The metadata is huge and wasteful on that version.

Ext3 might be okay (it was released in 2001), but beware that it also has a journal (that was its major feature over Ext2). For those unaware, a journal means that writes are first placed in a temporary area, then the temporary journal is marked as "successfully written", and then it's re-organized and written to the actual filesystem afterwards. If the system crashes/loses power, the journal contents (if the journal is marked as having been fully written/successful) can be "replayed" again to repair the filesystem by doing the exact same changes again. It's good for data protection. However, it means all data is written twice (bad on an SSD).

Or use Ext4 formatted with journaling disabled (I agree that the journal is wasteful on an SSD due to write amplification, but again, be aware that having a journal helps avoid most Ext4 filesystem corruption in case of sudden power loss). Ext4 has many other benefits, such as supporting more files in each directory, and having larger inodes which means that small files can be stored inside the inode itself (thus using less storage on disk).

To disable the journal, your format command would start with mkfs.ext4 -O ^has_journal and then the path to the drive. If your router suddenly loses power, you might get some filesystem corruption if you don't have a journal, but the next startup should notice the "dirty" state and automatically runs the filesystem check/repair process, which will take care of most of it.

Other filesystems that are interesting (but not sure if the GL-iNet routers can do them) are:

  • Samsung's flash-optimized filesystem, may be a good choice since it's meant to be good for flash memory: F2FS - Wikipedia
  • XFS, which has been used by Red Hat Enterprise Linux since 2009, and has better performance than Ext4, and also does data deduplication (to avoid storing the same 4 KB blocks multiple times). The main drawback is that you cannot shrink partitions (only enlarge). And it has a forced journal (can't be disabled).
  • BTRFS: It's great. It writes new data to a new block, then redirects the metadata to the new block only after it has confirmed that the write was successful (and it has multiple metadata backups). This means that it is very hard to corrupt it even on sudden power loss, and it doesn't need or use a journal at all. And it hashes all data and metadata to always be aware of corruption. Unlike the others, it also supports transparent compression of all data, which can easily save 10-30% of the disk space. But until GL-iNet has a modern kernel, we shouldn't use it. It has had some severe bugs with the metadata tree format that were only solved very recently (Kernel 6.10ish or something). It has only recently become stable enough that some Linux distros started using it by default.

I only have an HDD and was able to achieve 122MB/s via lan. With SSD it should be much faster, but you would have to use 2.5G LAN port to achieve high speeds.

With an old MacBook Air, I get between 70-80MB/s via wifi on AC 5Ghz band.

1Gig lan port is the only bottle neck. Please post a link to reddit post/s that clearly state what you read.