Who's Fault Is It?


Although it may sound like I am looking to lay blame, I’m not. I just want to know how to properly troubleshoot my website’s performance issues.

I understand:

  • you get what you pay for. you pay more for better hosting plans and you get better performance.
  • if I am running dynamic pages, code will determine how fast my pages will be created/served.
  • etc. etc. blah blah blah

What I am trying to find out is how I can get information on things like, the overall load on the server hosting my site, are there any bandwidth issues on the pipe my server is on, and other pieces of information that are dashboard-like information that I like to check before profiling PHP code, etc.

Let me provide you an example, I am running Mantis on my website. There are periods, like at the time I am posting this, that it is running very slowly. Nothing has changed except that time has passed since it was used last. Sometimes it is zippier than other times.

I am trying to determine if I need to upgrade, modify code, optimize a database or two, ask DreamHost to move a few problem children from the server I am on, etc.

Any guidance would be appreciated.




I think I understand what you are asking, and I think you are asking all the right questions. While I am not the “expert” on all these things, I have learned a few things that might be helpful. Hopefully some of the real wizards with this stuff will join in and add to my initial comments.

I tend to begin my initial research into why a site performs slowly with a some basic steps:

  1. Log into the shell with an ssh client and note the server load at various times of the day - particularly when the site is performing badly.“w” will do, and given the nature of the multi-core servers DH uses, I don’t get concerned till the load gets up above 10 or so (though YMMV). Note that an exceedingly high load may be evidence of an NFS bottleneck or other filer problem more so than a real “load” on the server.,

  2. When performance varies, I try to evaluate to what degree my own connectivity issues might be responsible - traceroute is my first tool here, and I’m looking for problematic routing, malfunctioning routers, and other indications that latency or sporadic connectivity may be interfering with my receivng served pages efficiently.

  3. I use the FIrefox extension YSlow to develop metrics for the basic loading of my pages and to see where the optimization of the rendered page is deficient.

  4. Where dynamic pages generated using MySQL are involved, I try to optimize MySQL operation as much as practicable. Things like maximizing the number of queries per connection, using the most efficient queries, and indexing tables are my starting points for this - as you know, this is a whole science unto itself.

  5. Finally, I look at the code itself, initially looking for obviously inefficient or redundant stuff that should be optimized, or eliminated altogether.

These initial steps, and collecting and evaluating the connectivity and loading conditions during times of good performance and bad performance, will often indicate whether or not the “shared” aspects of a shared server are the source of the bottleneck, and will help DH Tech Support identify the source of the problem.

Of course, optimizing databases, modifying code, and having “hoggish” neighbors throttled will only accomplish so much; some sites will require the “upgrade” or even a dedicated server (or two), and I don’t know of any way to avoid that, but I have found that the things I have described above, if properly managed, will get you a lot of usability out of DreamHost servers.



Dreamhost servers used to be very slow, but that has improved a lot lately. YSlow (extension to the Firebug extension) is a great recommendation (based on Steve Souders’ “High Performance Web Sites”:slashdot, video). And while you’re in Firebug, look at the Net tab while the page loads.

I’ve found that it’s mostly not SQL or CGI or anything like that – it’s Javascript. Loading Javascript blocks everything else. So minimize your scripts, paste them together into one file, make sure you only load what you need, load it as late as possible (in body not header, although that’s often not an option). You’ll be surprised.


Does each user have to create their own copy of Mantis or is there a generic one that we could all share and just create different projects and project managers?

If we have to install it, can you give me some tips on getting started? I have it installed on my laptop, but want to share it with others now.



Your question does not concern DreamHost. It is strictly a Mantis question. I suggest you intead ask your question on the Mantis forums.