Wireless AP setup for mobile traffic shaping
|
07-02-2014, 12:54 AM
(This post was last modified: 07-02-2014 12:55 AM by sjernigan.)
Post: #1
|
|||
|
|||
Wireless AP setup for mobile traffic shaping
I was able to talk with Pat a bit at Velocity about Private Instances and mobile devices. I figure others would be interested in some of that discussion.
You should be aware that the public mobile instances (at least Dulles) are not actually using cellular connections. Its not surprising given the additional costs and the debate as to the benefits of consistency versus the drawback of artificiality aren't relevant for a free service. Rather, Pat has configured a wireless AP with traffic shaping to mimic a wireless connection and uses that for multiple devices. Pat said he would document the setup of the AP (perhaps here or elsewhere in the doc). Until then, is anyone else using this approach. Do you care to share what's worked for you in terms of setups and throttling settings? Were you able to benchmark against a real cellular connection? Was there anything that you weren't able to mimic to your satisfaction? Thanks for your thoughts. |
|||
07-02-2014, 01:14 AM
Post: #2
|
|||
|
|||
RE: Wireless AP setup for mobile traffic shaping
I'm writing up the documentation right now. So far I just have the diagram but I should have it mostly complete, including with the traffic shaping by the end of the day: https://sites.google.com/a/webpagetest.o...le-testing
FWIW, we did a LOT of testing at Google with actual networks and dummynet. With dummynet we could simulate a given set of conditions just about exactly (with more consistency) but it's worth noting that it's exactly that - one set of conditions. In the case of the default 3G profile I have set up right now, it's basically modeled around the 60-70th percentile of measured connections globally so it doesn't match an exact market - some will be faster and some will be slower. The main things that you can't duplicate with traffic shaping are: Radio start-up delay - given a few seconds of idle, most phones will shift the radio into low power modes and it can take anywhere from a few dozen ms to several seconds before the radio comes back and is able to transmit data. It's more important for multi-page navigations where the radio can turn off between each step but it could also add completely dead time to the beginning of a page load (but that case is completely out of the control of the site owner). In really extreme cases it's possible for the radio to turn off while waiting for a server response - but if your TTFB is that long you have serious issues to look into anyway. Network architecture - on traffic-shaped WiFi you will still be going out through your normal ISP's network (Verizon Fios in the case of Dulles). You won't go through any carrier proxies, deal with them routing the traffic back to a central egress point or coming from a Carrier's mobile IP block in case there is any server logic tied to it. The agents themselves work perfectly fine on actual networks and the test results come back over the wired connection from the tethered host that is driving the agents so the data use is just for the actual browsing and isn't really why I chose to use WiFi. The main issue is the insane variability using an actual carrier network. The performance varies quite significantly from day to day and even within a day which makes it REALLY hard to compare results to each other. |
|||
07-02-2014, 04:24 AM
Post: #3
|
|||
|
|||
RE: Wireless AP setup for mobile traffic shaping
ok, documentation has been updated: https://sites.google.com/a/webpagetest.o...le-testing
Let me know if there are any areas where more detail would help. |
|||
07-18-2014, 05:52 AM
Post: #4
|
|||
|
|||
RE: Wireless AP setup for mobile traffic shaping
I recently configured a 3G mobile network emulator using a fixed traffic shaping profile, as described by Pat in the documentation of dummynet. Along with his 3G specs of 1.6Mbps down, 768Kbps up, and 300ms RTT, I also added a packet loss factor of 0.2%. I chose to use this loss factor based off of the paper Characterizing 4G and 3G Networks written by Yung-Chih Chen, et al.
A wireless router with the capability to be flashed with OpenWrt's 14.07 “Barrier Breaker” firmware is the only hardware needed for my setup. Although this is a relatively cheap approach, one misses out on higher level softwares which lead to a much cleaner and elegant script. The softwares required to run my script, along with some well documented terminology about the OpenWrt approach to network emulation, can be found here. The script: Code: #!/bin/sh /etc/rc.common One main issue I have with my configuration is the technique used to set up the network emulator. TC is very clean when it comes to setting a bandwidth limit across an entire network (which is shared by all devices), but can become very tricky to work with when limiting bandwidth on a per device basis. The solution I came to was using tc to create separate rules for every subnet in the network. When a device connects to the network, the ip that gets assigned to the device will already have rules bound to it. Other issues I had were very similar to the issues Pat ran into, involving emulating the randomness that comes with browsing through a cellular service. The netem software attempts to provide a solution to this problem by offering a random or normal distribution of latency in a predetermined range, but I chose to have consistency in my network instead of randomness for testing purposes. The benefit that comes with configuring my network emulator on a by ip basis, is that each device that connects to my network can be given custom rules. This means that if I were not using DHCP, I have the ability to run 4G, 3G, or some variant between the two on any device in the network, without affecting the configuration of other devices currently operating within the network. Please let me know if you have any questions about this approach, or you see areas that could use improvement. |
|||
07-20-2014, 12:03 PM
Post: #5
|
|||
|
|||
RE: Wireless AP setup for mobile traffic shaping
I've just been using WiFi connection but have found even that to be all over the place (20k+ speedindexes are fairly common). These results are stable on the old iOS BZAgent, but the NodeJS agent isn't quite as stable. It might make sense to show how to use the usb connection for network access where these results are so weird.
|
|||
07-22-2014, 07:17 AM
Post: #6
|
|||
|
|||
RE: Wireless AP setup for mobile traffic shaping
Android or iOS? You can reverse-tether the Android devices over USB which will provide more stability if you don't have a clean WiFi environment. I tried doing it once but gave up rather quickly though we do run some devices in a Lab that are configured that way. Other than the network dropping out and having to be reset every now and then it works very well.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)