PDA

View Full Version : need help with new dedicated server


Hidjra
Wed 25th Sep '02, 2:38pm
hi,

I just moved over to VO with a dedicated server and have very high server load that slows everything down. i'm a newbie in this (my first dedicated server), what can i do to speed up vb, and reduce the server load.

i'm running vB version 2.2.8 (with a lot of hacks), and 220 simultaneous users online.
I also have persistant connections on, GZIP compression level is 1

i also use phpAdsNew persistant connections on with 90.000 adviews a day

vb is not the only thing on the server, (but no php or mysql)

i run vb on;
a 1.13 GHz Pentium III
1,5 GB SDRAM
18 GB SCSI Hard Drive
RedHat Linux Apache Version 1.3.24
PHP Version 4.2.1
Mysql Version 3.23.45



mysql configuration variables

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=400
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=1M
set-variable = sort_buffer=2M
set-variable = table_cache=1280
set-variable = thread_cache_size=384
set-variable = wait_timeout=9600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[myisamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M



top stats

sometimes the load go's up to 40

11:50am up 5 days, 20:28, 1 user, load average: 28.16, 15.30, 12.99
317 processes: 282 sleeping, 35 running, 0 zombie, 0 stopped
CPU states: 81.3% user, 18.6% system, 0.0% nice, 0.0% idle
Mem: 513660K av, 434820K used, 78840K free, 0K shrd, 10676K buff
Swap: 530104K av, 75876K used, 454228K free 141360K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
5219 mysql 14 0 76644 47M 15536 R 2.5 9.3 1:21 mysqld
10743 mysql 19 0 77724 48M 15536 R 2.4 9.6 1:03 mysqld
18079 mysql 17 0 75664 46M 15536 R 2.4 9.2 0:54 mysqld
17353 nobody 14 0 6872 6196 3512 S 2.4 1.2 0:00 httpd
13815 mysql 20 0 75608 46M 15536 R 2.3 9.1 0:55 mysqld
5156 mysql 14 0 76644 47M 15536 R 2.2 9.3 1:37 mysqld
6363 mysql 14 0 76644 47M 15536 R 2.2 9.3 1:14 mysqld
10732 mysql 20 0 75716 46M 15536 R 2.2 9.2 1:10 mysqld
10750 mysql 14 0 76660 47M 15536 R 2.2 9.3 0:48 mysqld
13824 mysql 15 0 77732 48M 15536 R 2.2 9.6 1:00 mysqld
18080 mysql 15 0 75664 46M 15536 R 2.2 9.2 0:34 mysqld
18084 mysql 14 0 75664 46M 15536 R 2.2 9.2 0:46 mysqld
10741 mysql 15 0 75716 46M 15536 R 2.1 9.2 0:57 mysqld
13847 mysql 18 0 76752 47M 15536 R 2.1 9.4 0:56 mysqld
18042 mysql 19 0 76752 47M 15536 R 2.1 9.4 0:38 mysqld
18052 mysql 17 0 76752 47M 15536 R 2.1 9.4 0:54 mysqld
17416 nobody 20 0 7012 6336 3520 R 2.1 1.2 0:00 httpd
10751 mysql 14 0 76660 47M 15536 R 2.0 9.3 1:12 mysqld
13795 mysql 13 0 76660 47M 15536 S 2.0 9.3 0:55 mysqld
10753 mysql 14 0 76660 47M 15536 R 1.9 9.3 0:56 mysqld
13839 mysql 16 0 76752 47M 15536 R 1.9 9.4 1:00 mysqld
18059 mysql 16 0 76752 47M 15536 R 1.9 9.4 0:52 mysqld
13803 mysql 14 0 76660 47M 15536 R 1.8 9.3 1:09 mysqld
17373 nobody 13 0 7024 6348 3568 S 1.7 1.2 0:01 httpd
17288 root 17 0 1252 1252 828 R 1.6 0.2 0:04 top
17380 nobody 12 0 6848 6172 3572 S 1.6 1.2 0:00 httpd
17421 nobody 18 0 6172 5496 3576 R 1.6 1.0 0:00 httpd
17351 nobody 12 0 6896 6220 3584 S 1.5 1.2 0:01 httpd
17360 nobody 19 0 6748 6072 3568 R 1.4 1.1 0:00 httpd
17362 nobody 14 0 6496 5820 3584 S 1.4 1.1 0:00 httpd
17434 nobody 14 0 6816 6140 3516 S 1.4 1.1 0:00 httpd
17456 nobody 20 0 7168 6492 3560 R 1.4 1.2 0:00 httpd
17343 nobody 18 0 6472 5796 3564 R 1.2 1.1 0:00 httpd
17371 nobody 12 0 7468 6792 3596 S 1.2 1.3 0:00 httpd
17374 nobody 15 0 6000 5324 3576 S 1.2 1.0 0:00 httpd
17382 nobody 10 0 6456 5780 3576 S 1.2 1.1 0:00 httpd
17368 nobody 12 0 6548 5872 3560 S 1.1 1.1 0:00 httpd
17432 nobody 10 0 6704 6028 3576 S 1.1 1.1 0:00 httpd





mysql extended-status

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 11 |
| Aborted_connects | 7 |
| Bytes_received | 638864628 |
| Bytes_sent | 4009204265 |
| Connections | 318850 |
| Created_tmp_disk_tables | 57 |
| Created_tmp_tables | 84381 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 7681 |
| Handler_read_first | 56795 |
| Handler_read_key | 67667591 |
| Handler_read_next | 69571269 |
| Handler_read_prev | 1962 |
| Handler_read_rnd | 10265523 |
| Handler_read_rnd_next | 1166543846 |
| Handler_update | 57064531 |
| Handler_write | 6933430 |
| Key_blocks_used | 15582 |
| Key_read_requests | 42631101 |
| Key_reads | 55275 |
| Key_write_requests | 42117 |
| Key_writes | 33859 |
| Max_used_connections | 162 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 652 |
| Open_files | 644 |
| Open_streams | 0 |
| Opened_tables | 2116 |
| Questions | 2743996 |
| Select_full_join | 4366 |
| Select_full_range_join | 0 |
| Select_range | 148740 |
| Select_range_check | 0 |
| Select_scan | 516280 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 6 |
| Slow_queries | 3544 |
| Sort_merge_passes | 0 |
| Sort_range | 151482 |
| Sort_rows | 12309674 |
| Sort_scan | 106770 |
| Table_locks_immediate | 2445560 |
| Table_locks_waited | 69099 |
| Threads_cached | 91 |
| Threads_created | 163 |
| Threads_connected | 72 |
| Threads_running | 6 |
| Uptime | 72919 |
+--------------------------+------------+



httpd.conf
KeepAlive=on
MaxKeepAliveRequests=100
KeepAliveTimeout=15
MinSpareServers=5
MaxSpareServers=10
StartServers=5
MaxClients=150



php info file
http://forums.marokko.nl/phpinfo.php

Radon3k
Wed 25th Sep '02, 3:04pm
One thing you can do is upgrade to 2.2.8 as it fixes bugs and fixes potential security holes. :)

