Need Advice: Dedicated server for mysql alone needed??

Discussion in 'Site & Server Administration' started by jl255, Mar 25, 2009.

  1. #1
    Ok, my server guys are telling me that mysql is hitting loads of 25, which he says is very high and i don't quite know what it means. He is strongly recommending that i shld get another dedicated server for mysql alone.

    So can i get some advice on how I can assess the validity of his recommendations? I see that my CPU is load is hitting 125-150% daily. So i suppose there is some truth?

    He is recommending that i get a raid-5 which is best. How can i know a suitable configuration of a new server to get? Of course, if i got all the money in the world i shld buy the best. But with constraints on budget, i want to get one (if i really need a new server) that is good for current loads with some projected margins for growth.

    Would really appreciate some urgent help from the experts here as my site is crashing quite often. Tks!
     
    jl255, Mar 25, 2009 IP
  2. nwilkens

    nwilkens Member

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    What is your current server configuration?

    When your server is busy, what is MySQL doing? This can be checked with 'show processlist' within the mysql command line client.

    Have you tried tuning MySQL? MySQL Performance Tuning Primer Script is a good place to start.

    When the server is busy, what is the server waiting on? Capture the output of 'vmstat 3 10' (runs for ~30 seconds). Specifically we need to see if you are swapping, or waiting on disk-io.
     
    nwilkens, Mar 25, 2009 IP
  3. CrumX

    CrumX Banned

    Messages:
    326
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you using VPS or Dedi? If you are using Shared Hosting I think they should have kick you for using too much CPU load.

    I have 14k ++ unique perday 300-600 user online without a problem on VPS...
     
    CrumX, Mar 25, 2009 IP
  4. tera

    tera Peon

    Messages:
    159
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try to find what mysql is doing so hard and replace the statements or do somenthing about that.

    Search about mysql optimizing and you can do a lot.
     
    tera, Apr 6, 2009 IP
  5. Kaoz

    Kaoz Peon

    Messages:
    767
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What type of site are you running?
     
    Kaoz, Apr 6, 2009 IP
  6. iBoot

    iBoot Well-Known Member

    Messages:
    1,596
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    165
    #6
    try to hire some mysql expert guy to optimize database
     
    iBoot, Apr 7, 2009 IP
  7. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #7
    I would first make sure that all of the queries, the database configuration, and the database structure is well tuned. If you are using well established commercial or open source software, then you can probably assume that this is already done, at least for structure and query optimization. You should however, definitely check your server configuration and see if there are any problems there.

    If you do decide that you are going to need a dedicated database server, you should use RAID 10 and not 5 if possible. RAID 10 is far superior to 5 for databases. Also, you may want to look into colocation hosting if your current host is really expensive for an additional server. In any case, make absolutely sure that your database server is directly connected to the web server, ideally without even a switch, over a 10/1000 connection. With load like you are experiencing, you would be asking for problems to try to connect with anything less than a gig connection.
     
    jestep, Apr 7, 2009 IP
  8. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #8
    Get a host with free private bandwidth preferably with gigabit connection. Raid 10 is also great. the purpose of raid is to have a redundant setup in case of failure, but it multiplies the number of i/o available or reading and writing on drive.

    One cheaper solution is to add another hardrive to your current server, possibly a sas or even ssd, and use it only for mysql. This drive will provide the i/o and speed for mysql, while the other drives will be for script. This way you double your i/o and speed. However, this is a cheap solution as the second harddrive will need to be protected with constant backup, offsite if possible.
     
    Camay123, Apr 7, 2009 IP
  9. Kaoz

    Kaoz Peon

    Messages:
    767
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    that is also an option, and/or someone who can optimize apache and the server.
     
    Kaoz, Apr 7, 2009 IP