Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test websockets support on a variety of browsers/network speeds #179

Open
aaronmbr opened this issue Apr 14, 2015 · 14 comments
Open

test websockets support on a variety of browsers/network speeds #179

aaronmbr opened this issue Apr 14, 2015 · 14 comments
Milestone

Comments

@aaronmbr
Copy link
Contributor

We need to test the websockets client on a variety of older browsers to make sure it works, and flag any poor performance to report to the end user.

@aaronmbr aaronmbr added this to the 3.7.0 milestone Apr 14, 2015
@aaronmbr aaronmbr changed the title test websockets support on a variety of browsers test websockets support on a variety of browsers/network speeds Apr 14, 2015
@aaronmbr
Copy link
Contributor Author

We'll also need to test on a variety of network speeds. At minimum, 100M networks and 1G networks, and compare the results with the Java client results

@bchase78
Copy link
Contributor

The current beta client only uses 1 thread. This can dramatically have an impact on performance when user interaction is taking place during testing. I would suggest to run the c2s and s2c tests in webworkers to improve performance. This has the drawback that websockets are not currently supported in webworkers by firefox.
This is the approach I used in my wsNDT test client. https://github.com/bchase78/wsndt

@aaronmbr
Copy link
Contributor Author

I'm curious what the definition of "user interaction taking place" is. Is it just if they happen to click on something, if they're interacting with the web ui at all, or if the web ui is being updated but they're not actually doing anything?

@bchase78
Copy link
Contributor

By user interaction I mean mostly HTML events, such as, mouseover, scrolling, browser window resizing, or basically any other event that gets pushed on the browser stack to be processed. You can notice this behaviour in the beta client during the server to client test phase. The "download meter" is trying to do some drawing, and at the same time, the client is trying to upload data. They are both competing with each other for the same thread.
This is the exact reason why I placed the client test in a web worker. That way it had its own dedicated thread that would not be interrupted by other events, and eventually cause the browser to "block".

@aaronmbr
Copy link
Contributor Author

Does it substantially impact the test performance, or just UI?

@bchase78
Copy link
Contributor

On my desktop I get around 500 MB/s download with wsndt and only about 120 MB/s with the beta client.

@aaronmbr
Copy link
Contributor Author

The commit I just pushed to master some code in it to that loads the ndt-browser-client stuff in a webworker. It's worked for me on a Mac using FF, Chrome and Safari (with code in FF to disable webworker support). Would you be able to try it out on your desktop host and see if it improves the performance?

@aaronmbr
Copy link
Contributor Author

I've got RPMs of the new code at http://ndb1.internet2.edu/~aaron/ndt-3.7.0-5.1.el6.x86_64/

@bchase78
Copy link
Contributor

I've just tested it again. Your Webworker version improved the performance. Although it still reports values slightly lower than my version, it seems to be more on par while using webworkers. The tests I made are in no way representative, but the webworker version is clearly the way to go forward.
By the way, when did you write that? That is great work in such a short time span.

@aaronmbr
Copy link
Contributor Author

Excellent. I've done an -rc4 so hopefully we'll get some wider testing. The bulk of the work is in ndt-browser-client.js which was pulled from https://github.com/m-lab/ndt-javascript-client , and I spent some time this week writing a wrapper to match the existing javascript API for the flash/java clients. Since the ndt-browser-client.js is based on callbacks, it ended up being pretty straightforward to wrap the entire thing in a webworker.

@skostuch
Copy link
Contributor

I've tested WebSocket's newest implementation on different configurations (as with Flash/Java previously) and here are results:
https://www.dropbox.com/s/ooe890nl8j82jxt/ndt-test-results.ods?dl=0
Unfortunately I don't have possibility to test on 1gb network on Windows system at this moment. Results show that for higher speeds download is still rather low when using WebSocket comparing to Java.

@bchase78
Copy link
Contributor

My test on a Windows 2012 Server with Chrome 42.0.2311.90:

wsNDT: Upload 421.01 MB/s Download 935.31 MB/s
ndt-jsclient: Upload 417.64 MB/s Download 638.18 MB/s
Java: Upload 425.21 MB/s Download 938.01 MB/s

I tested this several times with similar results. I can second that It appears as if the ndt-websocket client has performance Problems while downloading.

@bchase78
Copy link
Contributor

I've just proposed a patch:
https://github.com/bchase78/ndt/commit/1dc14ca8b7780b6dce71488f5d87fea6d6dde04d
The patch works great here. I just removed the unneeded processing of the incoming messages during the tests. It was slowing down the performance.

@skostuch
Copy link
Contributor

After this patch download speed has changed a lot. Now I was able to achieve ~900mb/s while previously it was only ~250 on Firefox and almost 600 on Chrome. Below link to detailed results (it's the same file as previously but with updated speeds for 1gb network):
https://www.dropbox.com/s/ooe890nl8j82jxt/ndt-test-results.ods?dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants