Comments (6)
I made some checks and improvements, the results in the table below. Tested with wrk
. It works through SNARE, so it have SNARE latency in the measurements.
Testing string: `wrk -t12 -c400 -d30s ``
request | asyncio | uvloop&improvements |
---|---|---|
index | Requests/sec: 17.14 | Requests/sec: 49.26 |
rfi | Requests/sec: 32.20 | Requests/sec: 60.65 |
lfi | Requests/sec: 46.18 | Requests/sec: 51.34 |
xss | Requests/sec: 24.59 | Requests/sec: 50.54 |
sqli | Requests/sec: 49.13 | Requests/sec: 45.27 |
api | Requests/sec: 126.38 | Requests/sec: 396.19 |
In this case, api testing is the most meaningful: we send requests directly on TANNER. So, first measurement without any changes:
root@afeena-ubuntu16:~/wrk# wrk -t12 -c400 -d30s http://127.0.0.1:8080/api/stats
Running 30s test @ http://127.0.0.1:8080/api/stats
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.24s 477.97ms 2.00s 54.30%
Req/Sec 13.99 13.01 140.00 88.41%
3802 requests in 30.08s, 623.91KB read
Socket errors: connect 0, read 3614, write 0, timeout 1463
Non-2xx or 3xx responses: 3802
Requests/sec: 126.38
Transfer/sec: 20.74KB
After adding asyncio_redis, Requests/sec became about 290, and after adding uvloop it became faster:
root@afeena-ubuntu16:/home/afeena/tanner# wrk -t12 -c400 -d30s http://127.0.0.1:8090/api/stats
Running 30s test @ http://127.0.0.1:8090/api/stats
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 814.75ms 209.02ms 1.68s 77.34%
Req/Sec 45.69 44.02 303.00 84.65%
11925 requests in 30.10s, 2.56MB read
Socket errors: connect 0, read 11911, write 0, timeout 0
Requests/sec: 396.19
Transfer/sec: 87.05KB
The slowest emulator is sqli emulator, I don't know what we can improve in it right now: sqlite3 not async and we haven't any solution for libinjection.
Also we have a lot of file operation in the lfi emulator, maybe it will be better, if we move the virtual file system to redis?
from tanner.
Good work. Use runsnakerun for some analysis: http://www.vrplumber.com/programming/runsnakerun/
from tanner.
Benchmark with latest changes:
Without uvloop:
root@afeena-ubuntu16:/home/afeena/tanner# wrk -t12 -c400 -d30s http://127.0.0.1:8090/
Running 30s test @ http://127.0.0.1:8090/
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 72.24ms 55.54ms 1.80s 99.51%
Req/Sec 261.80 187.36 666.00 49.02%
45449 requests in 30.10s, 8.11MB read
Socket errors: connect 0, read 45543, write 0, timeout 9
Requests/sec: 1509.90
Transfer/sec: 275.73KB
With uvloop
root@afeena-ubuntu16:/home/afeena/tanner# wrk -t12 -c400 -d30s http://127.0.0.1:8090/
Running 30s test @ http://127.0.0.1:8090/
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 99.31ms 14.37ms 285.36ms 86.92%
Req/Sec 292.76 79.62 1.00k 82.12%
103899 requests in 30.10s, 18.53MB read
Socket errors: connect 0, read 103843, write 0, timeout 0
Requests/sec: 3452.12
Transfer/sec: 630.42KB
from tanner.
The 9 timeouts without uvloop is pretty scary...
Did you manage to make a profile with runsnakerun to see where we spend most of the time?
from tanner.
Yes, I used snakeviz instead of runsnakerun (because of I haven't gui on linux):
from tanner.
Good work. I think we can close this issue for now. We might want to keep an eye on the average response time when we do some monitoring.
from tanner.
Related Issues (20)
- Improve regex pattern for attack detection
- Permissions error HOT 1
- tannerweb issue HOT 4
- Tanner API Parameter for setting number of returned session HOT 4
- JSON Logging hierarchy issue HOT 2
- User, tool, crawler and attacker HOT 1
- JSON parse error HOT 2
- AttributeError: module 'aioredis' has no attribute 'create_redis_pool' HOT 12
- Feature Request: Log4Shell exploit detection
- TannerWeb Redis issue HOT 2
- RFI emulator exception: Future <Future pending> attached to a different loop
- TypeError: zrevrangebyscore() got an unexpected keyword argument 'offset' HOT 2
- GSoC 2022 FAQ [WIP]
- GSoC'22 - HTTP requests evaluation HOT 1
- GSoC'22 - Web Improvement
- Tanner installation HOT 1
- Python 3.10 breaks Tanner HOT 1
- Docker Installation of Tanner fails due to some dependencies HOT 1
- TypeError: zrevrangebyscore() got an unexpected keyword argument 'offset' when running through docker HOT 2
- Session analyzer is not working
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 tanner.