( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10534097048require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10574126040include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10574126040get_header( $name = ???, $args = ??? ).../single.php:10
60.10574126256locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10574126352load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10584126896require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10594134304wp_head( ).../header.php:18
100.10594134304do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10594134520WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10594134520WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10604137936wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10604137936do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15074138152WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15074138152WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15094140040twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.15114141560wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.15114141560WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.15114141560WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.15114141560_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.15114147512wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.15124267048trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.10534097048require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.10574126040include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.10574126040get_header( $name = ???, $args = ??? ).../single.php:10
60.10574126256locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.10574126352load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.10584126896require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.10594134304wp_head( ).../header.php:18
100.10594134304do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.10594134520WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.10594134520WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.10604137936wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.10604137936do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15074138152WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15074138152WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15094140040twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.17704268152wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.17704268152WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.17704268152WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.17704268152_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.17704268472wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.17714268696trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

node.js调研与服务性能测试

这几天对nodejs进行了一下简单的调研

主要关注这几个方面

  1. socket服务性能,
  2. socket客户端性能
  3. http服务性能.
  4. 服务的稳定性与资源占用
  5. 开发成本

考虑到今后的应用场景, 实现了一个简单的memcache代理服务.

内部维护了一个50连接的简单连接池, 通过长连接与memcache服务器相连.
同时对外提供socket代理服务与http restful服务

测试环境

测试使用编译安装的node.js v0.3.1,未使用任何第三方modules
代理服务与memcache部署在不同的服务器中.
系统均为rhel 5.2, cpu: AMD Opteron 2200, mem: 4g

测试用例

通过此代理程序, 分别使用memcached协议与http协议从memcache服务中取出一个长度为100bytes的值, 并检查最终输出是否正确

压力工具

socket: 由于没有找到合适的socket压力工具.用node.js实现了一个简单的socket压力工具
http: siege 2.70

测试结论

服务启动与空载资源占用


程序启动20秒后,系统资源占用达到稳定状态, 内存消耗13m, 堆尺寸8m
由堆使用变化可知v8每隔7~8秒会进行一次gc操作

100并发100秒socket长连接压力


压力启动后内存占用迅速提高至30m, v8堆也基本维持在22m的水平, 使用率在20%到50%之间波动
此时v8的gc操作频率降低到约20秒一次.
qps曲线比较平稳,在16700左右波动,幅度在400左右,v8的gc操作对性能没有明显影响
压力过程中cpu占用基本维持在95%左右,处于满载状态.
另, 测试结束后20秒左右, 所占用资源被释放,内存与v8堆均回复至空载水平.

250并发100秒http长连接压力


与socket相比, http消耗的系统资源约多出30%,且8v的gc操作也要更频繁
qps值为4392, gc操作对qps的影响也不明显
压力过程中cpu占用基本维持在95%左右,处于满载状态.
与socket时类似, 测试结束后20秒左右, 所占用资源被释放,内存与v8堆均回复至空载水平.

一些结论

性能:单cpu, socket 17000 qps, http 4400 qps, 内存消耗30~40m, cpu基本满载
用作中间层服务时,性能瓶颈基本应位于cpu运算性能.
v8引擎gc操作带来的性能影响已经可以基本忽略.
系统的健壮性不错,测试过程中qps与负载曲线基本都处于水平状态.且成功率均为100%
快速开发, 代理服务与压力工具总计开发时间3~4小时左右, 且最终性能与编译型语言差距不大,但开发时间节省很多
开发模式上与传统服务器端动态语言区别较大,不熟悉的开发人员需要一些上手时间.

另,由于时间因素,仅进行了单进程模式下的性能,使用web-worker模型的多进程模式下的性能没有进行测试
不过由单进程性能可以基本推断,在普通8核服务器下应能做到10万以上的socket, qps, 3万以上的http qps

总体来说, 非阻塞模式的io处理给nodejs带来在相对低系统资源耗用下的高性能与出众的负载能力, 非常适合用作依赖其它io资源的中间层服务.

相关源码下载:

http://nodejs-memcache-proxy-performance-test.googlecode.com/files/nodejs-text.tar.gz
包括测试程序与socket压力工具.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.