Hidjra
Wed 25th Sep '02, 3:06pm
Originally posted by Radon3k
One thing you can do is upgrade to 2.2.8 as it fixes bugs and fixes potential security holes. :)


yeah i know LOL, but i have a lot of hacks installed, i'm very lazy :p, i will do it eventually, as soon as i solved the server load problems

hidjra

Hidjra
Fri 4th Oct '02, 6:18am
hi guys,

OK. i upgraded my board to 2.2.8, i even upgraded my ram with 1G to 1,5G, but i'm still getting a very high server load, can anybody help me? :(


11:16am up 15:37, 1 user, load average: 35.36, 27.58, 14.41
313 processes: 295 sleeping, 17 running, 1 zombie, 0 stopped
CPU states: 93.0% user, 6.9% system, 0.0% nice, 0.0% idle
Mem: 1545820K av, 1446208K used, 99612K free, 0K shrd, 53776K buff
Swap: 530104K av, 264K used, 529840K free 985868K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
2678 mysql 9 0 33552 32M 1564 S 0.0 2.1 0:00 mysqld
2645 nobody 17 0 7192 7192 4732 R 1.8 0.4 0:00 httpd
2575 nobody 14 0 7252 7252 4752 S 1.6 0.4 0:01 httpd
2571 nobody 9 0 7480 7480 4716 S 0.0 0.4 0:00 httpd
2564 nobody 9 0 7480 7480 4716 S 0.0 0.4 0:00 httpd
2554 nobody 12 0 0 0 0 Z 0.8 0.0 0:01 httpd <defunct>
2556 nobody 9 0 7088 7088 4772 S 0.0 0.4 0:01 httpd
2544 nobody 11 0 6944 6944 4776 S 0.6 0.4 0:01 httpd
2545 nobody 9 0 6912 6912 4752 S 0.0 0.4 0:00 httpd
2542 nobody 12 0 6576 6576 4700 S 0.5 0.4 0:00 httpd
2537 nobody 13 0 7076 7076 4760 S 1.2 0.4 0:01 httpd
2538 nobody 11 0 7056 7056 4708 S 0.5 0.4 0:00 httpd
2498 nobody 9 0 6484 6484 4668 S 0.0 0.4 0:00 httpd
2411 nobody 12 0 7028 7028 4740 S 23.2 0.4 0:02 httpd
2407 nobody 16 0 7276 7276 4780 R 2.6 0.4 0:01 httpd
2404 nobody 9 0 5596 5596 4652 S 0.0 0.3 0:00 httpd
2398 nobody 17 0 7620 7620 4740 R 1.8 0.4 0:01 httpd
2388 nobody 18 0 7364 7364 4780 R 2.7 0.4 0:02 httpd
2389 nobody 16 0 7828 7828 4752 R 1.6 0.5 0:02 httpd
2390 nobody 16 0 7400 7400 4752 R 2.2 0.4 0:02 httpd
2381 nobody 11 0 7104 7104 4756 S 0.5 0.4 0:01 httpd
2386 nobody 16 0 7176 7176 4784 S 2.1 0.4 0:02 httpd
2372 nobody 9 0 7016 7016 4760 S 0.0 0.4 0:01 httpd
2374 nobody 14 0 7068 7068 4760 S 1.7 0.4 0:01 httpd
2375 nobody 9 0 7084 7084 4756 S 0.0 0.4 0:02 httpd
2361 nobody 11 0 7048 7048 4740 S 1.1 0.4 0:01 httpd
2362 nobody 13 0 6956 6956 4748 S 0.9 0.4 0:01 httpd
2363 nobody 13 0 6892 6892 4768 S 1.1 0.4 0:01 httpd
2358 nobody 11 0 6856 6856 4756 S 1.4 0.4 0:01 httpd
2359 nobody 10 0 6636 6636 4760 S 0.7 0.4 0:01 httpd
2360 nobody 17 0 7452 7452 4788 R 1.3 0.4 0:02 httpd
2350 nobody 18 0 7524 7524 4776 R 1.8 0.4 0:01 httpd
2351 nobody 9 0 7132 7132 4780 S 0.0 0.4 0:02 httpd
2352 nobody 9 0 7024 7024 4772 S 0.1 0.4 0:01 httpd
2348 nobody 17 0 7188 7188 4780 R 1.4 0.4 0:02 httpd
2341 nobody 12 0 7028 7028 4776 S 0.9 0.4 0:02 httpd
2342 nobody 12 0 7056 7056 4776 S 0.5 0.4 0:02 httpd

