-
Notifications
You must be signed in to change notification settings - Fork 762
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
Reconsider numpy usage and recommendation #77
Comments
The "slower or disabled" part is because there are 4 different python modules that are optional and checked using the same code at the top of websocket.py. For example, if the ssl module is not found, then TLS/wss is disabled. I just pushed a change that will make this clearer. Numpy is definitely faster. Using the tests/latency.py + tests/latency.html test I get the following results (with 10ms send delay and just running on localhost): Packet size 2000 bytes:
Packet size 20000 bytes:
Packet size 100000 bytes:
In addition, with 100kb packet sizes, no only is the latency more 6 times higher without numpy, but the server starts to get behind and the client has to back off repeatedly during the test. Note that numpy really only affects client->server data unmasking, so for uses like noVNC it will be basically irrelevant. However, websockify is not just for noVNC, so in the case where the client is sending a lot of data to server, numpy provides significant performance improvement. |
Thanks! |
In the context of noVNC, numpy adds little performance according to websockify maintainer: novnc/websockify#77 Change-Id: If35f10db90605ce3faa3555ac5689b631c9b51bf
In the context of noVNC, numpy adds little performance according to websockify maintainer: novnc/websockify#77 Change-Id: If35f10db90605ce3faa3555ac5689b631c9b51bf
In the context of noVNC, numpy adds little performance according to websockify maintainer: novnc/websockify#77 Change-Id: If35f10db90605ce3faa3555ac5689b631c9b51bf
From openstack/puppet-nova: In the context of noVNC, numpy adds little performance according to websockify maintainer: novnc/websockify#77 By removing python-numpy we remove the Fortran dependency.
From openstack/puppet-nova: In the context of noVNC, numpy adds little performance according to websockify maintainer: novnc/websockify#77 By removing python-numpy we remove the Fortran dependency.
Currently, websockify/websocket.py will give a warning if "numpy" is not available:
WARNING: no 'numpy' module, HyBi protocol is slower or disabled
This is somewhat confusing. First of all, HyBi is definitely not "disabled". And is it really slower? I've done some tests with noVNC, and even when playing Youtube videos with a high frame rate, the process using websocket.py doesn't consume much CPU at all; it rarely shows up in the "top" listing at all. So I'm wondering, has any real measurements been done on this? I've done some Googling and failed to find anything (except problems with numpy...). IMHO, unless we can measure that numpy makes a substantial difference, I think it would be better and more clean to only require standard Python functionality.
The text was updated successfully, but these errors were encountered: