Jump to content

Slow Samba share speeds

Calamity1911

Hello everyone.

On Black Friday this year, I decided to treat myself to a 4TB external drive for use as a NAS. I have an old laptop (6th gen core i3 mobile, 12GB RAM) with a bad battery that I converted into a "home server," basically just installed Lubuntu on it. I also had to get a USB3 to Gigabit Ethernet adapter since the onboard LAN port was only 100Mbit, and speeds were initially 12MB/s because of it. 

I should also add that the external drive I purchased was capable of around 200MB/s when connected directly to a Windows 11 laptop. Over my houses 1Gbit networking, I am only getting ~40MB/s peak read and writes. That still is faster than my actual plan from my ISP, but it still is a good chunk slower than gigabit speeds.

I also have it configured using Samba, as the desktops in the house use Windows. From the little bit of research I did, I found out that Samba can be pretty limited in terms of speed, but I was wondering if there is anything I could do to help with that bottleneck. I know there are other protocols for NASes, but I don't know which ones can be hosted on Linux and be used by a Windows client. Ideally I would be able to use Windows' "map a network drive" feature so I can have the NAS show as a Z:\ drive or something.

Thanks for any input.

Link to comment
Share on other sites

Link to post
Share on other sites

Is this over a usb 2 connection? 40mbit seems like usb 2.

 

Id try using iperf to test network speeds.

 

Yea samba isn't that fast, but I can basically always get full gigabit with no configuration on modern systems.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Electronics Wizardy said:

Is this over a usb 2 connection? 40mbit seems like usb 2.

 

Id try using iperf to test network speeds.

 

Yea samba isn't that fast, but I can basically always get full gigabit with no configuration on modern systems.

It's 40 megabytes, not bits. Sorry for any miscommunication. I made sure to connect both the gigabit ethernet adapter and the external drive to separate USB3 ports.

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Calamity1911 said:

It's 40 megabytes, not bits. Sorry for any miscommunication. I made sure to connect both the gigabit ethernet adapter and the external drive to separate USB3 ports.

USB 2 speeds is about that limit, so id make sure its actually running at usb 3 link. lsusb -vvv should tell you this

 

 

ALso give iperf a shot.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Electronics Wizardy said:

USB 2 speeds is about that limit, so id make sure its actually running at usb 3 link. lsusb -vvv should tell you this

 

 

ALso give iperf a shot.

I verified that the hard drive is indeed connected over USB3 by using lsusb -vvv and verified the gigabit connection to the local network.

Link to comment
Share on other sites

Link to post
Share on other sites

But did you check the Ethernet adapter is connected to USB3?

If it's in a USB2 port it'll still say gigabit since that's the speed the ethernet link runs at, just that since there's the USB2 bottleneck you won't get more than about 40MB/s through. 

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Kilrah said:

But did you check the Ethernet adapter is connected to USB3?

If it's in a USB2 port it'll still say gigabit since that's the speed the ethernet link runs at, just that since there's the USB2 bottleneck you won't get more than about 40MB/s through. 

When I ran lsusb -vvv both the external drive and the gigabit adapter reported being connected over USB3. If I remember correctly, they actually reported USB3.10 but still, basically the same.

Link to comment
Share on other sites

Link to post
Share on other sites

I had an issue similar to this with my G14 and TPlink USB3.1 gigabit adapter, but only on one specific usb port.   

 

I don't remember exactly what I did, but I believe there was a setting in the adapter properties limiting the speed.  I made some changes there and it began working fine.. It was a weird one.

 

Ive since freshly installed windows 11 and didn't have to deal with it again, so....

Link to comment
Share on other sites

Link to post
Share on other sites

I'm gonna have to eat my words here a bit. It turns out that on Linux, the adapter was only using a USB 2.0 link. My testing methodology for the Ethernet adapter was flawed.

Either way, I tried the same dongle on a windows laptop, and it legitimately got gigabit speeds. I ensured that by setting up a windows folder share on the network and it got ~100MB/s. 

So I then looked into possibly updating the drivers for it on Linux, and I did find some Linux drivers but there were some compilation errors for the drivers.

I gave up on Linux all together and then tried windows on the server. Still 40MB/s limit. No idea why at this point. I tried the Ethernet adapter in both of the laptop's USB3 ports to no avail. I have one more thing I can try tomorrow after my college classes.

Link to comment
Share on other sites

Link to post
Share on other sites

Alright new issue. I got a new ethernet adapter and it definitely reports using USB3 instead of USB2. However, I determined that using lsusb -vvv on a ubuntu install. I switched over to TrueNAS Core to give it a shot, and now it seems like it's back to USB2 speeds. Give me a break.

 

**EDIT**

Now it seems to do 40MB/s writes but it can actually do 80MB/s reads to/from the NAS now? Sure, man. Good enough for me.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×