eva2000
Fri 4th Oct '02, 7:03am
Hi could you please enter your vBulletin.com forum username on the form on this page to receive support for this issue: http://www.vbulletin.com/members/forums.php
- you will need your vB license customer number and password to access this form.

Hidjra
Fri 4th Oct '02, 9:02am
Originally posted by eva2000
Hi could you please enter your vBulletin.com forum username on the form on this page to receive support for this issue: http://www.vbulletin.com/members/forums.php
- you will need your vB license customer number and password to access this form.

Done :)


Hidjra

eva2000
Fri 4th Oct '02, 2:58pm
okay things you can do to improve your performance

1. seeing as adding ram didn't help try upgrading apache to 1.3.26 and upgrading the linux kernel to latest 2.4.x stable release. upgrade mysql to 3.23.52 and php to 4.2.3 (since you're using vB 2.2.8)

2. i also believe phpadsnew has a function to delay/defer query updates for stats, switch that on too

3. can you upload from extras vB zip folder, the mysqlinfo.php page to your /admin/mysqlinfo.php and post the url here

Hidjra
Fri 4th Oct '02, 6:08pm
1. seeing as adding ram didn't help try upgrading apache to 1.3.26 and upgrading the linux kernel to latest 2.4.x stable release. upgrade mysql to 3.23.52 and php to 4.2.3 (since you're using vB 2.2.8)

