hyperf qps 与 laravel10 + octane qps 对比
laravel10 + octane
laravel 10 qps
使用
octane
启动laravel, 开4个 worker
php artisan octane:start --workers=4
ab -n 100 -c 100 http://localhost:8000/
hyperf qps
ab -n 100 -c 100 http://localhost:9501/
IO对比
先看我表的总数据量
laravel的数据库请求代码
Route::get('test', function () {
return \Illuminate\Support\Facades\DB::table('kol_analysis_labor_costs')->first();
});
curl 测试接口
开始压测
ab -n 100 -c 100 http://localhost:8000/test/
hyperf 代码
Router::get('/test', function() {
return \App\Models\KolAnalysis\KolAnalysisLaborCost::query()->first();
});
开始压测
ab -n 100 -c 100 http://localhost:19501/test
本作品采用《CC 协议》,转载必须注明作者和本文链接
可以的
hyperf 的worker数是多少
明天把io性能对比加上
航母和驱逐舰比速度
看过 hyperf,怎么说呢,速度是提升上来了,但是已经脱离优雅了
octane 够用了
hyperf 默认配置 helloworld qps不到1万不正常,我2核2G的阿里云服务器测试都过2万qps
:joy:
Laravel 的 Session 状态是开启还是关闭?
webman请求出战
应该是
hyperf
默认开启数据库连接池了吧,不开连接池对比一下? :joy: