POLALA.COM
welcome to my space
X
Web Design | Video Games | RVs | Religion | Management | Supplements and Vitamins | Software | Basketball | Related articles
Welcome to:polala.com
Search:  
NAVIGATION - HOME

Server has slow performance

Published by: jack 2009-01-09

  • I am experiencing very high CPU usage and ram usage on my dedicated server. Can you please recommend a server setup based on the results below? Thanks.

    1. shared server
    2. Processor: 2 Opteron 246 2.0Ghz
    Ram: 2GB
    HDD: 400gb PATA non raid
    Linux distro: CentOS 4.6 i386
    Apache version: 2.0.63
    Php version: 4.3.11
    MySQL version: 4.1.20

    3. 3.6.7
    4. no
    5. mysql-4.1.20-3.RHEL4.1.el4_6.1 rpm package as part of interworx panel install

    6.top - 16:49:31 up 21 days, 23:40, 2 users, load average: 0.32, 0.64, 0.69
    Tasks: 135 total, 1 running, 134 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.5% us, 0.3% sy, 0.0% ni, 99.0% id, 0.2% wa, 0.0% hi, 0.0% si
    Mem: 2074364k total, 1791680k used, 282684k free, 45688k buffers
    Swap: 3542324k total, 121784k used, 3420540k free, 1306028k cached

    7.[root@vhost1 public_html]# cat /etc/my.cnf

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    old_passwords=1
    max_connections=1000
    max_connect_errors=10
    connect_timeout=5
    wait_timeout=28800
    key_buffer_size=8384512
    sort_buffer_size=2097144
    read_buffer_size=131072
    max_allowed_packet=1048576
    thread_cache_size=0
    table_cache=64
    query_cache_limit=1048576
    query_cache_size=0
    long_query_time = 10
    log-slow-queries=slow-queries.log


    [mysql.server]
    user=mysql
    basedir=/var/lib
    [mysqld_safe]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid

    8. http://208.122.50.50/~darthead/mysql.txt
    9. no
    10. 500+ users at a time, cookie time out is daily.
    11. http://208.122.50.50/~darthead/php.php
    12. KeepAlive off
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    MinSpareServers 5
    MaxSpareServers 10
    StartServers 5
    MaxClients 256
    MaxRequestsPerChild 500

    13. none
    14.[root@vhost1 conf]# uname -a
    Linux vhost1 2.6.9-67.0.15.ELsmp #1 SMP Thu May 8 10:52:19 EDT 2008 i686 athlon i386 GNU/Linux

    [root@vhost1 conf]# ulimit -aH
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    pending signals (-i) 1024
    max locked memory (kbytes, -l) 32
    max memory size (kbytes, -m) unlimited
    Speed Up Your Site! 8 ASP.NET Performance Tips::
    Is your latest ASP.NET application Web 2.0 or Web Two-Dot-Slow? servers to your web farm, but eventually you will need to deal with your slow queries.
    http://www.sitepoint.com/print/aspnet-performance-tips/
    HOME
    open files (-n) 1024
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    stack size (kbytes, -s) unlimited
    cpu time (seconds, -t) unlimited
    max user processes (-u) 32759
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

    [root@vhost1 conf]# cat /proc/cpuinfo
    processor : 0
    vendor_id : AuthenticAMD
    SQL Server Universe.com::
    for slow performance, optimizing the stored procedures for performance is very important. SQL Server has some other methods too.
    http://sqlserveruniverse.com/content/PERF0600104282008MeasceOfStoredProcedures.aspx
    HOME
    cpu family : 15
    model : 5
    model name : AMD Opteron(tm) Processor 246
    stepping : 8
    cpu MHz : 1994.227
    cache size : 1024 KB
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 1
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 pni syscall nx mmxext lm 3dnowext 3dnow
    bogomips : 3991.25

    processor : 1
    vendor_id : AuthenticAMD
    cpu family : 15
    model : 5
    model name : AMD Opteron(tm) Processor 246
    stepping : 8
    cpu MHz : 1994.227
    cache size : 1024 KB
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 1
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 pni syscall nx mmxext lm 3dnowext 3dnow
    bogomips : 3987.10


  • Try the following in this exact order. You can ignore any of the suggestions that you have already done.

    1. Upgrade MySQL 5.0.45 or 5.0.51 if possible and then upgrade PHP to 5.2.5 / 5.2.6 or if you have problems install PHP 4.4.8 (in either case install as apache module and NOT CGI. For windows based PHP try FastCGI method or ISAPI method). Backup your databases prior to mysql upgrades where possible using mysqldump via ssh telnet and not via admincp backup options or phpmyadmin which in some cases of large databases can result in incomplete backups!
    The SQL Server High Performance Series - Part I of III - Preamble::
    materialized in the form of slow performance, is one of the primary causes grease it has proven extraordinarily common to improve performance by 20x or
    http://www.yafla.com/papers/SQL_Server_Performance/high_performance_sql_server.htm
    HOME
    Troubleshooting slow Outlook Web Access (OWA) performance::
    Discover what is causing slow Outlook Web Access (OWA) server performance for mobile device users accessing Microsoft Exchange Server remotely and fix it.
    http://searchexchange.techtarget.com/tip/0,289483,sid43_gci1326317,00.html
    HOME
    2. Edit mysql server's /etc/my.cnf or c:my.ini for windows and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards. Make sure to restart mysql server everytime you make changes to your my.cnf for the changes to take effect.

    If mysql doesn't restart properly after my.cnf changes and you're on VPS server, make sure skip-innodb entry is removed or commented out from below my.cnf


    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    #skip-name-resolve
    safe-show-database
    old_passwords
    back_log = 50
    skip-innodb
    max_connections = 500
    key_buffer_size = 80M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 4000
    thread_cache_size = 256
    wait_timeout = 20
    connect_timeout = 10
    tmp_table_size = 64M
    max_heap_table_size = 64M
    max_allowed_packet = 64M
    net_buffer_length = 16384
    max_connect_errors = 10
    thread_concurrency = 4
    concurrent_insert = 2
    table_lock_wait_timeout = 30
    read_rnd_buffer_size = 786432
    bulk_insert_buffer_size = 8M
    query_cache_limit = 3M
    query_cache_size = 64M
    query_cache_type = 1
    query_prealloc_size = 262144
    query_alloc_block_size = 65536
    transaction_alloc_block_size = 8192
    transaction_prealloc_size = 4096
    default-storage-engine = MyISAM
    max_write_lock_count = 16

    [mysql.server]
    user=mysql
    basedir=/var/lib

    [mysqld_safe]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    nice = -10
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 64M

    [myisamchk]
    key_buffer = 64M
    sort_buffer = 16M
    read_buffer = 16M
    write_buffer = 16M


    If you get mysql server gone away error messages, then keep increasing wait_timeout value in my.cnf by 60 second increments, then restart mysql after my.cnf changes for it to take effect. Test for a few days and see if you get less or eliminate that error message. If it still occurs, then keep repeating the 60 second increment until the message goes away. Each vB forum and server will have different optimal wait_timeout values depending on your vB forum traffic patterns and server hardware specifications.

    3. Remove Eaccelerator or APC Cache if they're installed (check phpinfo.php url of yours to see) and instead install Xcache v1.2.1 final release or Xcache v1.2.2 http://xcache.lighttpd.net/wiki/Release-1.2.2 which seems to be a bit faster than APC Cache - http://www.vbulletin.com/forum/showthread.php?t=213267. Xcache site http://xcache.lighttpd.net/, documentation http://trac.lighttpd.net/trac/wiki/Docs and forums http://forum.lighttpd.net/forum/4

    Remember to set in php.ini the values for xcache.size to 32M or 64M and for xcache.count to a value of equal to number of processor cores you have so single core cpu = 1 or single dual core cpu = 2 or single quad core cpu = 4 or dual cpus each with dual core = 4 or dual cpus each with quad core = 8.

    4. Upgrade to vB 3.0.17 http://www.vbulletin.com/forum/showthread.php?t=209720 if you're on vB 3.0.xx or upgrade to vB 3.5.8 http://www.vbulletin.com/forum/showthread.php?t=221903 if you're on vB 3.5.x. Or if on vB 3.6.x, upgrade to vB 3.6.10 PL3 http://www.vbulletin.com/forum/showthread.php?t=277945.

    But ultimately, the latest stable vB 3.7.2 PL1 is highly recommended http://www.vbulletin.com/forum/showthread.php?postid=1585047. You can use my method of upgrading outlined at http://www.vbulletin.com/forum/showthread.php?t=187770 which is essentially same in that you make a copy of your live database and import it into a new empty database and point vB 3.7.0 config.php to that new imported database name, so you essentially do an upgrade on a copy of your database, leaving original database intact in case of any problems. This method also allows you to run the original database on a different directory so to run both original forum/database along side the upgraded forum/database so you can easily revert all changed templates on upgraded forum and then using old forum/database transfer or port your custom style/images etc to the new upgrade database.

    Read each versions listed thread to understand the changes that have occured etc.

    5. If you just upgraded to vB 3.5.x/3.6.x try to disable these 4 options:

    Admin CP -> vBulletin Options -> Forums Home Page Options -> Display Logged in Users?

    Admin CP -> vBulletin Options -> Forum Display Options (forumdisplay) -> Show Users Browsing Forums

    Admin CP -> vBulletin Options -> Thread Display Options -> Show Users Browsing Thread

    Admin CP -> vBulletin Options -> Message Searching Options -> Automatic Similar Thread search

    Or relevant sections in vB 3.7.x

    6. Check phpinfo.php url to see if you have mod_gzip (Apache 1.3.x) or mod_deflate (Apache 2.x) loaded/installed (on phpinfo.php url page in browser you can do CTRL+F to bring up find prompt and type in mod_gzip or mod_deflate to quickly see). If you have either mod_gzip or mod_deflate loaded, then ensure vB admincp gzip compression is disabled since it's the same thing as mod_gzip or mod_deflate and double compression will just increase cpu loads. If you don't have mod_gzip or mod_deflate installed, then DO NOT set vB admincp gzip compression to a level higher than 1. Higher than 1, will only increase cpu loads unncessarily.

    7. Edit httpd.conf values to following and restart apachee for each change to take effect

    KeepAlive: Off
    MaxKeepAliveRequests: 100
    KeepAliveTimeout: 2
    MinSpareServers: 10
    MaxSpareServers: 15
    StartServers: 10
    MaxClients: 150
    MaxRequestsPerChild: 500





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market

    #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 Server has slow performance , Please add it free.
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 polala.com        Site made:CFZ