I have moved my r7000 to only act as NAS host (no WAN, no wireless). I reset r44700 to factory defaults and only configured the basics. So far I cannot reproduce the issue, but it's still early.
I compared the nvram show output of the fully configured router with the factory defaults. Interestingly, this line is in the default config:
vs. this line from when I originally setup the router in September 2020 (r44467)
Not sure what this means or if this is an issue, but I would have expected an increase in versions instead of a decrease.
I didn't see any other immediately obviously strange differences.
Transfer speed to NAS has approx. doubled (~4MB/s to ~8MB/s). Not sure why.
Ran a series of tests on my Netgear r7000 router running r44700 (reset to factory, as described above) with SMB v3 and encryption enabled using the test script supplied by @sierratango. My PC (current CPU, Windows 10 with Ubuntu subsystem) is connected on the LAN side with gigabit ethernet. There is no other client connected to the router.
I had fewer transfer failures than before, but they are occurring (about 1 per 20GB written). The script exits with this error when there is a failure: "cp: error writing '/mnt/z/Test/testfile': Input/output error". This exit seems to occur due to the enabled integrity checks in SMB v3.
Also noticed that NAS transfer speed increases further with Shortcut Forwarding Engine (SFE) enabled, to ~11MB/s with router CPU% going to 70%. This is unexpected as I have no QoS, filters, etc. as my PC is connected on the LAN side. Failures occurred with and without SFE enabled.
EDIT: Updated to r45420 (latest) and reset to factory. Noticed the Samba version was updated to v3.3.1. Running tests now ...
Ran into a strange issue with Windows 10 transfer speed to NAS being very slow (~20 Mbit/s). This was after the installation of Windows Subsystem for Linux (WSL2). So same machine running a Ubuntu subsystem virtually on Windows 10 base. The strange thing is, WSL2 transfer speed is normal (~65 Mbit/s).
Also, saw frequent transfer integrity issues when transferring from Windows, but none from WSL2. So no conclusive results wrt transfer corruptions yet.
Tried reverting back to r44700, but no difference in results.
I think I figured out the Windows slowness issue: Changing the 802.1x and/or Routing items under Administration -> Management to disabled seems to cause a change that is not reversible in the GUI. Windows transfer speeds dropped from averaging about 65Mbps to averaging 20 Mbps (on r45420). Changing it back to enabled, rebooting, even power-cycling had no effect. I was only able to restore higher speed by resetting to factory defaults.
This leads me to believe that the transfer integrity issue may not be related to Samba. Further testing ongoing...
Never mind the crap I wrote above. Captured a transfer with Wireshark and found lots of dup acks and retransmissions. Then I found this post https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=945793 and change port speed from auto (gigabit/full) to 100/Full on my PC. Fixed the issues, steady 96 Mbps SMB transfer rates (r7000 running dd-wrt r44715).
I'm using Cat6 patch cable and have tried different ones. Maybe an issue lurking in the network stack?
Will continue testing SMB transfers to make sure the issue is resolved.
Taking this further, there seems to be an issue with the auto-negotiation. After rebooting the router it now negotiates 100/Half when I fix the client to 100/Full. Not sure why I got 100/Full before, maybe just chance. Trying to set port speed in the GUI doesn't work, it reverts to auto-neg.
Is there a way to set port speed using the command line?
Update: Upgraded to r45454.
I get reliable Samba transfers when I set my PC ethernet adapter speed/duplex to 100/Half. at 100/Full or 1000/Full, transferred files are sometimes corrupted. I haven't found a way to fix the port settings for the router yet, maybe this is not possible.
I tried different network cables, and ports on the gateway, and another client machine. Short of some kind of router hardware defect, which is unlikely as others are reporting issues, this issue seems to be located in the dd-wrt network stack. Maybe it occurs only when services on the router are accessed, like Samba, idk. Any ideas for further tests?
Installed r41986 on my r7000 router and wow, what a difference. I get consistent Samba throughput of 240 Mbps with CPU 15% idle when connected via gigabit ethernet.
On r44467 and higher (up to r45454) I got around 25 Mbps, and 52 Mbps when dropping my adapter speed from auto to 100/full. (Got 95 Mbps once during my testing, but that didn't survive a reboot).
So looks great. I will run transfers with file integrity checks overnight. Only caveat is that SMB v3 is not yet supported.