Activity Stream
48,167 MEMBERS
6946 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member

    Default Teach me how to optimize my dedicated server

    Hello,

    I am Igor, have 19 years, live in Serbia.
    I own dedicated server with about 20 sites on it, but just two of them have traffic - all together 10 000 unique visitors daily.

    My server details:

    Code: 
    HDD     2x 500 GB SATA
    RAM     6 GB DDR2-RAM
    CPU     AMD Athlon 64 X2 3400+, Dual-Core
    CentOS 6.3
    I also use licensed version of WHM/Cpanel, regularly updated.
    Have SHH access, root.

    My problem: Server load is enormous, taking too long to respond [30+ seconds].

    When i run TOP in shh:

    Code: 
    top - 14:48:30 up 8 days, 22:35,  1 user,  load average: 80.32, 86.56, 76.90
    Tasks: 377 total,  44 running, 330 sleeping,   1 stopped,   2 zombie
    Cpu(s): 70.7%us, 21.9%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  7.4%si,  0.0%st
    Mem:   5733840k total,  4201196k used,  1532644k free,   159604k buffers
    Swap:  2097136k total,   182140k used,  1914996k free,   768072k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     4389 mysql     20   0  633m  75m 4484 S 24.3  1.3   0:51.67 mysqld
      617 nobody    20   0 43900  472  264 S  2.0  0.0 288:42.78 perl
     3209 nobody    20   0  138m  32m 4084 R  1.6  0.6   0:03.53 httpd
     4484 nobody    20   0  129m  22m 3736 R  1.6  0.4   0:01.31 httpd
     4523 nobody    20   0  127m  21m 3624 R  1.6  0.4   0:00.92 httpd
     4710 nobody    20   0  119m  11m 3168 S  1.6  0.2   0:00.09 httpd
     2348 nobody    20   0  140m  33m 3976 R  1.4  0.6   0:04.03 httpd
     2825 nobody    20   0  141m  35m 4060 R  1.4  0.6   0:04.07 httpd
     2833 nobody    20   0  140m  34m 3968 R  1.4  0.6   0:02.32 httpd
     3004 nobody    20   0  140m  34m 3848 S  1.4  0.6   0:03.17 httpd
     3277 nobody    20   0  118m  12m 3624 R  1.4  0.2   0:01.54 httpd
     3348 nobody    20   0  142m  36m 3860 R  1.4  0.6   0:03.51 httpd
     3893 nobody    20   0 52904  10m 1344 R  1.4  0.2 384:43.25 perl
     3895 nobody    20   0 54236  11m 1024 S  1.4  0.2   0:07.77 perl
     3897 nobody    20   0 54580  11m 1024 R  1.4  0.2   0:07.71 perl
     3899 nobody    20   0 54232  11m 1024 R  1.4  0.2   0:07.71 perl
     3902 nobody    20   0 54312  11m 1024 R  1.4  0.2   0:07.75 perl
    Current my.cnf looks like:

    Code: 
    [mysqld]
    max_connections = 500
    key_buffer = 32M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 4000
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 7000
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 2M
    query_cache_size = 24M
    query_cache_type = 1
    tmp_table_size = 32M
    skip-innodb
    [mysqld_safe]
    open_files_limit = 8192
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    [mysqlhotcopy]
    interactive-timeout
    Default my.cnf which i have changed according to this tutorial [http://www.firemakerhosting.com/serv...d-server-vps/] was looking:

    Code: 
    [mysqld]
    set-variable = max_connections=500
    query_cache_limit       = 2M
    query_cache_size        = 32M
    table_cache = 400
    thread_cache_size = 286
    log-slow-queries
    safe-show-database
    After running mysqltuner.pl with current my.cnf settings i get:

    Code: 
    
    root@bravo612 [~]# ./mysqltuner.pl
    
     >>  MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.1.63-cll
    [OK] Operating on 64-bit architecture
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 172M (Tables: 715)
    [!!] Total fragmented tables: 29
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 9m 29s (32K q [57.963 qps], 990 conn, TX: 64M, RX: 2M)
    [--] Reads / Writes: 92% / 8%
    [--] Total buffers: 72.0M global + 4.5M per thread (300 max threads)
    [OK] Maximum possible memory usage: 1.4G (25% of installed RAM)
    [OK] Slow queries: 0% (86/32K)
    [OK] Highest usage of available connections: 24% (74/300)
    [OK] Key buffer size / total MyISAM indexes: 32.0M/52.8M
    [OK] Key buffer hit rate: 99.7% (2M cached / 5K reads)
    [OK] Query cache efficiency: 49.1% (12K cached / 25K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 2% (23 temp sorts / 1K sorts)
    [!!] Temporary tables created on disk: 38% (379 on disk / 979 total)
    [OK] Thread cache hit rate: 92% (74 created / 990 connections)
    [OK] Table cache hit rate: 97% (292 open / 299 opened)
    [OK] Open file limit used: 5% (459/8K)
    [OK] Table locks acquired immediately: 95% (14K immediate / 14K locks)
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Enable the slow query log to troubleshoot bad queries
        When making adjustments, make tmp_table_size/max_heap_table_size equal
        Reduce your SELECT DISTINCT queries without LIMIT clauses
    Variables to adjust:
        tmp_table_size (> 16M)
        max_heap_table_size (> 16M)
    Also, i need to mention, i have installed VNC service with GNOME desktop environment on current server, but i don't use it regularly.
    Also, i have spotted, when i clean seass_ files server is faster, but just minute or two, after that, it's the same...

    If you need any additional details, please ask me.

    I won't sleep tonight until my web server start to load faster, so please, reply me, i am ready to teach HOW TO...

    Greetings,
    Igor

    ---------- Post added 22nd Jul 2012 at 01:11 PM ---------- Previous post was 21st Jul 2012 at 01:47 PM ----------

    Still no reply. May somebody help me, please?
    igordr Reviewed by igordr on . Teach me how to optimize my dedicated server Hello, I am Igor, have 19 years, live in Serbia. I own dedicated server with about 20 sites on it, but just two of them have traffic - all together 10 000 unique visitors daily. My server details: HDD 2x 500 GB SATA RAM 6 GB DDR2-RAM Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Disable those sites temporarily. Create a temp landing page.

    Then google for server optimization guides, there are plenty of guides on the web.
    Check those of Bharat, posted here.

    Defendos BETA3 Released! Thread - Official Website

  4.     
    #3
    Respected Member
    Bharat's Avatar
    Website's:
    ShineServers.Com Pickadedi.com
    Well at the first you can try tuning mysql :-

    Code: 
    wget http://mysqltuner.com/mysqltuner.pl
    chmod +x mysqltuner.pl
    ./mysqltuner.pl
    Then , check the instructions which is listed by this script on your ssh panel.

    then try changing the web server , install nginx or lighttpd .

    Also from here you can get some guides .

    http://www.besthostingforums.com/13-...anagement.html

    Let me know , if anything else needed . Probably i can help in decreasing some loads .

  5.     
    #4
    Member
    I assume you run php as suPHP(default cPanel setup?). If so, I'd highly recommend you running FCGID instead. FCGID, if configured properly, will do a lot of difference(preventing one account from using all resources, reducing resource usage, improving loading speeds etc).

    With FCGID you can also run PHP opcode cache systems such as eAccelerator(recommended!), XCache etc

    You may also want to run nginx or Varnish in front of Apache for serving/static content. It is also very important optimization step on the server end.

    I realize this may be too complicated for a beginner so I'd suggest you hiring someone to do the above right. Otherwise, my suggestions won't do any good if configured badly.
    KnownSRV.com - Quality comes at a price, and we provide it at affordable prices.
    PayPal, Skrill(MoneyBookers), Payza(AlertPay), 2CheckOut and LibertyReserve accepted!

  6.     
    #5
    Member
    Thanks everyone.

    Especially thanks to my new friend Bharat, which helped me to resolve all issue on the server.

    Thread can be marked as closed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Hiring] need someone to optimize my new server for vBulletin forum
    By ihabhamed in forum Services
    Replies: 0
    Last Post: 20th Apr 2012, 03:45 AM
  2. Replies: 4
    Last Post: 13th Jan 2011, 10:16 PM
  3. Optimize or Get a new server.. ? Help
    By EvilGenius in forum Technical Help Desk Support
    Replies: 3
    Last Post: 30th Jul 2010, 07:11 AM
  4. How To Secure&Optimize A cPanel Server! [Full of information]
    By NationWebHost in forum Technical and Security Tutorials
    Replies: 6
    Last Post: 4th Jul 2010, 10:09 PM

Tags for this Thread

BE SOCIAL