Large vB, Optimization Request

  • I've recently got a dedicated server but I'm not entirely happy with its performance. Most times it is ok but sometimes i get connections refused etc. I am certain the server is not overloaded, as the sites on it are not huge.

    Anyway, if anyone can spot anything out of the order in the following then advice would really be appreciated.


    1. this is dedicated server
    2. your server specs.:

    cpu speed/type single or dual cpus): Pentium IV 2.8ghz
    how much memory installed: 2GB ram
    hard drive type/configuration: 2x80GB IDE non raid
    linux distributor : Red Hat Enterprise Linux
    apache/IIS version: apache 1.3.31
    PHP version: php 4.3.8
    MySQL version: mysql 4.0.20


    3. not sure what innodb tables are
    4. if possible how mysql was compiled/installed
    /scripts/easyapache/cpanel

    5. your top stats

    15:25:09 up 5:26, 1 user, load average: 21.84, 21.43, 25.21
    346 processes: 338 sleeping, 6 running, 1 zombie, 1 stopped
    CPU states: cpu user nice system irq softirq iowait idle
    total 88.5% 0.0% 11.4% 0.0% 0.0% 0.0% 0.0%
    Mem: 2060824k av, 1040740k used, 1020084k free, 0k shrd, 56864k buff
    182464k active, 740364k inactive
    Swap: 1012084k av, 0k used, 1012084k free 344160k cached
    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    2922 root 16 0 11208 10M 10516 S 87.5 0.5 30:08 0 httpd
    28367 mysql 15 0 56184 54M 2044 S 10.1 2.7 7:28 0 mysqld
    4951 root 18 0 1460 1460 892 R 3.3 0.0 0:05 0 top
    1 root 16 0 428 428 372 S 0.0 0.0 0:05 0 init
    2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
    3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd
    4 root 34 19 0 0 0 RWN 0.0 0.0 0:00 0 ksoftirqd/0
    6 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
    5 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd
    7 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated
    8 root 21 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd
    12 root 15 0 0 0 0 SW 0.0 0.0 0:03 0 kjournald
    515 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
    943 root 15 0 572 572 496 R 0.0 0.0 0:00 0 syslogd
    947 root 16 0 392 392 332 S 0.0 0.0 0:00 0 klogd
    1017 nobody 15 0 2064 2060 1848 S 0.0 0.0 0:00 0 proftpd
    1027 root 16 0 656 656 476 S 0.0 0.0 0:00 0 smartd
    1914 root 15 0 3304 3304 1784 S 0.0 0.1 0:00 0 chkservd
    2203 root 15 0 612 612 548 S 0.0 0.0 0:00 0 crond
    3228 mailnull 16 0 11328 11M 9552 S 0.0 0.5 0:00 0 MailScanner
    3357 dbus 18 0 820 820 728 S 0.0 0.0 0:00 0 dbus-daemon-1
    3403 root 15 0 484 484 424 S 0.0 0.0 0:00 0 portsentry
    3488 root 18 0 356 356 304 S 0.0 0.0 0:00 0 mingetty
    3489 root 16 0 356 356 304 S 0.0 0.0 0:00 0 mingetty
    3490 root 16 0 356 356 304 S 0.0 0.0 0:00 0 mingetty
    3491 root 16 0 356 356 304 S 0.0 0.0 0:00 0 mingetty
    3492 root 16 0 356 356 304 S 0.0 0.0 0:00 0 mingetty
    3493 root 16 0 352 352 304 S 0.0 0.0 0:00 0 mingetty
    3571 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 loop0
    3579 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
    5907 mailnull 16 0 1564 1564 1344 S 0.0 0.0 0:00 0 exim


    6. my mysql configuration variables located at /etc/my.cnf

    [mysqld]
    port = 3306
    socket=/var/lib/mysql/mysql.sock
    skip-locking
    max_connections = 500
    key_buffer = 16M
    myisam_sort_buffer_size = 64M
    join_buffer = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache = 64
    wait_timeout = 28800
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 32M
    query_cache_type = 1
    record_buffer = 2M
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [mysql]
    no-auto-rehash
    [isamchk]
    key_buffer = 256M
    sort_buffer_size = 256M
    read_buffer = 2M
    write_buffer = 2M
    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    [mysqlhotcopy]
    interactive-timeout

    7. your mysql extended-status
    url: http://noblecare.net/extended-status.php (http://67.18.182.93/mysql_extended.php)


    Fri Aug 6 09:35:19 ICT 2004


    09:35:20 up 14:34, 1 user, load average: 2.13, 2.55, 2.54
    171 processes: 137 sleeping, 5 running, 29 zombie, 0 stopped
    total 68.8% 0.0% 31.1% 0.0% 0.0% 0.0% 0.0%
    Mem: 2060824k av, 584224k used, 1476600k free, 0k shrd, 101096k buff
    311656k active, 196040k inactive
    Swap: 1012084k av, 18164k used, 993920k free 238408k cached

    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    31197 nobody 17 0 1280 1280 888 R 8.1 0.0 0:00 0 top


    Http processes currently running = 27
    Mysql processes currently running = 54

    Netstat information summary
    1 SYN_SENT
    2 LAST_ACK
    29 FIN_WAIT1
    29 LISTEN
    64 SYN_RECV
    137 FIN_WAIT2
    152 ESTABLISHED
    284 TIME_WAIT

    8. oh and is your vB the only thing on the server? or other scripts? sites?
    several html sites, less than 10 gig per month, phpbb scripts (2 forum with 20 user online),

    9. how many average and max concurrent users on your vB forum ? and what your cookie timeout is ?

    Avg: 750 users
    Max: 1100 users
    Cookie Timeout: 600


    10. phpinfo

    http://noblecare.net/info.php


    11. httpd.conf

    KeepAlive on

    MaxKeepAliveRequests 100

    KeepAliveTimeout 15

    MinSpareServers 5

    MaxSpareServers 10

    StartServers 5

    MaxClients 450

    12. what version of vB are you running ?
    vB 3.0.0

    vB database about 200MB

    Optimization help please


  • maybe my server runing with 10MBP/S Port , and server load very slow with 650 users online.
    if my server as below, this server support how many users?
    Server:Dual Xeon 2.8 GHz - Primary HDD:80GB Hard DriveSecondary HDD:80GB Hard DriveRAM:ECC Registered 2048 MB RAM
    Bandwidth:2000 GB Bandwidth Uplink Port Speed:100 Mbps Uplink

    Thanks for your help.


  • hi your http://noblecare.net/extended-status.php seems to be down...

    with that many users you might need to go dual cpu servers at least maybe even 2x dual cpu servers, but i won't know for sure until i see the mysql extended-status output for a good 2-5 days of output or a snapshot at forum peak times


  • Hi Eva!

    becase my server die again, this is info mysql extended-status

    Sat Aug 7 08:31:13 ICT 2004


    08:31:14 up 24 min, 1 user, load average: 2.11, 1.77, 1.33
    112 processes: 109 sleeping, 2 running, 0 zombie, 1 stopped
    total 51.9% 0.0% 10.5% 0.0% 0.0% 0.0% 37.5%
    Mem: 2060824k av, 465796k used, 1595028k free, 0k shrd, 36788k buff
    117644k active, 222216k inactive
    Swap: 1012084k av, 0k used, 1012084k free 165644k cached

    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    24591 nobody 16 0 1232 1232 888 R 1.9 0.0 0:00 0 top


    Http processes currently running = 18
    Mysql processes currently running = 33

    Netstat information summary
    2 CLOSE_WAIT
    7 CLOSING
    10 FIN_WAIT1
    11 SYN_RECV
    17 FIN_WAIT2
    29 LISTEN
    78 ESTABLISHED
    334 TIME_WAIT


    you can see here
    http://67.18.182.93/mysql_extended.php

    right now, forum have 310 users online.

    PS: i have change MaxClients 450 to 200.


  • yup definitely from the looks of those stats, you need to split to 2 servers both dual cpus one for web server and one for database server


  • you mean single P4 2.8ghz xeon with 2GB ram and 80 EIDE hdds ? if so you should be able to handle vB by itself with 350-500 vb users based on 900 second cookie timeout where member to guest ratio is 80/20 but that is a very rough estimate since vB users online can be misleading

    You should look at the max_used_connections in mysql extended-status which resets each time you restart mysql or flush-tables in mysql. Once you approach 250-350 max_used_connections dual cpus would be recommended, once you consitently get over 400-500 max_used_connections start looking at 2 servers and splitting web/db servers loads

    can you post the output you get from this command in ssh telnet as root user

    mysqladmin -u root -p extended-status


  • from looks of it upgrade to dual p4 2.8ghz xeon cpus with 2GB ram would help some


  • this is url for mysqladmin -u root -p extended-status
    http://67.18.182.93/extended-status.php
    right now, max_used_connections =70

    08:30:59 up 2 days, 24 min, 1 user, load average: 2.77, 2.38, 2.34
    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    9282 nobody 18 0 1304 1304 888 R 16.3 0.0 0:00 0 top
    Mon Aug 9 08:30:59 ICT 2004
    +--------------------------+------------+
    Variable_name Value
    +--------------------------+------------+
    Aborted_clients 3585
    Aborted_connects 25
    Bytes_received 2085017507
    Bytes_sent 22911012
    Com_admin_commands 0
    Com_alter_table 0
    Com_analyze 0
    Com_backup_table 0
    Com_begin 0
    Com_change_db 728279
    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 1
    Com_delete 14574
    Com_delete_multi 0
    Com_drop_db 0
    Com_drop_function 0
    Com_drop_index 0
    Com_drop_table 3
    Com_flush 42
    Com_grant 20
    Com_ha_close 0
    Com_ha_open 0
    Com_ha_read 0
    Com_insert 57766
    Com_insert_select 511
    Com_kill 0
    Com_load 0
    Com_load_master_data 0
    Com_load_master_table 0
    Com_lock_tables 1141
    Com_optimize 0
    Com_purge 0
    Com_rename_table 0
    Com_repair 0
    Com_replace 9799
    Com_replace_select 0
    Com_reset 0
    Com_restore_table 0
    Com_revoke 0
    Com_rollback 0
    Com_savepoint 0
    Com_select 2367150
    Com_set_option 893
    Com_show_binlog_events 0
    Com_show_binlogs 0
    Com_show_create 893
    Com_show_databases 46
    Com_show_fields 910
    Com_show_grants 79
    Com_show_keys 9
    Com_show_logs 0
    Com_show_master_status 0
    Com_show_new_master 0
    Com_show_open_tables 0
    Com_show_processlist 488
    Com_show_slave_hosts 0
    Com_show_slave_status 0
    Com_show_status 2
    Com_show_innodb_status 0
    Com_show_tables 1014
    Com_show_variables 28
    Com_slave_start 0
    Com_slave_stop 0
    Com_truncate 0
    Com_unlock_tables 1141
    Com_update 774218
    Connections 729163
    Created_tmp_disk_tables 337
    Created_tmp_tables 89244
    Created_tmp_files 0
    Delayed_insert_threads 0
    Delayed_writes 0
    Delayed_errors 0
    Flush_commands 1
    Handler_commit 0
    Handler_delete 79231
    Handler_read_first 237363
    Handler_read_key 80798614
    Handler_read_next 19619828
    Handler_read_prev 5099174
    Handler_read_rnd 35076339
    Handler_read_rnd_next 1280566951
    Handler_rollback 0
    Handler_update 815483
    Handler_write 25841461
    Key_blocks_used 13683
    Key_read_requests 179109100
    Key_reads 12432
    Key_write_requests 152392
    Key_writes 122332
    Max_used_connections 70
    Not_flushed_key_blocks 0
    Not_flushed_delayed_rows 0
    Open_tables 566
    Open_files 1019
    Open_streams 0
    Opened_tables 786
    Questions 8161640
    Qcache_queries_in_cache 8609
    Qcache_inserts 2365279
    Qcache_hits 3475301
    Qcache_lowmem_prunes 334
    Qcache_not_cached 1862
    Qcache_free_memory 13444304
    Qcache_free_blocks 3688
    Qcache_total_blocks 21267
    Rpl_status NULL
    Select_full_join 101
    Select_full_range_join 0
    Select_range 420370
    Select_range_check 0
    Select_scan 611539
    Slave_open_temp_tables 0
    Slave_running OFF
    Slow_launch_threads 5
    Slow_queries 7
    Sort_merge_passes 0
    Sort_range 542271
    Sort_rows 36590752
    Sort_scan 347820
    Table_locks_immediate 6775956
    Table_locks_waited 1809
    Threads_cached 56
    Threads_created 71
    Threads_connected 9
    Threads_running 1
    Uptime 146220
    +--------------------------+------------+


  • well i still can't load the pages but from what you tell me 600 av and 1100 max, you will need to move to dual p4 2.8ghz - 3.06ghz xeons with 2GB ram at least

    try reducing maxclients in httpd.conf from 450 to 200 and restart apache so as to let less concurrent visitors in on your server for now


  • Hi Eva!

    sorry, i have problem with DNS, and domain do not work.
    this is links extended-status.php and phpinfo:
    http://67.18.182.93/info.php
    http://67.18.182.93/mysql_extended.php

    this forum, Average concurent users - 600. Peak times around 950-1100
    and right now, forum load very slow, sometimes mysql service offline, and i have to restart mysql by manual (Sim report mysql online)

    thanks for your help.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Large vB, Optimization Request , Please add it free.
    inserito da admin il 14 March 2010

    category

    archivies

    others