- 论坛徽章:
- 0
|
环境1:SunOS 5.10 Generic sun4v sparc sun4v
32cpu,16G内存
环境2:SunOS 5.10 Generic sun4us sparc FJSV,GPUZC-M
2cpu,8G内存
mysql都是5.0.51,应用主要就一张表,在环境1上,表数据也只有2-6w条记录左右,当数据量增多时,用profiles分析明显变慢。在环境2上,做同样的测试,数据量增多,并没有怎么变慢。
同样环境下profiles分析
环境1:
seq state duration cpu_user cpu_system source_function
0 (initialization) 0.000016 0.000007 0.000009 send_result_to_client
1 checking query cache for query 0.000252 0.000245 0.000008 open_tables
2 Opening tables 0.000035 0.000023 0.000012 mysql_lock_tables
3 System lock 0.000021 0.000012 0.00001 mysql_lock_tables
4 Table lock 0.0001497 0.00014 0.000009 mysql_select
5 init 0.0001437 0.000134 0.00001 optimize
6 optimizing 0.000084 0.000072 0.000012 optimize
7 statistics 0.0012422 0.001232 0.00001 optimize
8 preparing 0.000109 0.000098 0.000012 exec
9 executing 0.0000235 0.000012 0.000011 exec
10 Sending data 0.000181 0.000148 0.000033 mysql_select
11 end 0.0000237 0.000012 0.000011 mysql_execute_command
12 query end 0.000019 0.00001 0.000009 query_cache_end_of_result
13 storing result in query cache 0.0000245 0.000016 0.000008 mysql_parse
14 freeing items 0.0000545 0.000046 0.000009 dispatch_command
15 closing tables 0.0000252 0.000015 0.00001 log_slow_statement
16 logging slow query 0.0000175 0.000009 0.000009 dispatch_command
环境2:
seq state duration cpu_user cpu_system source_function
0 (initialization) 0.0000032 0.000003 0.000001 send_result_to_client
1 checking query cache for query 0.00022 0.000219 0.000001 open_tables
2 Opening tables 0.000021 0.000019 0.000002 mysql_lock_tables
3 System lock 0.0000092 0.000008 0.000001 mysql_lock_tables
4 Table lock 0.000083 0.000082 0.000001 mysql_select
5 init 0.0001307 0.000095 0.000036 optimize
6 optimizing 0.0000487 0.000048 0.000001 optimize
7 statistics 0.0005075 0.000451 0.000057 optimize
8 preparing 0.0000527 0.00005 0.000002 exec
9 executing 0.0000062 0.000005 0.000001 exec
10 Sending data 0.000164 0.000088 0.000076 mysql_select
11 end 0.0000062 0.000005 0.000002 mysql_execute_command
12 query end 0.0000042 0.000003 0.000001 query_cache_end_of_result
13 storing result in query cache 0.0000057 0.000005 0.000001 mysql_parse
14 freeing items 0.0000225 0.000021 0.000001 dispatch_command
15 closing tables 0.0000087 0.000008 0.000001 log_slow_statement
16 logging slow query 0.0000032 0.000002 0.000001 dispatch_command
好像环境2的比环境1的快1个数据量级别,好像多cpu下比单cpu运行慢很多,有经验的大侠帮忙分析下。 |
|