Slow wifi speeds

Offloading HDDs and other functions to remote NAS or servers is increasingly popular
Post Reply
xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Slow wifi speeds

Post by xen » Sat Nov 12, 2016 8:54 pm

I have this LevelOne Wifi AP that can run in client mode that I thought was really cool, but it barely even works.

Well it does work I have just never seen Wifi speeds higher than 5MB/s. That's faster than 54Mbps but not by much.

The thing is supposed to do 300Mbit / second. I have a TP-Link WDR1043ND that also should be able to do 300 Mbit / second.

The two devices are some 4 meters apart with nothing much in terms of walls separating them.

I am running a backup task on a slow NAS. The NAS can easily send data over the SMB network link at 60MB/s.

From my PC copying a file to the device behind the AP is already capped at about 5MB/s. The device itself just has a 100Mbit link but can do up to 8MB/s over wire.

For these low speeds a megabyte can make a lot of difference.

While using gzip and encryption my NAS did about 1MB/s.

While only using encryption my NAS did about 1.5MB/s.

Now not using anything at all the write speed is about 2.5MB/s. It is spending basically all or most of its time in IO-wait implying that it is waiting for the network link to do something.

2.5MB/s is better than 1 or 1.5 but it is still not near the 5MB/s I get over the same link with my PC.

I really have no clue why it is lower than that .... well maybe the pipe is limited in throughput? (Unix piping) but I so doubt that is the case.

At this point it is only a simple pipe construct:

Code: Select all

tar bla bla | split bla bla > /mounted-folder/output-file
The only limiting factor can possibly be the network.

* The TP-Link is set to 40Mhz channel bandwidth and -n or mixed b/g/n doesn't make a difference
* There are no other devices communicating over the air that I know of.
* I can't currently test e.g. a laptop

Does anyone have any experience to indicate what could be wrong here?

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Sat Nov 12, 2016 9:14 pm

I have the thing (the backup disk) mounted over CIFS. I have no clue how fast the NAS is as a client. The backup disk is also a NAS but a different one. (Much simpler).

I plan to use something like a RaspBerry to be able to PULL the data instead of it being sent to it. This would be much safer as well.

Then I wouldn't need to use the Wifi AP either (but have to use a wifi stick of sorts). I thought.... actually I wanted to get a different device but messed up.

A second hand RaspBerry shouldn't be too expensive and I have that 2nd NAS as a USB enclosure as well (USB client device). Which was basically the intent of it.

Although at this point I still want that Buffalo LinkStation device I've seen....

Abula
Posts: 3662
Joined: Tue Nov 02, 2004 12:22 pm
Location: Guatemala

Re: Slow wifi speeds

Post by Abula » Sat Nov 12, 2016 9:47 pm

Crosscheck what type of connection is your router seeing the devices. For example atm i have multiple Ubiquiti Accespoints AC, but in some cases it prefers to connect to N limiting to around 20mg/s, the access point in my case have policies that you program, so my guess is you are connecting to a AB instead of N or AC.

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Sat Nov 12, 2016 10:23 pm

It does see it as an N connection. Actually the router can't see it but the Access Point can. And it is easy to verify by turning the thing to N only.

CA_Steve
Moderator
Posts: 7650
Joined: Thu Oct 06, 2005 4:36 am
Location: St. Louis, MO

Re: Slow wifi speeds

Post by CA_Steve » Sun Nov 13, 2016 10:16 am

Here's two useful phone apps:
Wifi Analyzer
Wifi SNR

The first can tell you how much spectrum congestion there is and possibly better channel selection. The second can tell you how good the AP connection is (SNR/link speed).

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Sun Nov 13, 2016 1:33 pm

Thanks. I don't have an android phone available...

