Comments (21)
Frame (un)escape, which outReceived() and writeFrame() did, are rewritten in C extension.
Related commits: 41ae170, d06dc94. VMprof report.
Although I still don't kown why those ate so many CPU cycles, it seem be much better now. 😅
I'm not familiar with C actually.
One segfault occurred during VMprof tests, but I'm fail to reproduce this problem again.
More tests and/or code review may required.
from sstp-server.
Impressive :)
Unfortunately i was able to test it only with pypy jit, but anyway performance much much better
on my test system (AMD A4-4000) before that commits i was able to do 1.5mB/s with cpu usage around 60%, now i am able to get 1.9 mB/s with cpu usage lower than 40%.
when i get to my office i will test with sandy bridge xeon to see performance with python interpreter
from sstp-server.
i spoke too fast...
There are memory leak some where
for 10 minutes sstpd eats around 2gb ram :) may be that's why you experience segfaults
from sstp-server.
(One of?) memory leak fixed in a1faea6.
Thanks :)
from sstp-server.
Fixed another one in 94eb5b6.
from sstp-server.
I think there are no more memory leaks :)
lets focus on performance i have friends that want to use it in real production
if performance increase two/three folds ;)
from sstp-server.
Performance on ivy Bridge xeon under kvm with realistic latency about 50ms
Python2: 1.3 mB/s with cpu usage about 30-35% with peaks around 45%
Pypy-Jit 1.0 mB/s with cpu usage about 15-19% with peaks around 22%
Client is windows 7 under vmware
i cant understand why pypy-jit unable to do 1.3mB/s such as python2 interpreter?
anyway if you have something more to test i am eager to do it :)
from sstp-server.
Hi,
I would be very interested to have SSTP working and I also think that this performance is rather poor ^^. Couldn't we write more code in C/C++?
from sstp-server.
What I was thinking someone have to write kernel module ppp over ssl (looking at you sorz :) )
which will handle data connection and python daemon which handles just control connection.
Then we will have an optimal performance.
May be i am too optimistic.
Just porting the whole thing to C with epoll will be sufficient for now
from sstp-server.
I was going through the code and it didn't seem to me as if it is much so it shouldn't be a problem to replace most of the code through C/C++ code? If there is some good architecture description it should be easy to rewrite this in C.
I think a kernel module is not neccessary because this does not make it much faster.
from sstp-server.
It sounds great but I have little experience in C. Sorry.
Microsoft's PDF has sufficient details about this protocol and how to implement it.
from sstp-server.
@davidweisgerber i think you should look how openl2tp was made
http://www.openl2tp.org/downloads
pppd plugin
openl2tp daemon
from sstp-server.
What could be interesting is developing a module for a HTTP(s) server like nginx because you have infrastructure for handling http(s) there. I just have to dig in how PPP is working on Linux and how it interacts with userland applications.
That's why I would prefer a C/C++ rewrite of sstp-server.
from sstp-server.
The main problem with servers like nginx is process spawn.
For every connection you have to spawn pppd process which will handle almost all.
There are some corner cases such as crypto binding, you have to make sstp frame parser in nginx to handle them :)
from sstp-server.
@davidweisgerber any progress?
from sstp-server.
@davidweisgerber try with stunnel and ssptd --no-ssl
i think is much better :)
from sstp-server.
@sorz I think that twisted is too slow for our case :(
take a look at
https://magic.io/blog/uvloop-blazing-fast-python-networking/
but requires python 3.5 (not that bad... )
from sstp-server.
Just fix two bugs caused random package damaged.
It affected TCP performance dramatically. (from ~3Mbps to ~50Mbps after fixed in my case)
Sorry for these bugs. qwq
from sstp-server.
@sorz great i will test them later today :) and report back with numbers.
from sstp-server.
@sorz yep i think performance is much better easily i can achieve 5-6mb/s over wifi.
with some older versions i have great success with stunnel in front of sstp i will try that way to see what happens later this week
from sstp-server.
It turns out that using nginx in-front of sstpd is quite easy.
I still haven't tested performance.
from sstp-server.
Related Issues (20)
- mac下,怎么运行客户端? HOT 6
- request feature, logwtmp HOT 1
- feature request : pass user IP to ppp HOT 6
- auth? can't get it to work HOT 1
- Gateway routing issues HOT 2
- Inter-peer port communication HOT 4
- PPP Link Negotiation Never Ends? HOT 1
- socket.gaierror Name or service not known HOT 1
- Breaks when running under Python 3.10 HOT 6
- two processes of the same VPN connection HOT 1
- Path in the URI? HOT 2
- Is it also useable only with password & username authentication - so WITHOUT keys / keyfiles? HOT 1
- On which Linux distribution can i run it? HOT 1
- radius server
- How to configure Username/Password HOT 7
- Default Gateway is 0.0.0.0 No Internet access HOT 1
- AttributeError: 'SSTPProtocol' object has no attribute 'transport' HOT 1
- SSTP Configuration Ubuntu
- Name or service not known HOT 3
- segfault fault under Python 3.11.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sstp-server.