Page MenuHomePhabricator

Simulate slow connections on real devices
Closed, ResolvedPublic

Description

I've been testing out the new Kai OS application and I have a problem simulating a slow connection. None of the Android things work (setting a proxy or using gnirehtet to use the local desktop connection).

I think we in the performance team should have a device like https://github.com/phuedx/pinc or the Facebook version (they had a similar solution). I tried out pinc years ago but didn't get it to fully work. But I think now with @dpifke in our team this could be something we could provide and do together as a team effort? I think we could build on @phuedx idea and best case provide a Raspberry solution to the rest of the foundation.

Event Timeline

I'm glad to see that Performance are looking at this problem (but also not?). Happy to chat about that personal project.

@dpifke maybe we can work on this together? If we could get this to work it would help me a lot. At the moment when I run my tests on my local machines, I use pfctl on my mac and then use https://github.com/Genymobile/gnirehtet to let the phone use the same setup. If I could stop throttling my machine that would help me a lot and would make it easier to run tests over a period of time and then compare the result with Kobiton or other providers.

Change 596327 had a related patch set uploaded (by Dave Pifke; owner: Dave Pifke):
[performance/network-emulator@master] (WIP) Script to set up network emulation

https://gerrit.wikimedia.org/r/596327

@dpifke let me know when you have time to add documentation, I can help out when you done the first batch and try it out and fine tune the docs. I'll try to
resurrect my Raspberry PI3 and see if I can use it.

This week I should have some documentation and an updated (hopefully somewhat final) version of this. I did some more testing last week and found a couple of issues with how I'm setting up the traffic shaping classes, but got interrupted before I could debug and check in a fix.

@dpifke do you know when you will have the time to finish the last things? I will be back in the middle of August and wanna try to setup a "Kobiton like" environment at home to have as a kind of staging environment to try things out (and verify that Kobiton works as it should) and having a good way to simulate slow connections would be perfect for that!

Regrettably, I haven't had time to look at that personal project since I last commented. However, I'm sure that I can dig out the documentation that I referred to when building it if it would be of any help.

I'm excited to see that there's still a need for this kind of environment and that you're both looking at it. I've no doubt your solution will be superior.

@Peter I'll aim to have this fully tested on my end by the time you're back, and then we can work together on documentation and any issues you uncover.

I'll add some new background: At the moment I'm not able to replicate our setup at Kobiton. I throttle the connection using gnirehtet to let the phone use the connection of my desktop. When testing out Firefox on Kobiton I've got problems where the first test works and the following tests do not work. I tested on multiple phones there and get the same result. But I can't reproduce on my own machine use gnirehtet, I get other problems/errors and I think the key issue here is that on my local all traffic + driving the device go though USB but at Kobiton we drive the device through USB and traffic through wifi.

My big project for this weekend is to finishing unpacking and re-setting up my electronics lab (after my move in October). As part of this, I'll dig out what I need to resume debugging this next week.

Hearty congratulations on shipping, @Peter! ❤️ ❤️ ❤️

Change 596327 abandoned by Phedenskog:

[performance/network-emulator@master] [WIP] Script to set up network emulation

Reason:

We will not use this script

https://gerrit.wikimedia.org/r/596327