UBB.Dev
Posted By: sigridsholm compare show status of mysql load - 08/28/2001 10:46 AM
I don´t know if this will help me or any other having problems with heavy load on their server when getting 150-200 user in the last ten minutes.
But I thought maybe you could have a look and maybe advice on anything that might solve the problem.
I am running php 5.4.3 NOT using persistent connections.
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 10:47 AM
Before heavy load:

Aborted_clients 56
Aborted_connects 1
Bytes_received 389346528
Bytes_sent 1375472161
Connections 158394
Created_tmp_disk_tables 6539
Created_tmp_tables 19257
Created_tmp_files 2
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 24443
Handler_read_first 4260
Handler_read_key 1483910
Handler_read_next 94073353
Handler_read_prev 157289
Handler_read_rnd 11310281
Handler_read_rnd_next 9494203
Handler_update 378067
Handler_write 202534
Key_blocks_used 15582
Key_read_requests 20861751
Key_reads 11805
Key_write_requests 384862
Key_writes 213963
Max_used_connections 9
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 72
Open_files 123
Open_streams 0
Opened_tables 108
Questions 2060300
Select_full_join 0
Select_full_range_join 0
Select_range 14733
Select_range_check 0
Select_scan 152278
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 0
Slow_queries 0
Sort_merge_passes 1
Sort_range 355548
Sort_rows 11179990
Sort_scan 125068
Table_locks_immediate 1763016
Table_locks_waited 1097
Threads_cached 8
Threads_created 10
Threads_connected 2
Threads_running 1
Uptime 143356
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 10:49 AM
During heavy load:

Aborted_clients 294
Aborted_connects 10
Bytes_received 390625190
Bytes_sent 1382102425
Connections 159231
Created_tmp_disk_tables 6556
Created_tmp_tables 19332
Created_tmp_files 2
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 24603
Handler_read_first 4263
Handler_read_key 1488652
Handler_read_next 94369039
Handler_read_prev 157289
Handler_read_rnd 11334169
Handler_read_rnd_next 9518188
Handler_update 379065
Handler_write 203208
Key_blocks_used 15582
Key_read_requests 20922246
Key_reads 11820
Key_write_requests 386038
Key_writes 214331
Max_used_connections 158
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 329
Open_files 380
Open_streams 0
Opened_tables 365
Questions 2067117
Select_full_join 0
Select_full_range_join 0
Select_range 14747
Select_range_check 0
Select_scan 152569
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 47
Slow_queries 1216
Sort_merge_passes 1
Sort_range 357357
Sort_rows 11203444
Sort_scan 125289
Table_locks_immediate 1767966
Table_locks_waited 1725
Threads_cached 0
Threads_created 233
Threads_connected 134
Threads_running 83
Uptime 144634
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 10:51 AM
After I closed the forums and got back to nomal and got them opened again.

Aborted_clients 1124
Aborted_connects 124
Bytes_received 392028486
Bytes_sent 1384679756
Connections 161101
Created_tmp_disk_tables 6598
Created_tmp_tables 19522
Created_tmp_files 2
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 24778
Handler_read_first 4279
Handler_read_key 1494124
Handler_read_next 94512614
Handler_read_prev 157289
Handler_read_rnd 11339931
Handler_read_rnd_next 9538562
Handler_update 379413
Handler_write 203932
Key_blocks_used 15582
Key_read_requests 20973650
Key_reads 11836
Key_write_requests 387325
Key_writes 214664
Max_used_connections 200
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 456
Open_files 507
Open_streams 0
Opened_tables 492
Questions 2076167
Select_full_join 0
Select_full_range_join 0
Select_range 14769
Select_range_check 0
Select_scan 153018
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 189
Slow_queries 3117
Sort_merge_passes 1
Sort_range 357585
Sort_rows 11209066
Sort_scan 125516
Table_locks_immediate 1772751
Table_locks_waited 3338
Threads_cached 14
Threads_created 892
Threads_connected 2
Threads_running 2
Uptime 148983
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 10:59 AM
I then tried with persistant connections instead, the values are a bit different but I got the same problem between 150-200 users.
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 11:01 AM
Before heavy load with persistant connections:

Aborted_clients 4249
Aborted_connects 427
Bytes_received 1356347734
Bytes_sent 425361591
Connections 546385
Created_tmp_disk_tables 20356
Created_tmp_tables 63937
Created_tmp_files 12
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 90623
Handler_read_first 13666
Handler_read_key 5149332
Handler_read_next 348951037
Handler_read_prev 619425
Handler_read_rnd 37825237
Handler_read_rnd_next 32085378
Handler_update 1269279
Handler_write 750241
Key_blocks_used 15582
Key_read_requests 74296540
Key_reads 14892
Key_write_requests 1377478
Key_writes 742604
Max_used_connections 200
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 512
Open_files 550
Open_streams 0
Opened_tables 939
Questions 7114658
Select_full_join 5
Select_full_range_join 0
Select_range 53600
Select_range_check 0
Select_scan 503468
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 572
Slow_queries 8576
Sort_merge_passes 6
Sort_range 1279957
Sort_rows 37382300
Sort_scan 416241
Table_locks_immediate 6069365
Table_locks_waited 13717
Threads_cached 4
Threads_created 2384
Threads_connected 48
Threads_running 1
Uptime 503090
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 11:03 AM
During heavy load with persistant connections:

