Results 1 to 11 of 11
  1. #1

    Dedicated Server Advice

    Hi guys my server is just getting overwhelmed lately the load is getting very high and I dont know why. I was hoping that someone might offer some advice around here.

    My Server:

    Intel Xeon Quad Core X3210 2.13Ghz
    6GB of Ram
    Centos 5.5 32 Bit
    1TB SATA II
    Latest Stable versions of Apache, MySQL, & PHP
    DirectAdmin

    The load usually gets to like 9-10 but i have seen it go higher. I just dont know where I should go next, it doesnt seem like I need that much more powerfull of a server maybe I am wrong. Right now I am hosting 1 site that gets barely any traffic, and a second site that gets a lot (Its a forum based site, that has 5 Million posts, 90,000 Threads 13,000 users, about 3-4000 active.)

    Are there any suggestions you guys can give me?

    Heres a top that I just got

    Code:
    top - 10:52:49 up 81 days, 23:42,  1 user,  load average: 11.61, 17.33, 13.38
    Tasks: 358 total,   1 running, 356 sleeping,   0 stopped,   1 zombie
    Cpu(s): 40.0%us, 23.1%sy, 19.9%ni, 16.8%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
    Mem:   6229204k total,  5474424k used,   754780k free,   176032k buffers
    Swap:  4200988k total,       12k used,  4200976k free,  3984916k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
    27531 mysql     34  19  669m 534m 3948 S 160.7  8.8   1921:35 mysqld            
    15933 apache    15   0  164m  22m 9.8m S 12.6  0.4   0:02.76 httpd              
    15946 apache    15   0  164m  23m  10m S 10.6  0.4   0:03.38 httpd              
    15965 apache    15   0  163m  21m 9680 S 10.3  0.4   0:02.20 httpd              
    15922 apache    15   0  164m  22m 9616 S  9.6  0.4   0:02.79 httpd              
    15895 apache    15   0  163m  24m  12m S  8.0  0.4   0:03.33 httpd              
    16056 apache    15   0  163m  21m 8976 S  7.6  0.4   0:00.28 httpd              
    15645 apache    15   0  163m  29m  16m S  7.0  0.5   0:08.91 httpd              
    15947 apache    16   0  163m  22m 9.8m S  7.0  0.4   0:03.09 httpd              
    15940 apache    15   0  163m  22m   9m S  6.6  0.4   0:02.65 httpd              
    16050 apache    15   0  162m  20m 9552 S  6.6  0.3   0:00.57 httpd              
    16054 apache    15   0  164m  22m 9440 S  6.6  0.4   0:00.56 httpd              
    15973 apache    16   0  167m  25m   9m S  6.3  0.4   0:02.80 httpd              
    15934 apache    16   0  164m  22m 9600 S  6.0  0.4   0:02.80 httpd              
    15967 apache    15   0  163m  22m  10m S  6.0  0.4   0:03.05 httpd              
    16047 apache    16   0  163m  20m 8816 S  6.0  0.3   0:00.18 httpd              
    15963 apache    16   0  164m  25m  12m S  5.6  0.4   0:02.57 httpd

  2. #2
    Join Date
    Jan 2011
    Posts
    453
    Hello,

    From the TOP result it is clear that mysql is consuming higher resource. You need to tweak mysql service using the mysqltuner for avoiding this. If you have any doubts regarding this please do post here and I will guide you on this.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  3. #3
    Ive only used mySQLtuner once so Id like it if you could give me some guidance to make sure im doing it correctly.

  4. #4
    Join Date
    Jan 2011
    Posts
    453
    Hello,

    Please go through the below given URL for mysql optimization.

    http://www.cpanel.net/videos/mysql-optimization/

    After viewing it, if you have any doubts please do post here.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  5. #5
    Join Date
    Sep 2004
    Location
    Miami, FL
    Posts
    2,762
    Wow... didn't know cPanel had such a nice video. Cool...

    Thanks for posting that
    Aaron Ong
    Dedicated Servers - 100TB Servers - 100Mbps Unmetered Servers - Web Hosting - CDN Network
    Servers in Central, East/West Coast USA, EUROPE and ASIA
    Welltodo Century
    - www.welltodocentury.com

  6. #6
    Join Date
    Jan 2011
    Posts
    453
    Hello,

    You are entirely welcome and it is my pleasure to share the tutorial.
    " Your work is to discover your work and then with all your heart to give yourself to it. "

    That's the mark of a true professional !

  7. #7
    besides MySQL optimization (kudos to cptechie, nice find with that video) I would question the network load - are you getting hit with GET ddos by any chance? webserver / firewall logs can tell...
    >>> Guard your data with VPS Backup Solutions
    >>> Resell Domains for profit

  8. #8
    Whats the best way to determine if it is a ddos attack? It doesn't seem like that to me but I'm still new at this.

  9. #9
    if you firewall is properly configured, you should be able to see abnormal behavior in the logs. did any of your IPs started registering unusual traffic levels recently? if you never established a baseline it's difficult to tell - I have seen digg'd articles taken for DDoS attacks, which is why I was asking. could be worth asking your hosting company for their input, this might not be something to handle publicly on a forum (just my 2c)

  10. #10
    a simple check can be:
    netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

    that will show you the ips that connect the most to your server, you have to take into account that if you don't use keepalive and serve a lot of images each of those images will have it's own http request.

    Would be great if you could show us the content of my.cnf.

  11. #11
    mysqltuner is garbage in the end, if you want to understand how to tune things use the mysqlreport guide.

    If MySQL is consuming a lot of CPU it is likely examining too much data thus you would need indexes to fix the major problem in most cases.

    I would suggest adding some caching such as Varnish as well as checking mysql for query cache, innodb/mysiam buffer sizes and proper indexes.

Similar Threads

  1. Need some advice for dedicated server
    By CameronB in forum Dedicated Server
    Replies: 13
    Last Post: 07-11-2009, 05:10 AM
  2. Need advice on dedicated server
    By GPD 01 in forum Dedicated Server
    Replies: 1
    Last Post: 06-06-2004, 04:30 PM
  3. Need Dedicated Server advice
    By JerryJ in forum Dedicated Server
    Replies: 1
    Last Post: 09-15-2003, 12:31 PM
  4. Looking for advice on a dedicated server
    By mattman in forum Dedicated Server
    Replies: 2
    Last Post: 11-07-2001, 02:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •