Server Overloading

Discussion in 'Site & Server Administration' started by JScripting, Jun 10, 2008.

  1. #1
    This may be the wrong section but I tried to find the most related place.

    So anyway, one of my servers is becoming very slow at times and has high load on average.

    Sometimes we can see a load of 10 when usually it is around 3.0-4.0.

    Also the mysqld process is taking about 200% or more CPU at any one time. Occasionally it drops to 50% for a minute then goes back up.

    This is most likely due to a huge increase in traffic on various sites which the server hosts.

    So the question is, does anyone have any tips for me or know any good server optimization services?

    Basically, mysql needs optimizing and other things in general which affect the performance. It is painfully slow at times and is causing huge losses of traffic.
     
    JScripting, Jun 10, 2008 IP
  2. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need expert mysql and web server optimization. Consult some experts.
     
    agnivo007, Jun 10, 2008 IP
  3. JScripting

    JScripting Active Member

    Messages:
    129
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    If i knew any, I would.

    Also after messing around mysqld is 90% CPU most the time (4 cpus).
    The slow log shows a rand query i cant track down, but ill work on optimizing some queries.
     
    JScripting, Jun 10, 2008 IP
  4. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Rand queries are highly useless in large tables. Benchmarks were done on tables with 100K rows, you'd be suprised how long it took to return a single row. Generate random numbers in the scripting language, and send them to SQL.
     
    jayshah, Jun 10, 2008 IP
  5. argothiusz

    argothiusz Well-Known Member

    Messages:
    1,500
    Likes Received:
    79
    Best Answers:
    0
    Trophy Points:
    140
    #5
    Happened to me too but I fixed it..xD
    What is your server spec?
    post what in your my.cnf here
     
    argothiusz, Jun 10, 2008 IP
  6. JScripting

    JScripting Active Member

    Messages:
    129
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Its ok a sorted it now.

    Turned out it was a huge table (300-400k rows) which had a missing index and was being queried every second or two.

    So i cleared 200,000 rows out of it and added an index, seems to be fine now.
     
    JScripting, Jun 11, 2008 IP