Aborted_clients 4363
Aborted_connects 428
Bytes_received 1357483559
Bytes_sent 428670182
Connections 546616
Created_tmp_disk_tables 20377
Created_tmp_tables 64001
Created_tmp_files 12
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 90743
Handler_read_first 13682
Handler_read_key 5153971
Handler_read_next 349276342
Handler_read_prev 619425
Handler_read_rnd 37845287
Handler_read_rnd_next 32104052
Handler_update 1270317
Handler_write 750868
Key_blocks_used 15582
Key_read_requests 74358748
Key_reads 14892
Key_write_requests 1378717
Key_writes 743332
Max_used_connections 200
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 512
Open_files 550
Open_streams 0
Opened_tables 940
Questions 7120554
Select_full_join 5
Select_full_range_join 0
Select_range 53660
Select_range_check 0
Select_scan 503668
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 581
Slow_queries 8634
Sort_merge_passes 6
Sort_range 1281215
Sort_rows 37401963
Sort_scan 416362
Table_locks_immediate 6074381
Table_locks_waited 13997
Threads_cached 0
Threads_created 2433
Threads_connected 95
Threads_running 71
Uptime 503452
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 11:05 AM
A bit later during heavy load using persistant connections:

Aborted_clients 4438
Aborted_connects 428
Bytes_received 1357652436
Bytes_sent 429237041
Connections 546704
Created_tmp_disk_tables 20378
Created_tmp_tables 64007
Created_tmp_files 12
Delayed_insert_threads 0
Delayed_writes 0
Delayed_errors 0
Flush_commands 1
Handler_delete 90814
Handler_read_first 13682
Handler_read_key 5154628
Handler_read_next 349302619
Handler_read_prev 619425
Handler_read_rnd 37846480
Handler_read_rnd_next 32104941
Handler_update 1270657
Handler_write 750975
Key_blocks_used 15582
Key_read_requests 74365849
Key_reads 14892
Key_write_requests 1379038
Key_writes 743455
Max_used_connections 200
Not_flushed_key_blocks 0
Not_flushed_delayed_rows 0
Open_tables 512
Open_files 550
Open_streams 0
Opened_tables 940
Questions 7121537
Select_full_join 5
Select_full_range_join 0
Select_range 53661
Select_range_check 0
Select_scan 503686
Slave_running OFF
Slave_open_temp_tables 0
Slow_launch_threads 585
Slow_queries 8729
Sort_merge_passes 6
Sort_range 1281301
Sort_rows 37403091
Sort_scan 416369
Table_locks_immediate 6074785
Table_locks_waited 14369
Threads_cached 4
Threads_created 2440
Threads_connected 87
Threads_running 79
Uptime 503717
Posted By: sigridsholm Re: compare show status of mysql load - 08/28/2001 11:23 AM
It seemes like when I use persistant connections I get a lot of Aborted_clients
It also have about 40 Threads_connected when having about 100 users on.

The heavy load both with persistent connections and not seemes to happen when the value for Threads_running goes up to 50-100 in just seconds.

Anyone having any idea.
I have been using wwwthreads this summer and I can´t continue to use it if it can´t handle more users.

I have removed the "new-tags" from categories.php and wwwthreads.php I have splitted the the usertables in the database from posttables, I changed from perl to php.
I changeed to showing threads from the last days or the last week.
The modifications have made the forums faster than before, I think, but when you reach 150-200 users it still gets really slow.

I have been thinking of trying Postgresql instead of mysql but I don´t know if that would solve my problem, and I don´t know if it is easy to move the information from mysql to postgresql?
Posted By: Rick Re: compare show status of mysql load - 08/28/2001 3:16 PM
There are 2 scripts that can be responsible for a large portion of the queries. If any of your users are viewing the postlist script in expanded mode this will end up creating a large number of queries. showthreaded also has this as well as it needs to do all the queries for all the replies.

Unfortunately there are only so many tweaks you can make to mysql or the scripts to improve performance. Normally when it gets to a certain point the server itself becomes the bottleneck to keep up with that many users.

What you really need to run is something like top when the server is under normal load and under heavy load. This will give you alot of info on what is slowing the system down. It could be that it is starting to swap memory, which means that memory is an issue. It could be that certain processes are taking up all of the CPU time. top is one of the most valuable tools you can use when the system starts to slow down.
© UBB.Developers