jami-daemon issueshttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues2019-09-12T13:34:58Zhttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues/141file transfer: cancel is broken2019-09-12T13:34:58ZSébastien Blinfile transfer: cancel is brokenIteration 15Sébastien BlinSébastien Blinhttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues/137Keypad not working during SIP calls (for extensions)2019-09-12T13:40:40ZFrançois Naggar-TremblayKeypad not working during SIP calls (for extensions)Additionally, it is not possible to press # in a call on desktopAdditionally, it is not possible to press # in a call on desktopIteration 15Ming Rui ZhangMing Rui Zhanghttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues/135Can't send video if hardware acceleration enabled2019-09-12T13:32:41ZSébastien BlinCan't send video if hardware acceleration enabledSince commit c25567fefae72d9530571235c03de737aaab09b0, if "hardware acceleration" is enabled, the video on the Lenovo P51 Ubuntu 19.04 is not sent.
```
[sdp @ 0x7ff14c1c0200] Stream #0: not enough frames to estimate rate; consider incre...Since commit c25567fefae72d9530571235c03de737aaab09b0, if "hardware acceleration" is enabled, the video on the Lenovo P51 Ubuntu 19.04 is not sent.
```
[sdp @ 0x7ff14c1c0200] Stream #0: not enough frames to estimate rate; consider increasing probesize
[mjpeg @ 0x7ff1340a0c00] unable to decode APP fields: Invalid data found when processing input
[1565900238.308|11497|accel.cpp :269 ] Attempting to use hardware decoder mjpeg with vaapi
[1565900238.308|11497|media_decoder.cpp :311 ] Decoding video using MJPEG (Motion JPEG) (mjpeg)
[1565900238.308|11497|video_input.cpp :375 ] created decoder with video params : size=1280X720, fps=30.000000
[1565900238.308|11497|sinkclient.cpp :415 ] Start sink <local / Jami Daemon_shm_11070_0>, size=1280x720, mixer=0
[mjpeg @ 0x7ff134099e40] unable to decode APP fields: Invalid data found when processing input
[1565900238.309|11497|accel.cpp :51 ] Found compatible hardware format for mjpeg decoder with vaapi
[mjpeg @ 0x7ff134099e40] No support for codec mjpeg profile 192.
[mjpeg @ 0x7ff134099e40] Failed setup for format vaapi_vld: hwaccel initialisation returned error.
[1565900238.309|11497|accel.cpp :58 ] Not using hardware decoding
[1565900238.309|11499|accel.cpp :269 ] Attempting to use hardware decoder h264 with vaapi
[1565900238.309|11499|media_decoder.cpp :311 ] Decoding video using H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (h264)
[1565900238.310|11499|sinkclient.cpp :195 ] ShmHolder[Jami Daemon_shm_11070_1]: new sizes: f=0, a=103
[1565900238.310|11499|sinkclient.cpp :161 ] ShmHolder: new holder 'Jami Daemon_shm_11070_1'
[1565900238.310|11499|sinkclient.cpp :415 ] Start sink <5818368387659495 / Jami Daemon_shm_11070_1>, size=1280x720, mixer=0
[1565900238.310|11503|accel.cpp :51 ] Found compatible hardware format for h264 decoder with vaapi
[h264 @ 0x7ff14c35bcc0] No support for codec h264 profile 578.
[h264 @ 0x7ff14c35bcc0] Failed setup for format vaapi_vld: hwaccel initialisation returned error.
[1565900238.310|11503|accel.cpp :58 ] Not using hardware decoding
[1565900238.313|11499|sinkclient.cpp :195 ] ShmHolder[Jami Daemon_shm_11070_1]: new sizes: f=3686400, a=7372903
[1565900238.320|11497|accel.cpp :299 ] Attempting to use hardware encoder h264_vaapi with vaapi
[1565900238.320|11497|media_encoder.cpp :497 ] [h264_vaapi] Using 8 threads
[1565900238.320|11497|media_encoder.cpp :604 ] Using profile Constrained Baseline (242) and level 41
[1565900238.320|11497|media_encoder.cpp :552 ] Failed to set x264 preset 'ultrafast'
[1565900238.320|11497|media_encoder.cpp :555 ] Failed to set x264 tune 'zerolatency'
[1565900238.320|11497|media_encoder.cpp :761 ] H264 encoder setup: crf=30, maxrate=1200000, bufsize=2400000
[h264_vaapi @ 0x7ff134370380] No usable encoding profile found.
[1565900238.320|11497|threadloop.cpp :46 ] [threadloop:0x7ff1b8012868] Unwaited exception: Could not open encoder
```
Works if I add (`accel.cpp:initDevice():`)
```
if (av_hwdevice_ctx_create(&deviceCtx_, hwType_, "/dev/dri/renderD128", nullptr, 0) >= 0)
return true;
```Iteration 15Philippe GorleyPhilippe Gorleyhttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues/104RFC2466: prepare patch for upstream2019-09-12T13:33:16ZSébastien BlinRFC2466: prepare patch for upstreamIteration 15Sébastien BlinSébastien Blinhttps://git.jami.net/savoirfairelinux/jami-daemon/-/issues/97replace restbed by restinio2019-09-10T18:40:32ZAdrien Béraudreplace restbed by restinio# Parts
+ OpenDHT: https://github.com/savoirfairelinux/opendht/pull/403 (merged)
+ Jami-daemon: https://review.jami.net/#/c/ring-daemon/+/11959/ (in review)
# Tasks
+ ~~[Find an alternative](https://github.com/binarytrails/ring-for-th...# Parts
+ OpenDHT: https://github.com/savoirfairelinux/opendht/pull/403 (merged)
+ Jami-daemon: https://review.jami.net/#/c/ring-daemon/+/11959/ (in review)
# Tasks
+ ~~[Find an alternative](https://github.com/binarytrails/ring-for-the-web/tree/master/Server/Cpp#libraries)~~
+ ~~Test async over a threadpool~~
+ ~~Basic methods & threading~~
+ ~~Compile OpenDHT in c++14~~
+ ~~[Add RESTinio to OpenDHT](https://github.com/binarytrails/opendht/tree/proxy_restinio)~~
+ ~~[Fix flush happening after async scope](https://github.com/Stiffstream/restinio/issues/22)~~
+ ~~Server: Get,Put,Info,Stats,Options,PutEncrypted,PutSigned,Subscribe,Filter,Listen,Push~~
+ ~~Server: Cancel disconnected listeners by [detecting a closed connection](https://github.com/Stiffstream/restinio/issues/28), Replace Thread~~
+ ~~Server: Replace Scheduler task by Asio Timer making the entire server on one io_context that is run on one thread.~~
+ ~~Make an async RESTinio client with callbacks & integrate http_parser~~
+ ~~Rewrite client side with an in-house std::async client library~~
+ ~~Adapt and test the behavior of proxy client to new async design~~
+ ~~Verify that keep alive is working~~
+ ~~Patch for [ISSUE-552](https://git.jami.net/savoirfairelinux/ring-client-android/issues/552): Configure the server to send keep alive every X min when X < 15 min)~~
+ ~~[Make the RESTful API backward compatible to non-standard HTTP methods](https://github.com/Stiffstream/restinio/issues/26)~~
+ ~~[Redirect server logging](https://github.com/savoirfairelinux/opendht/pull/403/commits/330ad8ed120d35ecaa76446fdd36796ac2fecdfb)~~
+ ~~IPV6 support: client & [server](https://github.com/Stiffstream/restinio/issues/30)~~
+ ~~Make dhtproxytests pass~~
+ ~~Add docker setup for restinio & http_parser fork for Travis-CI~~
+ ~~Benchmark the proxy server~~
+ ~~Replace Jami-daemon nameserver RESTbed by new OpenDHT Async Client~~
+ ~~Add OpenSSL to OpenDHT CMake & Autotools~~
+ ~~Implement OpenSSL in http lib (bridge GNUTLS Identity/Cert to OpenSSL in Asio)~~
+ ~~Implement HTTPS in DHTProxy (upstream is HTTP)~~
+ ~~Use HTTP or HTTPS depending on generated dht:crypto:Identity (-i)~~
+ ~~Write Docker files for OpenDHT with Travis CI~~
+ ~~Integrate to the daemon autotools build system along with contribs (fmt, http_parser, restinio, ssl)~~
+ ~~Cross-compile on Jenkins: Linux, Arm, OSx, Windows~~
# Benchmark
10'000 requests with concurrency of 20 requests
Compiled with:
```
cmake -DOPENDHT_TESTS=ON -DOPENDHT_PROXY_SERVER=ON -DOPENDHT_PROXY_CLIENT=ON -DCMAKE_INSTALL_PREFIX=/usr -DOPENDHT_PROXY_SERVER_IDENTITY=ON -DOPENDHT_DOCUMENTATION=Off -DOPENDHT_PUSH_NOTIFICATIONS=ON -DCMAKE_BUILD_TYPE=Release ../
```
**Summary**
- max_pipelined_requests: 16
- concurrent_accepts_count: 15
| REST framework | Requests per second |
| ------ | ------ |
| RESTbed (multi-threded) | 12'677 |
| RESTinio (one io_context thread) | 18'834 |
| RESTinio (io_context on thread pool) | 12'719 |
- max_pipelined_requests: 7
- concurrent_accepts_count: 6
| REST framework | Requests per second |
| ------ | ------ |
| RESTbed (multi-threded) | 12'677 |
| RESTinio (one io_context thread) | 17'472 |
| RESTinio (io_context on thread pool) | 11'800 |
**Restbed**: multi-threaded
```
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 180 bytes
Concurrency Level: 20
Time taken for tests: 0.789 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 2870000 bytes
HTML transferred: 1800000 bytes
Requests per second: 12677.48 [#/sec] (mean)
Time per request: 1.578 [ms] (mean)
Time per request: 0.079 [ms] (mean, across all concurrent requests)
Transfer rate: 3553.16 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.2 1 3
Processing: 0 1 0.4 1 13
Waiting: 0 1 0.3 1 10
Total: 1 2 0.5 1 13
WARNING: The median and mean for the total time are not within a normal deviation
These results are probably not that reliable.
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 2
80% 2
90% 2
95% 2
98% 3
99% 4
100% 13 (longest request)
```
**Restinio**
- max_pipelined_requests: 16
- concurrent_accepts_count: 15
one thread for one io_context
```
Server Software: RESTinio
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 172 bytes
Concurrency Level: 20
Time taken for tests: 0.531 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 3130000 bytes
HTML transferred: 1720000 bytes
Requests per second: 18833.85 [#/sec] (mean)
Time per request: 1.062 [ms] (mean)
Time per request: 0.053 [ms] (mean, across all concurrent requests)
Transfer rate: 5756.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 3
Processing: 0 1 0.3 1 7
Waiting: 0 1 0.3 1 6
Total: 1 1 0.4 1 8
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 2
98% 2
99% 2
100% 8 (longest request)
```
io_context on thread pool
```
Server Software: RESTinio
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 172 bytes
Concurrency Level: 20
Time taken for tests: 0.786 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 3130000 bytes
HTML transferred: 1720000 bytes
Requests per second: 12718.92 [#/sec] (mean)
Time per request: 1.572 [ms] (mean)
Time per request: 0.079 [ms] (mean, across all concurrent requests)
Transfer rate: 3887.72 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.2 1 3
Processing: 0 1 0.7 1 14
Waiting: 0 1 0.6 1 14
Total: 1 2 0.8 1 15
WARNING: The median and mean for the total time are not within a normal deviation
These results are probably not that reliable.
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 2
90% 2
95% 3
98% 4
99% 5
100% 15 (longest request)
```
- max_pipelined_requests: 7
- concurrent_accepts_count: 6
one thread for one io_context
```
Server Software: RESTinio
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 172 bytes
Concurrency Level: 20
Time taken for tests: 0.572 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 3130000 bytes
HTML transferred: 1720000 bytes
Requests per second: 17472.10 [#/sec] (mean)
Time per request: 1.145 [ms] (mean)
Time per request: 0.057 [ms] (mean, across all concurrent requests)
Transfer rate: 5340.59 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 7
Processing: 0 1 0.4 1 8
Waiting: 0 1 0.3 1 7
Total: 1 1 0.5 1 9
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 2
98% 2
99% 2
100% 9 (longest request)
```
io_context on thread pool
```
Server Software: RESTinio
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /
Document Length: 172 bytes
Concurrency Level: 20
Time taken for tests: 0.847 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 3130000 bytes
HTML transferred: 1720000 bytes
Requests per second: 11800.02 [#/sec] (mean)
Time per request: 1.695 [ms] (mean)
Time per request: 0.085 [ms] (mean, across all concurrent requests)
Transfer rate: 3606.84 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.4 1 6
Processing: 0 1 1.0 1 17
Waiting: 0 1 0.8 1 16
Total: 1 2 1.1 1 19
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 2
80% 2
90% 3
95% 4
98% 6
99% 7
100% 19 (longest request)
```Iteration 15Vsevolod IvanovVsevolod Ivanov