i'll look into this later

2. i also believe phpadsnew has a function to delay/defer query updates for stats, switch that on too

done

3. can you upload from extras vB zip folder, the mysqlinfo.php page to your /admin/mysqlinfo.php and post the url here

http://forums.marokko.nl/admin/mysqlinfo.php


thnx,
Hidjra

Hidjra
Sun 6th Oct '02, 6:38pm
Originally posted by eva2000
okay things you can do to improve your performance

1. seeing as adding ram didn't help try upgrading apache to 1.3.26 and upgrading the linux kernel to latest 2.4.x stable release. upgrade mysql to 3.23.52 and php to 4.2.3 (since you're using vB 2.2.8)

2. i also believe phpadsnew has a function to delay/defer query updates for stats, switch that on too

3. can you upload from extras vB zip folder, the mysqlinfo.php page to your /admin/mysqlinfo.php and post the url here


i just upgraded everything you mentioned, except voor the linux kernel, there also is a newer version of apache (1.3.27) :)

my mysql info file;
http://forums.marokko.nl/admin/mysqlinfo.php


thnx,
hidjra

eva2000
Mon 7th Oct '02, 12:43am
Originally posted by Hidjra
i just upgraded everything you mentioned, except voor the linux kernel, there also is a newer version of apache (1.3.27) :)

my mysql info file;
http://forums.marokko.nl/admin/mysqlinfo.php


thnx,
hidjra well you can't beat 0 zero load

5:42am up 6:30, 0 users, load average: 0.00, 0.00, 0.00
140 processes: 139 sleeping, 1 running, 0 zombie, 0 stopped
Mem: 1551312K av, 1432496K used, 118816K free, 0K shrd, 37424K buff
Swap: 530104K av, 2008K used, 528096K free 1289748K cached


and mysql stats look fine...

Hidjra
Mon 7th Oct '02, 6:06am
Originally posted by eva2000
well you can't beat 0 zero load

5:42am up 6:30, 0 users, load average: 0.00, 0.00, 0.00
140 processes: 139 sleeping, 1 running, 0 zombie, 0 stopped
Mem: 1551312K av, 1432496K used, 118816K free, 0K shrd, 37424K buff
Swap: 530104K av, 2008K used, 528096K free 1289748K cached


and mysql stats look fine...


as you can see, it was 5 am at that time, how about this one;


