(SOLVED) slow write speeds when using cheap 2.5gig unmanaged switch

selfcontrol

Cadet
Joined
Mar 3, 2024
Messages
3
Like the title says I have a cheap 45 dollar unmanaged 2.5gig switch. Read speeds off of the NAS are perfectly fine, about 285 MB/s. Write speeds however are insanely slow. Sometimes the file being written oscillates from 250 MB/s to ~3 MB/s and other times it just hangs at zero for several minutes and only jumps up to ~20 for a brief period before going back down to zero. The TrueNAS webUI is also inaccessible while I'm trying to write to the NAS (hangs and then times out). However when plugging the ethernet cables for my computer and the NAS straight into the router I can write perfectly fine at a steady 110 MB/s and access the webui just fine. The pool is about 50% full and I've tested writing with both very large and very small files with no noticeable difference in behavior.

NAS/PC specs:
8tb 5640RPM western digital blue hard drives in RAID Z1
16gigs DDR4
ryzen 3200g
no cache drive/SLOG
boot drive is a 500 gig samsung 860 evo SSD
The NAS is using a generic intel 1225-V and the computer has an asrock 620i motherboard (it looks like the NIC is a Dragon RTL8125BG ?)

From what I've researched this doesn't seem like a resource allocation issue on the side of the NAS. It seems like people say that this isn't an issue with a lack of cache drive. I'm not sure if it could be a lack of a SLOG drive since the writing behavior is so erratic. I feel like if it were a SLOG drive issue I would still be getting 1gigabit speeds as I do when not using the switch. It also doesn't seem like this is a problem with the hardware of the switch because I've seen and read reviews of this switch that have no problem with both reading and writing (unless its faulty but that still doesn't make sense to me).

Sorry if I'm breaching any protocol or didn't properly do my homework before posting. I'm still learning! Any help would really be appreciated.

EDIT: After trying a lot of things that didn't work I ended up ordering a more expensive trendnet switch. I don't see anything against the rules about naming specific gear but I apologize if its against the rules. The switch I had before was the YuanLey 6 Port 2.5G Umanaged Ethernet Switch and the switch that ended up working was the TRENDnet TEG-S350. The wifi card in my NAS is a generic intel I225-V that I sadly do not know the revision of but it was purchases in February of 2024 so its most likely revision 3
 
Last edited:

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
What Model Number are those wd blue drives? There's a cmr version, WD60EZAX and a smr version WD60EZAZ. If they're smr they don't work with zfs...

Edit: Forget my post, didn't have my glasses on and and misread your drive size, for the 8tb Model there's only a cmr version.
 

selfcontrol

Cadet
Joined
Mar 3, 2024
Messages
3
The model number for the drives is apparently WD80EAZZ. After some quick googling it seems like they support zfs? Also I forgot to mention that there are 5 of them in raid z1
 

selfcontrol

Cadet
Joined
Mar 3, 2024
Messages
3
A little more info. This is the behavior of the transmission speed for both a large and small file. It looks like the slowdowns are not correlated with amount of data transferred? During testing there were also several times where the 20 gigabyte file transferred essentially at full speed without any slowdown. I'm not entirely sure but it seems like there are more dips and slowdowns after repeated transfer attempts, I.E if I make one transfer attempt and it goes well, if I try again it will almost definitely go very poorly, but I could be identifying patterns that don't actually exist. It also seems like when transferring the large 20 gigabyte file the second half of the transfer suffers many more slowdowns and just worse performance overall.

Here is an example of the transmission pattern for a 2.5 gigabyte file
example 2.png

and here is an example of the transmission pattern for the 20 gigabyte file

example 1.png

I also ran iperf3 in both directions and these are the results

NAS -> computer

Code:

[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   282 MBytes  2.37 Gbits/sec    1    208 KBytes
[  5]   1.00-2.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   2.00-3.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   3.00-4.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   4.00-5.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   5.00-6.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   6.00-7.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   7.00-8.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   8.00-9.00   sec   283 MBytes  2.37 Gbits/sec    0    208 KBytes
[  5]   9.00-10.00  sec   281 MBytes  2.36 Gbits/sec    1    208 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.76 GBytes  2.37 Gbits/sec    2             sender
[  5]   0.00-10.00  sec  2.76 GBytes  2.37 Gbits/sec                  receiver

iperf Done.


computer -> NAS

Code:

[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec   141 MBytes  1.17 Gbits/sec
[  5]   1.01-2.06   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.06-3.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.01-4.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   4.01-5.02   sec  0.00 Bytes  0.00 bits/sec
[  5]   5.02-6.00   sec   245 MBytes  2.10 Gbits/sec
[  5]   6.00-7.01   sec  13.5 MBytes   112 Mbits/sec
[  5]   7.01-8.01   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.01-9.03   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.03-10.06  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.06  sec   399 MBytes   333 Mbits/sec                  sender
[  5]   0.00-10.06  sec   399 MBytes   333 Mbits/sec                  receiver

iperf Done.


I'm probably overlooking something simple but I can't for the life of me figure out how to show the number of retries for the computer -> NAS test. Regardless the test supports what I see just in the file transfer window, for some reason the file just stops transferring for multiple intervals and when it does transfer is at a reduced speed. I ran this test multiple times and it varied pretty wildly in success rate/speed

I also tried different ports on the switch for both the NAS and computer ethernet cable. I also tried without the switch connected to the router with no difference. When switching ports it sort of felt like some ports were worse than others but after retesting multiple times I couldn't establish a pattern.

I was also told by someone on reddit to run this command

netstat -s | grep segments
158891 segments updated rtt (of 159384 attempts)

it looks like it tells me total number of segments updated versus attempts? based on the stellar performance of NAS -> computer with basically zero retries maybe the ~1000 retries have only happened in the last day while trying to write from my computer? Which maybe indicates that whats bogging down the system is excessive retransmits? But I don't really know how many retrys a good system gets so this number might be normal.

Anyway if anyone has any ideas lol
 
Top