yaf 2.1性能测试(yaf 2.1 benchmark) - 风雪之隅


本站和网页 http://www.laruence.com/2011/12/02/2333.html/comment-page-1#comment-168419 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

Yaf 2.1性能测试(Yaf 2.1 Benchmark) - 风雪之隅
Press "Enter" to skip to content
风雪之隅 左手代码右手诗 open menu
mobile menu toggle button
主页
PHP源码分析
PHP应用
JS/CSS
随笔
留言
博客地图
Yaf 2.1性能测试(Yaf 2.1 Benchmark)
Published on
2 December 2011
by
laruence
作者:
Laruence
-->
本文地址:
https://www.laruence.com/2011/12/02/2333.html
转载请注明出处
Thanks to Ruilog agian for his work of second
benchmark of Yaf 2.1
Yaf 2.1
github
manual
) did a lot of work to improve performance and reduce memory usage, so let's take a look at the result(Yaf 2.1重写了很多逻辑来提升性能, 并且降低内存使用率, 改进结果见测试对比):
First of all,
I have to say, I am not saying the fastest is the best. every framework list blew is outstanding, and has particular situation to deploy. (首先, 我要申明, 不一定最快的就是最好的, 下面的每一个框架都是优秀的框架, 都有它们适用的场景)
Case
Test Simple "Hello World" page output, Simple MVC logic(Router -> Controller -> Viewer), No Database Connections, No complex logic. Test scripts can be found
here
Hardware platform
CPU: Intel Core i5 750 (2.67GHz x4)
RAM: 4GB
Software Environment
Debian 6.0.3 x86_64 (2.6.32-39)
apache 2.2.16 (mpm-prefork,mod-php5)
php 5.3.8
php-apc 3.1.9 (Optimization for include/require)
Copy all projects to /dev/shm/* (Optimization for files read/write)
1. Apache Benchmark
Requests pre second (-c 100 -n 30000), the bigger is better
ab -c100 -n30000
Requests pre second (-c 200 -n 50000), the bigger is better
ab -c200 -n50000
2. System LoadAvg
System LoadAvg in 1 Minute when Apache Benchmark Complete, the smaller is better (-c 100 -n 30000)
System loadavg
3. Memory usage
How many memory usage in one "hello world" page. the smaller is better.
Memory usage
4. Response time
The time of page request to response.
Response time
5.Number of function calls (Facebook XHProf)
The number of functions calls in one "hello world" page.
Number of function calls
6. Number of included files
The number of files included or required in one "hello world" page. the fewer is better.
Number of included files
Changelog:
* v20111201 @2011-12-01
- release
* v20111201-2 @2011-12-05
- bugfix: Fix a stupid logic error in bench.php
- bugfix: Symfony2, Change running mode from 'dev' to 'prod'
--EOF--
For more details, plz refer to:
http://www.ruilog.com/blog/view/b6f0e42cf705.html
Filed in
PHP Extension
Yaf
Yaf Benchmark
Yaf Performance
Yaf性能
Previous Post
GBK编码PHP脚本导致语法错误(Zend Multibyte)
Next Post
更简单的重现PHP Core的调用栈
64 Comments
Prestige park grove
July 7, 2023
good post
Angel Numerology
March 26, 2023
I wish I coul be better at coding. Still, framework isn’t that bad.
365 Days of Positivity
This is one of the best frameworks!
fnaf
June 27, 2022
Yaf 2.1 是 Benchmark 的更新版本,它包括对 HTTP/2 的支持。
pokedle
www.slopeunblockedgo.com
May 23, 2022
You’ve managed to interest me.
basketballstars
January 31, 2022
A really very useful share
עיסוי
May 6, 2020
massage in israel, many beautiful women!
geometry dash
February 11, 2020
The Yet Another Framework (Yaf) 扩展是一个用来开发web应用的php框架。
Biao Go
July 10, 2019
I want try the best yaf framework!
David Chan
March 22, 2019
Very Good!
mingshuo
February 25, 2019
i like it
FeiXu
December 18, 2018
En nice
חדרי אירוח לפי שעה
September 2, 2018
hmmmmm, very interesting!
jeni johnson
July 12, 2018
Cleaning the water reservoir
Remove the water reservoir (6) from the body of the appliance beforehand (see a section “Usage rules”, “Preparing for work”). Turn the cover (8) of the water tank anti-clockwise. Drain and rinse the tank to remove dirt and limescale. In case of severe contamination, it is recommended to completely rinse the tank with an acetic acid solution (see the next paragraph “Cleaning the Evaporator Chamber and Transducer”). It is recommended to clean the water tank as often as possible, in order to maintain the purity and freshness of the water.
—————————-
Best Whole House Humidifiers
Hotmail.com signin
May 19, 2018
I cannot open my Hotmail emails if I use my MAC OSX with Safari at home. I think that this happens since Hotmail changed its configuration with Windows Live. In fact, if I use any PC, there is no problem at all. I need to resolve the problem because mainly I use MAC. Could you help me?
Hotmail Login
March 20, 2018
It is a good and amazing article. Your information is very useful for me and for others. thank you so much.
marylewis21
October 18, 2017
目录结构中有提到model层,但文档中似乎并未看到。API里也看不到db操作的代码和例子,能否给些例子参考一下。
real madrid logo
June 5, 2017
We assume the delays are down to Ubi polish; The Stick Of Truth has the capacity to be an incredible game a mix of oldschool
Gaming Mouse Review
May 29, 2017
I am new in php hope i will understand it
alex
March 7, 2017
In file included from /home/alex/pirate/php/include/php/Zend/zend.h:841:0,
from /home/alex/pirate/php/include/php/main/php.h:34,
from /home/alex/pirate/nginx/html/yaflearned/yaf.c:21:
/home/alex/pirate/php/include/php/Zend/zend_variables.h:51:15: note: expected ‘struct zval **’ but argument is of type ‘struct zval *’
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
make: *** [yaf.lo] Error 1这是什么鬼,系统时centos 7
Job search
February 13, 2017
Awesome info, thanks for sharing.
Nolvadex Kaufen
February 2, 2017
Very nice. Thanks!
MonacoEscort
January 7, 2017
Awesome info, thank you for shearing with us!
Brandi
May 4, 2016
Thought it woldun’t to give it a shot. I was right.
tiffany chains jewelry
November 11, 2015
And is particularly often the case most of us match in the everyday life.
http://www.abacodecks.com/e14/
driving lessosn in warrington
June 8, 2015
Helpful info. Lucky me I found your website
by accident, and I’m shocked why this twist of fate did not
came about in advance! I bookmarked it.
Sherryl
May 22, 2015
Wonderful blog you have here but I was curious if you knew of
any discussion boards that cover the same topics talked about in this article?
I’d really love to be a part of group where I can get suggestions from other
knowledgeable individuals that share the same interest.
If you have any recommendations, please let me know.
Thanks!
web site (
導入 | PHP関数マニュアル
November 24, 2014
[…] Yaf のベンチマークが » Yaf Performance […]
domain
September 19, 2014
When I originally commented I clicked the “Notify me when new comments are added” checkbox and
now each time a comment is added I get three
e-mails with the same comment. Is there any way you can remove people from that service?
Johnny
October 9, 2013
我注意到一个问题,在你的测试里,ZF2比ZF1的性能更低,好像跟ZF官方的说法不太一致。奇怪
Anonymous
September 24, 2013
跟symfony2有什么关系吗
奇言妙事-文学奇谈小小说阅读xlinblog.sinaapp.com » Yar – 并行的RPC框架(Concurrent RPC framework)
September 16, 2012
[…] Yaf 2.1性能测试(Yaf 2.1 Benchmark)
Copyright © 2010 风雪之隅 版权所有, 转载务必注明. 该Feed只供个人使用, 禁止未注明的转载或商业应用. 非法应用的, 一切法律后果自负. 如有问题, 可发E-mail至my at laruence.com.(Digital Fingerprint: 73540ba0a1738d7d07d4b6038d5615e2) […]
phporigin
September 2, 2012
yaf和原生php性能对比有吗
webcgo
July 3, 2012
yaf是C写然后编译为PHP扩展,和原生PHP写的框架相比,当然会快,但是框架定制时不方便吧
雪候鸟
May 5, 2012
@pakey 看这里:
http://yafphp.com/forum.php?mod=viewthread&tid=21#lastpost
pakey
May 2, 2012
请问是否有yaf框架的一个小项目具体实例
可以便于参照
March 16, 2012
2.1.8
/usr/bin/phpize ./configure –with-php-config=/usr/bin/php-config
Configuring for:
PHP Api Version:
20090626
Zend Module Api No:
Zend Extension Api No:
220090626
michael
March 14, 2012
和doophp比较呢?有测试结果吗?
February 8, 2012
@cindy ming 暂时没有, 你可以使用不同的模板来实现, 或者使用自定义的视图引擎.
不过, Yaf的视图引擎将会支持layout, 预计在2.2版本中
cindy ming
您好,
请问yaf有layout的这个概念吗?我们应该怎么扩展可以达到layout的效果,因为当用户的角色不同的时候我们的layout是不一样的。
谢谢
January 31, 2012
@keda Yaf_Application的第二个参数:
http://www.php.net/manual/en/yaf-application.construct.php
keda
January 7, 2012
不知道这个算不算是个问题,用于决定YAF application config 的 yaf.environ php value似乎只能通过添加到php 本身的ini文件里面来改变,而不能通过ini_set 或者是 修改local htaccess 文件来改变。
如果在一台机器上需要有几个YAF项目以及不同的env值的话,单个值似乎是个问题。。并且改变需要root access,更是问题。。
如果不实之处,请谅解。。
adam.lu
December 31, 2011
Hi, laruence
我已经在mac下成功编译了2.1.5
可是在phpize的时候仍然会有一下的warning信息,不知道会不会影响使用。
configure.in:3: warning: prefer named diversions
另外,http://yaf.laruence.com/manual/这个手册还在维护吗?我看到手册中还有不少地方是使用ap而不是yaf这个叫法。
December 26, 2011
@keda @adam.lu 非常感谢你们的反馈, 问题已经修复. 请使用2.1.5beta
http://pecl.php.net/package-info.php?package=yaf&version=2.1.5
gcc (Debian 4.4.5-8) 4.4.5 64bit系统。
跟Adam Lu的error一样。。
yaf.c:265: warning: initialization makes integer from pointer without a cast
yaf.c:266: warning: initialization makes integer from pointer without a cast
yaf.c:266: error: initializer element is not computable at load time
yaf.c:266: error: (near initialization for ‘yaf_module_entry.module_number’)
2.1.3却又没有问题。。
我用另一架32bit的debian编译却没有这个问题。。
December 25, 2011
@adam.lu 你可以打开php.ini中的display_startup_error看看有什么错误
mac os 中的php版本试5.3.8
我在ubuntu中安装编译没有问题,php版本是5.3.3。可是在php.ini中加入扩展(extension=yaf.so)后,apache就无法启动成功:(
December 24, 2011
@adam.lu 请问你的PHP的版本是?
Hi, Laruence.
我在mac os x 10.7.2 上无法安装yaf-2.1.4。
运行phpzie的时候提示:
运行make的时候提示:
make: *** [yaf.lo] Error 1
December 7, 2011
@雪候鸟 非常感谢!我已经用ReflectionClass把Yaf扩展里的类都抽象出来了,写的很简单,不过可以用^ ^ 这下在zend里开发就方便多了,有需要的同学可以到下面的链接下载http://code.google.com/p/thinklong/downloads/detail?name=Yaf.php&can=2&q=#makechanges
dvaknheo
December 6, 2011
我现在在给某个框架集成支付,搞得很头大。
后来想想,为什么一定要把支付搞在框架里,直接弄个单独的文件不行么?
再后来想想, 不行, 那样就就搞得系统零碎。
@thinklong 我这边没有, 不过你可以借助reflectclass自己生成一个 🙂
Thinklong
非常喜欢你的框架,但我希望能让ZendStudio自动提示Yaf里的方法和类,搞了很久,zend6以上的版本无法添加*.so库,鸟哥有没有抽象出来的code文件,或者其他实现方式?
Eryx
December 5, 2011
@Wellming Symfony2 的配置确实存在问题,切换到 prod模式后并发大概是 400+, 介于 ZF 1.11 和 2.0 之间
venkman
如果虚拟主机上的php不支持或没有安装这个扩展, 那么推广还是有一定的
Wellming
December 3, 2011
@Eryx 你看下app.php跟app_dev.php文件,
$kernel = new AppKernel(‘prod’, false);
$kernel = new AppKernel(‘dev’, true);
这里第2个参数是,是否开启debug。
kernel
symfony2这么差啊,ps: yii的表现还不错啊,于是继续用yii
xiatian
win下用nginx+php(fcgi)方式无法加载php_yaf.dll,不管是nts还是zts.
提示错误:
“E:\webServer\php\ext\php_yaf.dll”的激活上下文生成失败。 找不到从属程序集 Microsoft.VC90.DebugCRT,processorArchitecture=”x86″,publicKeyToken=”1fc8b3b9a1e18e3b”,type=”win32″,version=”9.0.21022.8″。 请使用 sxstrace.exe 进行详细诊断。
helloyou
关于yaf,记得你说过yaf是仿Zfw的,
如果能有个工具帮助现有的ZFW项目快速转换到yaf上,
或者有一个bridge工具来让现有zfw直接在yaf上运行,
应该会让yaf更容易普及
还有上次说的,要有英文手册
December 2, 2011
解释下 app_dev.php 问题:
刚开始的时候,常识用 app.php 引导,但失败(500 error); 而同时 app_dev.php 正常,为了消除 debug 对性能的影响,在 config_dev.yml 中做了如下修改 ([web_profiler] toolbar: false; intercept_redirects: false). 使其可以输出一个干净的 “hello world”.
我想,虽然名称上叫做 “dev”, 但实际配置应该和 “app.php” 等同.
Symfony 是一个历史悠久、成熟的商业框架,但我却是第一次使用,如果你有更优化的配置,期待您提交补丁 🙂
KnightE
哇塞,Yaf好快耶!
不过symfony2没这么慢吧,性能测试的时候应该用app.php,app_dev.php是开发用的。
东爷
Yaf的性能对比测试 | 风雪之隅
[…] 后记(2011-12-02补充), Yaf 2.1做一些性能优化的升级, 基于Yaf 2.1的性能测试报告可以参见: Yaf 2.1性能测试(Yaf 2.1 Benchmark) […]
Comments are closed.
Sidebar
PHP
开发组核心成员,
Zend
顾问, PHP7及PHP8 JIT核心作者. Yaf等开源项目作者.
Search
开源项目
:  PHP Framework in PHP extension
Yar
:  Light, concurrent RPC framework
Yac
:  PHP Contents cache
Yaconf
:  PHP Configurations Container
Taint
:  XSS code sniffer
Lua
:  Embedded lua interpreter
MsgPack
:  MessagePack in PHP extension
Couchbase
:  Libcouchbase wrapper
See also:  
laruence@github
最新评论
Hengist Wang
on
关于调用约定(cdecl、fastcall、stcall、thiscall) 的一点知识
拍黄瓜
PHP 8新特性之Attributes(注解)
陶路
博客迁移到腾讯云
tattvamretreat
深入理解Zend SAPIs(Zend SAPI Internals)
Sobha Town Park
PHP 8新特性之JIT简介
个人公众号
标签
Apache
apc
bug
C++
core
curl
Extension
IE
javascript
js
json
mysql
nginx
opcache
Performance
PHP5.4
PHP5.4新特性
PHP7
PHP8
PHP 8
PHP extension
php原理
PHP扩展
php源码
php源码分析
SAPI
session
valgrind
vim
yac
Yaf_Loader
zval
优化
低概率core
内核
原理
开发php扩展
性能
性能优化
扩展开发
正则
分类
Select Category
GNU C/C++  (11)
Js/CSS  (24)
Linux/Unix  (15)
MySQL/PostgreSQL  (7)
PHP Extension  (19)
PHP7  (9)
PHP8  (5)
PHP应用  (188)
PHP源码分析  (86)
转载  (34)
随笔  (111)
Links
Licence
Sitemaps
Site Feed
Yaf Manual
SSE Intrinsics Guide
X86 Instruction Reference
Realsee
访客地图
©
博客声明
京ICP备15032766号
PHP 8.1.0-NTS(JIT)
/ Theme By
Compete Themes