11:04am up 11:51, 1 user, load average: 136.76, 59.08, 24.69
235 processes: 67 sleeping, 168 running, 0 zombie, 0 stopped
CPU states: 19.1% user, 1.5% system, 0.5% nice, 78.7% idle
Mem: 1551312K av, 1289552K used, 261760K free, 0K shrd, 50108K buff
Swap: 530104K av, 2792K used, 527312K free 1121416K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
18369 mysql 20 0 21372 20M 1220 R 1.6 1.3 0:00 mysqld
18372 mysql 20 0 21372 20M 1220 R 1.5 1.3 0:00 mysqld
1561 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1562 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1564 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1566 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1568 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1575 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1576 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1589 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:14 mysqld
1602 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1603 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:19 mysqld
1616 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1796 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1802 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1805 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1820 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1824 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1825 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1850 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1852 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:19 mysqld
1854 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1855 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:14 mysqld
1856 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1857 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:19 mysqld
1858 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1869 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1871 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1873 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:16 mysqld
1874 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:15 mysqld
1879 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:19 mysqld
1881 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:15 mysqld
1888 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:18 mysqld
1889 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:21 mysqld
1892 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1893 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:21 mysqld
1894 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld
1895 mysql 20 0 21372 20M 1220 R 1.2 1.3 0:17 mysqld

Raz Meister
Mon 7th Oct '02, 10:37am
I would swtich ALL persistent connections to OFF to reduce server load.

eva2000
Mon 7th Oct '02, 10:54am
yes did you turn pconnects off in config.php ?

eva2000
Mon 7th Oct '02, 10:58am
hmmmm i just got this error on your forums


has already more than 'max_user_connections' active connections


means your my.cnf has max_user_connections set, but the above my.cnf you posted doesn't have that setting which leads me to believe you haven't properly set my.cnf up

as root user type this command and copy and paste output here

mysqladmin -u root -p variables

Hidjra
Mon 7th Oct '02, 12:30pm
Originally posted by eva2000
hmmmm i just got this error on your forums


has already more than 'max_user_connections' active connections


means your my.cnf has max_user_connections set, but the above my.cnf you posted doesn't have that setting which leads me to believe you haven't properly set my.cnf up

as root user type this command and copy and paste output here

mysqladmin -u root -p variables


i changed my.cnf because VO told me so, but it didn't help so i removed the max user setting again, this is my current my.cnf

my.cnf
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=450
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=2M
set-variable = record_buffer=2M
set-variable = sort_buffer=3M
set-variable = table_cache=1280
set-variable = thread_cache_size=384
set-variable = wait_timeout=9600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10

