Strange wifi performance (copying files to/from Windows 7 via SMB share)

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I've seen some odd data transfer rates when copying large files between a  
Windows 7 PC and a Pi, over an SMB share. Instead of a fairly constant  
speed, sometimes/usually I got a rate which varied between about 0.5 and 80  
Mbps as a sawtooth with a periodicity of about 20 seconds. For an Ethernet  
connection instead of wifi, the transfer rate was always constant.

https://i.postimg.cc/Pr51VFhY/5-GHz-constant.pngshows a fairly constant  
transfer; also shows the end of a previous transfer which was mostly a  
sawtooth, but which spontaneously started running at constant speed towards  
end of the transfer

https://i.postimg.cc/26j4pHvs/5-GHz-sawtooth.pngshows a transfer which was  
always a sawtooth

Any suggestions as to why it is happening? Is it a wifi "funny" (eg some  
sort of interference from a non-wifi source) or is the wifi adapter in the  
Pi intermittently behaving oddly? I realise that the Ethernet and wifi  
adapters in the Pi effectively go via the USB controller.



Background
----------------

I have a Window 7 PC and a Raspberry Pi 3B+.

The Win 7 was always connected to a TP Link 9980 router by Ethernet, at 1  
Gbps speed (as shown by Task Manager | Networking). The router was not  
connected to ADSL/VDSL during the test - the phone cable was unplugged.

The Pi was connected either by Ethernet or Wifi, and the Wifi was either 2.4  
GHz or 5 GHz.

There were no other wireless networks visible on Wifianalyzer app on an  
Android PC. I wasn't using a microwave oven (those sometimes put out a bit  
of 2.4 GHz shash).

A USB disk on the Pi was mounted as /home/pi/Videos and shared by Samba, and  
was accessible as a drive in Windows (net use r: \win7\pi-share).


I measured file transfer read/write rates (a 1.3 GB file, with the transfer  
done as a copy/paste in Windows Explorer) between the Win 7 and the Pi using  
the various networking connections between the Pi and the router, always  
copying to/from the same SATA disc on the Windows PC.

The Pi and the router were about a foot apart, so signal strength was  
strong. And there were no other wifi networks.

Note that only *one* leg of the connection was wifi: the Windows 7 PC was  
always connected by Ethernet, to avoid wireless clashes between the two legs  
of the connection.



Results (for those who want the details!)
---------

Times (m:ss) for 1.32 GB file were:

Pi connected by Ethernet:

- 1:19 Win7 copies to Pi share (16.7 MB/sec, transfer rate about 160 Mbps,  
fairly constant))
- 1:17 Win7 copies from Pi share (17.1 MB/sec, transfer rate about 160  
Mbps - fairly constant)


Pi connected by 2.4 GHz wifi


- Win 7 copies to Pi: 5:55 (sawtooth between 0.4 and 80 Mbps)

- Win 7 copies from Pi: 7:28 and 7:57 (two runs), transfer rate varies as  
sawtooth (about 20 second period) between 0.4 and 80 Mbps


Pi connected by 5 GHz wifi

- Win7 to Pi: 2:30 and 3:29 (first run was flat-out at about 90 Mbps, second  
run was sawtooth between 5 and 90 Mbps)

- Win7 from Pi: 2:30 and 4:27 (flat out at about 90 Mbps / sawtooth between  
0.4 and 90 Mbps)



So the Pi is capable, at best, of copying at about 90 Mbps, at a fairly  
constant rate, over 5 GHz wifi. But usually the transfer runs much lower,  
with just occasional peaks to about 90 Mbps. Over 2.4 GHz, I did not see any  
flat-out transfers and the speed varied between 0.4 Mbps and 80 Mbps, for 5  
GHz some transfers were flat out and others varied between about 5 and 90  
Mbps.



Conclusion
--------------

Not surprisingly, best and most consistent rates are achieved with an  
Ethernet connection. 5 GHz gives higher speeds and sometimes flat-out  
(predictable) transfer; 2.4 GHz is a lot slower because it always spends a  
proportion of the time running at well below the peak speed.




The reason I was testing it was to work out whether I could manage with wifi  
rather than Ethernet cable or Ethernet-over-mains (powerline) from the Pi  
(in one room) to the router and Win 7 PC on the other side of the wall in  
the neighbouring room. The Pi needs to be in one room because it is used for  
recording TV and that's where the aerial and satellite cables are; the other  
room is my study.  Wifi is unreliable and could take ages to copy recordings  
to my Win 7 "server", so it will have to be powerline - or else a hole  
drilled at skirting board level in the living room wall which will not get  
SWMBO approval ;-)  


Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
On 19/05/2019 16:19, NY wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it

The reported speed on both my Pi and my laptop varies between 1Mbps and  
65Mbps. For no change in location of either.

Both use broadcomm chipsets.

disabling wifi and reenabling it on the laptop generally gets me back to  
65Mbps.

I am remote from other dwellings in an RF quite place and screened from  
other RF by the metal in the house (GPS doesnt work inside the house,  
mobile phone is variable).

My general conclusion is that wifi with broacomm chipsets under linux  
sucks big time.

It might be instructive to try a USB wifi dongle.


--  
Climate Change: Socialism wearing a lab coat.

Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
On Sun, 19 May 2019 16:19:27 +0100, NY wrote:

Quoted text here. Click to load it

Personally powerline is evil, generates broad band radio frequency
interference. Tell her that the Pi has limited storeage and that if
she wants to watch recordings of <insert her favourite soap/series>
the hole is required.  

Or wait until she goes out for half a day and just do it. Only needs
to be a 6 mm hole to get the cable through, check carefully for any
other services hidden in the wall mind. If you have the abilty to fit
RJ45 plugs do that to the free end. Slightly more acceptable might be
a modular networking face plate on a surface box (or plasteboard
flush box if the wall is platerboard) to just plug a patch lead into.
Locate the hole box and cable route so it's out of sight and don't
use a bright red cable...  B-)

--  
Cheers
Dave.




Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
On 20/05/2019 10:55, Dave Liquorice wrote:
Quoted text here. Click to load it
Powerline works for one point to point. It sucks big time at adding more  
connections


Quoted text here. Click to load it


--  
Climate Change: Socialism wearing a lab coat.

Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
Quoted text here. Click to load it

Is it worse than wifi in that respect? I've had fairly good multi-user
performance on powerline, whereas wifi, even with devices right next to the
router, is atrocious on my laptop, my pi and my desktop, especially if more
than one is talking.

Am I right that two devices talking to each other via wifi and the router
(both devices wif rather than Ethernet) will be significantly slower than
one device by wifi and one by Ethernet, because both devices are competing
for bandwidth?

What about wifi extenders (either dedicated or an old router in bridge
mode). Even if there is only one device talking to the router (eg to the
internet), is the performance worse (half?) if the wifi is connected to the
extension rebroadcasted wifi than if it's connected directly to the router's
own wifi?

For an extension network, is the best advice to give the extension a  
*different* SSID to the router's wifi (eg "ROUTER_EXT") and to give it a  
*different*, non-overlapping channel? I've seen advice to put both networks  
on the *same* channel which I'd have thought would cause interference  
between the two.  


Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
On 22/05/2019 10:33, NY wrote:
Quoted text here. Click to load it
When I tried two devices talking to my server simulatmneously speed  
dropped by a factor of about 10. This =was on TP link kit. I assumed  
their collision detection was shit.


Quoted text here. Click to load it

Yup.

Dunno, Mi wifi extender is a router wired to ethernet...

Quoted text here. Click to load it

Again. I dunno. I put mine on a different channel and different SSID



--  
I would rather have questions that cannot be answered...
...than to have answers that cannot be questioned

We've slightly trimmed the long signature. Click to see the full one.
Re: Strange wifi performance (copying files to/from Windows 7 via SMB share)
following:


Quoted text here. Click to load it

    "devices right next to the router" could be part of the problem. The
received RF power levels could be causing front-end overload and
distortion.  

Quoted text here. Click to load it
    I'd presume the two (or more) are using different WiFi channels (there
are only about 3 channels in the 2.4GHz WiFi band that can be used without
overlapping bandwidth). That presumes your "extender" is hard-wired, and
not a WiFi repeater.


Quoted text here. Click to load it

    Same channel probably expects clients to communicate with which ever
node is the strongest -- without having to change channels. Note that using
different SSID does mean the client has to disconnect from one SSID and
negotiate a connection with the other (and if you are somewhere equidistant
from both, might run the risk of sporadic signal loss/connect cycles).


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com  

Site Timeline