( ! ) 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.0008484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.23124096968require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.26364125960include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.26364125960get_header( $name = ???, $args = ??? ).../single.php:10
60.26364126176locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.26364126272load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.26404126816require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.26424134224wp_head( ).../header.php:18
100.26424134224do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.26424134440WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.26424134440WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.26444137856wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.26444137856do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.26444138072WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.26444138072WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.26454139960twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.26474141480wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.26474141480WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.26474141480WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.26474141480_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.26474147432wp_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.26474266968trigger_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.0008484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.23124096968require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.26364125960include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.26364125960get_header( $name = ???, $args = ??? ).../single.php:10
60.26364126176locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.26364126272load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.26404126816require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.26424134224wp_head( ).../header.php:18
100.26424134224do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.26424134440WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.26424134440WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.26444137856wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.26444137856do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.26444138072WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.26444138072WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.26454139960twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.29034268072wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.29034268072WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.29034268072WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.29034268072_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.29044268392wp_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.29044268616trigger_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

mysql的数据压缩性能对比(一)

数据魔方需要的数据,一旦写入就很少或者根本不会更新。这种数据非常适合压缩以降低磁盘占用。MySQL本身提供了两种压缩方式——archive引擎以及针对MyISAM引擎的myisampack方式。今天对这两种方式分别进行了测试,对比了二者在磁盘占用以及查询性能方面各自的优劣。至于为什么做这个,你们应该懂的,我后文还会介绍。且看正文:

1. 测试环境:

  1. 软硬件
  2. 一台 64位 2.6.18-92 内核Linux开发机,4G内存,4个2800Mhz Dual-Core AMD Opteron(tm) Processor 2220 CPU。

    MySQL放在一块7200转SAT硬盘,未做raid;

    MySQL未做任何优化,关闭了query cache,目的在于避免query cache对测试结果造成干扰。

  3. 表结构
  4. 2424753条记录,生产环境某一个分片的实际数据;

    分别建立了(partition_by1,idx_rank) 和 (partition_by1,chg_idx)的联合索引,其中partition_by1为32长度的varchar类型,用于检索;其余两个字段均为浮点数,多用于排序;

    autokid作为子增列,充当PRIMARY KEY,仅作为数据装载时原子性保证用,无实际意义。

2. 测试目的:

  1. 压缩空间对比
  2. 压缩率越大,占用的磁盘空间越小,直接降低数据的存储成本;

  3. 查询性能对比
  4. 压缩后查询性能不应该有显著降低。Archive是不支持索引的,因此性能降低是必然的,那么我们也应该心里有个谱,到底降低了多少,能不能接受。

3. 测试工具:

  1. mysqlslap
  2. 官方的工具当然是不二之选。关于mysqlslap的介绍请参考 官方文档

  3. 测试query
  4. 截取生产环境访问topranks_v3表的实际SQL共9973条,从中抽取访问量较大的7条,并发50,重复执行10次。命令如下:

    ./mysqlslap --defaults-file=../etc/my.cnf -u**** -p**** -c50 -i10 -q ../t.sql --debug-info

4.测试结论

比较项 磁盘空间 耗时(秒) CPU Idle LOAD 并发
基准表(MyISAM) 403956004 2.308 30 15 50
ARCHIVE 75630745 >300 75 4 1
PACK 99302109 2.596 30 22 50

根据上面的表格给出的测试数据,我们简单得出以下结论:

  1. 针对测试表,Archive表占用空间约为之前的18.7%,myisampack后空间占用约为之前的24.6%;二者相差不多,单纯从空间利用情况来看,我们似乎需要选择archive表;
  2. 我们再看查询性能,与基准表进行对比。无论在总耗时还是系统负载方面,50并发下的pack表查询性能与基准表相当;而archive表在单并发情况下耗时超过了5分钟(实在等不了了,kill之)!

那么,我们似乎可以得出结论,针对需要在线查询的表,ARCHIVE引擎基本上可以不考虑了。

在下一篇文章中,我将会详细为什么这个测试过程中ARCHIVE引擎如此地慢。

 

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.