hyperf qps 与 laravel10 + octane qps 对比

laravel10 + octane

hyperf qps 与 laravel10 + octane qps 对比

laravel 10 qps

使用 octane 启动laravel, 开 4个 worker

php artisan octane:start --workers=4

hyperf qps 与 laravel10 + octane qps 对比

hyperf qps 与 laravel10 + octane qps 对比

ab -n 100 -c 100 http://localhost:8000/

hyperf qps 与 laravel10 + octane qps 对比

hyperf qps

ab -n 100 -c 100 http://localhost:9501/

hyperf qps 与 laravel10 + octane qps 对比

hyperf qps 与 laravel10 + octane qps 对比


IO对比
先看我表的总数据量

hyperf qps 与 laravel10 + octane qps 对比

laravel的数据库请求代码

Route::get('test', function () {
    return \Illuminate\Support\Facades\DB::table('kol_analysis_labor_costs')->first();
});

curl 测试接口

hyperf qps 与 laravel10 + octane qps 对比

开始压测

ab -n 100 -c 100 http://localhost:8000/test/

hyperf qps 与 laravel10 + octane qps 对比

hyperf 代码

Router::get('/test', function() {
    return \App\Models\KolAnalysis\KolAnalysisLaborCost::query()->first();
});

hyperf qps 与 laravel10 + octane qps 对比

开始压测

ab -n 100 -c 100 http://localhost:19501/test

hyperf qps 与 laravel10 + octane qps 对比

本作品采用《CC 协议》,转载必须注明作者和本文链接
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 17

hyperf 的worker数是多少

1年前 评论
晏南风 (楼主) 1年前

明天把io性能对比加上

1年前 评论
kis龍 1年前

航母和驱逐舰比速度

1年前 评论
nff93

看过 hyperf,怎么说呢,速度是提升上来了,但是已经脱离优雅了

1年前 评论

octane 够用了

1年前 评论

hyperf 默认配置 helloworld qps不到1万不正常,我2核2G的阿里云服务器测试都过2万qps

1年前 评论

:joy:

Laravel 的 Session 状态是开启还是关闭?

1年前 评论
oliver-l 1年前
陈先生 (作者) 1年前
GDDD

webman请求出战

1年前 评论
晏南风 (楼主) 1年前
zjason 1年前
GDDD (作者) 1年前

应该是 hyperf 默认开启数据库连接池了吧,不开连接池对比一下? :joy:

1年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!