Silly Microsoft stuff I have at present ;-) :(.

I will give it a shot if I can.

washu
Posts: 571
Joined: Thu Nov 19, 2009 10:20 am
Location: Ottawa

Re: Slow wifi speeds

Post by washu » Mon Nov 14, 2016 7:08 am

"300 Mbps" is only the the WiFi link speed. You will only see around 50% of that real world and only if conditions are good. If there is any interference speeds will drop. 40 MHz channels can only be used if there is no overlapping networks, it will automatically drop back to 20 MHz if it sees something else try to use the channel. As your router is 2.4 GHz only interference is highly likely.

Are you seeing IO-wait on the NAS or the client while writing? If it is on the NAS then it is not the network. What is your NAS and how is the storage setup?

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Mon Nov 14, 2016 8:14 am

To be clear the NAS is the client (Synology) and the other device is a cheap unit that I am trying to write to (2nd NAS you might say, I just call it network disk or something).

It is the NAS (client) that has IO wait in the top screen.

-------------------
High thank you. So assuming 1 out of 10 bits makes a megabyte, or rather, that 150 Mbps / 10 is what you'd get, you are still left with 15 MB/s under ideal conditions.

But if that 40MHz drops to 20 MHz I would assume then only 7-8MB/s remains which is the speed I got from my PC.

I... don't even know how that compares to 100Mbit.

I indeed see IO-wait in "top" on the Synology DS112j with kernel 2.6.32 while writing. I don't really understand this figure, does it means that CPU is not available to other processes? I must admit I don't understand this. The storage setup is really simple, it is a single disk with a single volume that is apparently being used as a device-mapped volume. However, I *am* writing from a snapshot. I did not test performance towards another target (such as usb) yet but I very much assume that since the device can ordinarily do read speeds of 60MB/s even over network, I am really going to assume there is no IO performance bottleneck on the part of the device. I mean the disk. What I haven't singled out is if there is any pipe bottlleneck.

A quick test using CIFS and DD shows that the write performance to be expected without anything else is 3.5MB/s.

The number I reported was 2.5MB/s. So....? If I add "split" as a pipe it becomes.... 3.4 MB/s this time around. Variance. DDing directly from the snapshot I get now 3.2MB/s (single run). Copying directly to /dev/null I get 98MB/s. That's the actual read speed of the device, although it could come from a buffer. Let's try again. No, it just averages around 100MB/s. DDing from the snapshot through a split to the remote volume gets... 3.2MB/s. So the pipe doesn't actually seem to add overhead.

Maybe there is a bad interaction between tar, the pipe, the pipe command, and the CIFS mount dropping it down to 2.5MB/s. Regardless the highest it can go up to is about 3.2MB/s or even 3.5MB/s potentially.

Meanwhile the target device seems to have a completely dysfunctional ftp server. But apparently only from Linux. Download speeds from a webbrowser average about 4.7MB/s. I just cannot get it to work on the NAS. With any FTP client. From a Linux computer from a NAS mounted share uploading via FTP to the other device I get a 5.2MB/s upload. So that file is being downloaded over the wire to my computer, then sent back over the wire to the router, then via wifi to the other device, at 5.2MB/s ;-). That's still more than the 3.5MB/s I get at the nas but maybe CIFS has more overhead than FTP.

washu
Posts: 571
Joined: Thu Nov 19, 2009 10:20 am
Location: Ottawa

Re: Slow wifi speeds

Post by washu » Mon Nov 14, 2016 8:46 am

Wired Ethernet does not have the same overhead issue that WiFi does. 100 Mbps Ethernet can do over 11 MBps real world.

3.5 MBps write speed is extremely low for a NAS like your DS112j. A lot of IO Wait is saying that the CPU is waiting on the storage subsystem to complete the writes. Either something like write caching is miss-configured, or there is something wrong with the drive.

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Mon Nov 14, 2016 9:58 am

Again I'm sorry for the confustion but the NAS does not do the writing, it does the reading.

It is writing to a mounted SMB share that it has mounted from the other device.

It is that other device that gives:

- about 8MB/s read/write over wire (100Mbit)
- about 5MB/s read/write over wifi
- this uses a terrible (I think) LevelOne access point as bridge (client device to the other router)
- about 3.5MB/s CIFS write from the Synology using the cleanest path (no disk read, only writing to the CIFS mount)
- this can be due to variance
- Mostly all other ways of writing give ~3.2 - 3.4 MB/s, this can also be variance
- The actual backup only gives 2.5MB/s in a snapshot->tar->split ---> write to SMB mount path.

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Fri Nov 18, 2016 1:25 pm

I seriously have faster internet (external) than I have wifi....i t is just ridiculous.

Possible it is just the LevelOne access point. It's not a very trustworthy thing I have found in the past.

It's this thing: http://global.level1.com/en/Wireless-AP ... p-3246.htm

I've tried to get support for it once, no response. I have not found an app on my Microsoft phone to try to measure wifi speeds within the network.

It would require downloading something over e.g. samba. I have tried that once.

It took almost 2 minutes to copy 90 MB to my phone. That's less than 1MB/s.

CA_Steve
Moderator
Posts: 7650
Joined: Thu Oct 06, 2005 4:36 am
Location: St. Louis, MO

Re: Slow wifi speeds

Post by CA_Steve » Fri Nov 18, 2016 1:37 pm

How old is it? Maybe it's just gone. I've found consumer routers/APs to have a pretty short half-life.

xen
Friend of SPCR
Posts: 243
Joined: Fri Dec 28, 2007 11:56 am
Location: NH, Netherlands

Re: Slow wifi speeds

Post by xen » Fri Nov 18, 2016 2:00 pm

It's a second hand. I have another router available but it is hard to test without additional devices.

Post Reply