0

The server is getting slow on peak hours, and I don't really know how to find out the bottleneck. I can upgrade ram and cpu. Currently 2gb and 2x2.4ghz

Linux CENTOS Around 60.000 pageviews per day 600 unique users Every page around 5 queries Database is 10gb

What I already did: Optimize queries Optimize apache conf

What tool can I use to check what I need more? CPU/RAM There must be some logging tool that can tell me after a week: You need RAM. When I check in my control panel it tells me that I am using 100% of cpu at peak hours, but I don't know how it is calculated.

2
  • Is this a Linux system, if so what distro?
    – user9517
    Nov 6, 2015 at 19:18
  • updated description
    – Server
    Nov 6, 2015 at 20:28

1 Answer 1

0

There must be some logging tool that can tell me after a week:

No, there isn't really. For MySQL there is mysqltuner and tunimg-primer but in general there are too many variables. You could chuck memory and CPU at a problem only to find that it's an I/O bottleneck. Swap them round any way you want and throw some other variables in too.

You need to start to analyse your system and get familiar with and understand it to work out where the bottleneck is.

Take a look at the output of top.

  • What does it tell you?
  • What's the system load
    • How does it vary?
  • What is the CPU doing
    • Is it maxed out?
    • Is it waiting
    • Is there any steal (if it's a VPS)?
  • What's happening with memory
    • Is there any swapping ?

Take a look at the output of vmstat, iostat, iotop etc. Figure out what yur system is doing and what resources it's using and struggling with.

Once you've done all that then you should be able to make an informed decision on what the problem is and how to solve it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .