再来看一下HandlerSocket测试的时候oprofile的输出:
samples %app namesymbol name984785 5.9118 bnx2/bnx2847486 5.0876 ha_innodb_plugin.so.0.0.0 ut_delay545303 3.2735 ha_innodb_plugin.so.0.0.0 btr_search_guess_on_hash317570 1.9064 ha_innodb_plugin.so.0.0.0 row_search_for_mysql298271 1.7906 vmlinuxtcp_ack291739 1.7513 libc-2.5.sovfprintf264704 1.5891 vmlinux.text.super_90_sync248546 1.4921 vmlinuxblk_recount_segments244474 1.4676 libc-2.5.so_int_malloc226738 1.3611 ha_innodb_plugin.so.0.0.0 _ZL14build_templateP19row_prebuilt_structP3THDP8st_tablej206057 1.2370 HandlerSocket.sodena::hstcpsvr_worker::run_one_ep()183330 1.1006 ha_innodb_plugin.so.0.0.0 mutex_spin_wait175738 1.0550 HandlerSocket.sodena::dbcontext::cmd_find_internal(dena::dbcallback_i&, dena::prep_stmt const&, ha_rkey_function, dena::cmd_exec_args const&)169967 1.0203 ha_innodb_plugin.so.0.0.0 buf_page_get_known_nowait165337 0.9925 libc-2.5.somemcpy149611 0.8981 ha_innodb_plugin.so.0.0.0 row_sel_store_mysql_rec148967 0.8943 vmlinuxgeneric_make_request
大部分的CPU用在了网络数据包的处理,取出数据,等。
排在首位的bnx2是网卡驱动程序。
由于HandlerSocket只是一个插件,最终还会调用innodb引擎的函数去取数据,
所以我们仍然可以使用mysql命令来获取到统计数据。
$ mysqladmin extended-status -uroot -i 1 -r -p| grep “InnoDB_rows_read”
…
| Innodb_rows_read | 750192 |
| Innodb_rows_read | 751510 |
| Innodb_rows_read | 757558 |
| Innodb_rows_read | 747060 |
| Innodb_rows_read | 748474 |
| Innodb_rows_read | 759344 |
| Innodb_rows_read | 753081 |
| Innodb_rows_read | 754375 |
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-27116-6.html
那个愿意搞个合娶
我TMD也是醉了
如果连自己的领海都能让人随便入侵