How did I know swoole is succefull applied on my environment #534
Description
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
- Please provide your PHP and Swoole version. (
php -v
andphp --ri swoole
)
PHP 7.4.32 (cli) (built: Oct 28 2022 18:18:25) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.32, Copyright (c), by Zend Technologies
Server API | FPM/FastCGI
and
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.8.12
Built => Oct 29 2022 22:59:10
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
-
Please provide your Laravel/Lumen version.
"laravel/framework": "^6.0",
-
Which release version of this package are you using?
Version => 4.8.12
Built => Oct 29 2022 22:59:10
"swooletw/laravel-swoole": "^2.12"
-
What did you do? If possible, provide a recipe for reproducing the error.
Just Installing swoole on laravel project like on documentation. My laravel project using laradok
-
What did you expect to see?
How did I know swoole is succefull applied on my environment. Because I test a benchmark with wrk. Nothing improve (just a litte bit) perfomance between using swoole and not using swoole.
- What did you see instead?
using swoole
wrk -t3 -c10 -d5s -H 'x-api-key:fasdf' -H 'Content-Type:application/json' -H 'Accept:application/json' "http://api-test/api?limit=10"
Running 5s test @ http://api-test/api?limit=10
3 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 58.03ms 71.92ms 339.84ms 85.70%
Req/Sec 80.87 38.69 181.00 59.06%
1205 requests in 5.00s, 417.75KB read
Non-2xx or 3xx responses: 1205
Requests/sec: 240.81
Transfer/sec: 83.48KB
no using swoole
wrk -t3 -c10 -d5s -H 'x-api-key:fasdf' -H 'Content-Type:application/json' -H 'Accept:application/json' "http://api-test/api?limit=10"
Running 5s test @ http://api-test/api?limit=10
3 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 56.38ms 72.46ms 344.37ms 85.71%
Req/Sec 86.23 39.65 210.00 70.67%
1292 requests in 5.01s, 447.91KB read
Non-2xx or 3xx responses: 1292
Requests/sec: 258.03
Transfer/sec: 89.45KB
run command
php artisan swoole:http infos
+-----------------+-------------------------------------------------------------------+
| Name | Value |
+-----------------+-------------------------------------------------------------------+
| PHP Version | 7.4.32 |
| Swoole Version | 4.8.12 |
| Laravel Version | 6.20.44 |
| Listen IP | 127.0.0.1 |
| Listen Port | 1215 |
| Server Status | Online |
| Reactor Num | 8 |
| Worker Num | 8 |
| Task Worker Num | 0 |
| Websocket Mode | Off |
| Master PID | 2791 |
| Manager PID | 2795 |
+-----------------+-------------------------------------------------------------------+