[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[myisamchk]
set-variable = key_buffer=64M
set-variable = sort_buffer=64M
set-variable = read_buffer=16M
set-variable = write_buffer=16M








my variables
| delayed_insert_limit | 100

|
| delayed_insert_timeout | 300

|
| delayed_queue_size | 1000

|
| flush | OFF

|
| flush_time | 0

|
| have_bdb | NO

|
| have_gemini | NO

|
| have_innodb | NO

|
| have_isam | YES

|
| have_raid | NO

|
| have_openssl | NO

|
| init_file |

|
| interactive_timeout | 28800

|
| join_buffer_size | 2093056

|
| key_buffer_size | 16773120

|
| language | /usr/share/mysql/english/

|
| large_files_support | ON

|
| locked_in_memory | OFF

|
| log | OFF

|
| log_update | OFF

|
| log_bin | OFF

|
| log_slave_updates | OFF

|
| log_long_queries | OFF

|
| long_query_time | 10

|
| low_priority_updates | OFF

|
| lower_case_table_names | 0

|
| max_allowed_packet | 16776192

|
| max_binlog_cache_size | 4294967295

|
| max_binlog_size | 1073741824

|
| max_connections | 500

|
| max_connect_errors | 10

|
| max_delayed_threads | 20

|
| max_heap_table_size | 16777216

|
| max_join_size | 4294967295

|
| max_sort_length | 1024

|
| max_user_connections | 150

|
| max_tmp_tables | 32

|
| max_write_lock_count | 4294967295

|
| myisam_max_extra_sort_file_size | 256

|
| myisam_max_sort_file_size | 2047

|
| myisam_recover_options | 0

|
| myisam_sort_buffer_size | 67108864

|
| net_buffer_length | 16384

|
| net_read_timeout | 30

|
| net_retry_count | 10

|
| net_write_timeout | 60

|
| open_files_limit | 0

|
| pid_file | /var/lib/mysql/server.marokko.nl.pid

|
| port | 3306

|
| protocol_version | 10

|
| record_buffer | 2093056

|
| record_rnd_buffer | 2093056

|
| query_buffer_size | 0

|
| safe_show_database | OFF

|
| server_id | 0

|
| slave_net_timeout | 3600

|
| skip_locking | ON

|
| skip_networking | OFF

|
| skip_show_database | OFF

|
| slow_launch_time | 2

|
| socket | /var/lib/mysql/mysql.sock

|
| sort_buffer | 3145720

|
| sql_mode | 0

|
| table_cache | 1280

|
| table_type | MYISAM

|
| thread_cache_size | 384

|
| thread_stack | 65536

|
| transaction_isolation | READ-COMMITTED

|
| timezone | CEST

|
| tmp_table_size | 33554432

|
| tmpdir | /tmp/

|
| version | 3.23.52

|
| wait_timeout | 9600

|
+---------------------------------+---------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------------------------------------------+

Hidjra
Mon 7th Oct '02, 6:45pm
this is the output of my mysqlinfo.php file when the server load is high;


Mon Oct 7 23:42:08 CEST 2002


11:42pm up 10:41, 1 user, load average: 40.88, 28.87, 18.67
503 processes: 502 sleeping, 1 running, 0 zombie, 0 stopped
Mem: 1551312K av, 1296340K used, 254972K free, 0K shrd, 127516K buff
Swap: 530104K av, 0K used, 530104K free 647540K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
15562 nobody 19 0 1352 1348 820 R 16.8 0.0 0:00 top


Http processes currently running = 153
Mysql processes currently running = 302

Netstat information summary
1 FIN_WAIT1
4 FIN_WAIT2
4 SYN_RECV
7 TIME_WAIT
10 CLOSE_WAIT
32 LISTEN
66 ESTABLISHED


+---------------------------+-----------------+
| Variable_name | Value |
+---------------------------+-----------------+
| Aborted_clients | 1212 |
| Aborted_connects | 33 |
| Bytes_received | 219659757 |
| Bytes_sent | 2246253250 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 96248 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 0 |
| Com_delete | 3224 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 1 |
| Com_flush | 2 |
| Com_grant | 0 |
| Com_insert | 5128 |
| Com_insert_select | 249 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 462 |
| Com_replace_select | 10 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 45816 |
| Com_select | 686130 |
| Com_set_option | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 0 |
| Com_show_databases | 8 |
| Com_show_fields | 0 |
| Com_show_grants | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 74 |
| Com_show_slave_status | 0 |
| Com_show_status | 27900 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 14 |
| Com_show_variables | 12 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 183437 |
| Connections | 68447 |
| Created_tmp_disk_tables | 27 |
| Created_tmp_tables | 44148 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 11409 |
| Handler_read_first | 32046 |
| Handler_read_key | 5712767 |
| Handler_read_next | 48601099 |
| Handler_read_prev | 306 |
| Handler_read_rnd | 5681655 |
| Handler_read_rnd_next | 78633148 |
| Handler_update | 180500 |
| Handler_write | 3982478 |
| Key_blocks_used | 10969 |
| Key_read_requests | 25878467 |
| Key_reads | 9881 |
| Key_write_requests | 48174 |
| Key_writes | 42433 |
| Max_used_connections | 295 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 869 | 68% of table_cache in use
| Open_files | 796 |
| Open_streams | 0 |
| Opened_tables | 891 |
| Questions | 1087744 |
| Select_full_join | 26 |
| Select_full_range_join | 0 |
| Select_range | 123697 |
| Select_range_check | 0 |
| Select_scan | 195262 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 11 |
| Slow_queries | 120 | (execution time > 10 secs)
| Sort_merge_passes | 0 |
| Sort_range | 116055 |
| Sort_rows | 6548718 |
| Sort_scan | 55140 |
| Table_locks_immediate | 1005797 |
| Table_locks_waited | 45744 |
| Threads_cached | 23 |
| Threads_created | 296 |
| Threads_connected | 273 |
| Threads_running | 134 |
| Uptime | 21394 | 5 hrs 56 mins 34 secs
+---------------------------+-----------------+


Key Reads/Key Read Requests = 0.000382 (Cache hit = 99.999618%)
Key Writes/Key Write Requests = 0.880828
Connections/second = 3.199 (/hour = 11517.678)
KB received/second = 10.027 (/hour = 36096.083)
KB sent/second = 98.025 (/hour = 352890.698)
Temporary Tables Created/second = 2.064 (/hour = 7428.849)
Opened Tables/second = 0.042 (/hour = 149.930)
Slow Queries/second = 0.006 (/hour = 20.193)
% of slow queries = 0.011%
Queries/second = 50.843 (/hour = 183036.291)

eva2000
Tue 8th Oct '02, 5:20am
i'd try removing zend optimiser and installing php accelerator 1.3.3 http://i4net.tv/marticle/get.php?action=getarticle&articleid=31

and you did turn off usepconnect = 0 right ?

Hidjra
Tue 8th Oct '02, 5:35am
Originally posted by eva2000
i'd try removing zend optimiser and installing php accelerator 1.3.3 http://i4net.tv/marticle/get.php?action=getarticle&articleid=31

and you did turn off usepconnect = 0 right ?

hi,

no i did'nt turn of persistant connections, because i et this error message;
Warning: mysql_query(): 1 is not a valid MySQL-Link resource in /home/****/public_html/forums/admin/db_mysql.php on line 93

i don't know if this has something to do with php 4.2.3??

thnx,
hidjra

eva2000
Tue 8th Oct '02, 8:10am
you sure you changed it to

$usepconnect = 0;
in config.php ?

Hidjra
Tue 8th Oct '02, 8:15am
Originally posted by eva2000
you sure you changed it to

$usepconnect = 0;
in config.php ?


yes i did turn it off after removing this function that includes banners from the phpadsnew database;

require('/home/***/public_html/ads/phpadsnew.inc.php');
$ads_array=view_raw('forum,_468x60,all,_468x60', 0, '_blank', '', '0');
$ads_chat=view_raw('chat,_468x60,all,_468x60', 0, '_blank', '', '0');

but the load is still *very* high

1:14pm up 1:21, 1 user, load average: 56.01, 32.35, 30.23
359 processes: 326 sleeping, 33 running, 0 zombie, 0 stopped
CPU states: 97.2% user, 2.7% system, 0.0% nice, 0.0% idle
Mem: 1551312K av, 679688K used, 871624K free, 0K shrd, 44556K buff
Swap: 530104K av, 0K used, 530104K free 210652K cached

and i only have 200 user online right now.

When i turn off vbulletin the load immediately go's down to 0.5 or lower. I really don't know what to do anymore, i'm seriously considering going back to a non mysql based forum, but i realy love the functions vbulletin offers :(

aaargggghh :confused:

hidjra

Raz Meister
Tue 8th Oct '02, 2:14pm
Check your logs and see what page is getting hammered. Then make sure that file is fully optimized.

eva2000
Tue 8th Oct '02, 2:58pm
could you submit a ticket at http://vbulletin.com/members/support.php with your server telnet/ssh log in details, root server password and root mysql password so i can take alook in the server myself

Hidjra
Tue 8th Oct '02, 3:47pm
Originally posted by eva2000
could you submit a ticket at http://vbulletin.com/members/support.php with your server telnet/ssh log in details, root server password and root mysql password so i can take alook in the server myself

hi,

just did

thnx,
hidjra