Hosting speed


#1

Hi,

I’m now a new custommer, the specs and pricing of the hosting got me in.
I have one issue though, and I would like to know if it’s like that for everyone, if it’s temporary and so on.

The server I’m on (ivan) takes ages to answer from time to time, pages can load in a second, and sometime in 4, and now in 10 or more seconds …

It seems like static pages (tried with a PDF) load in the instant, but anything dynamic (not sure if it’s PHP or SQL related) takes ages to load.
From what I could guess, it seems the SQL server is slow, makes page load slowly, and make the httpd service have to handle more simultaneous requests (as they take longer to execute)

Do anyone here have the same kind of issues ?
If so, is it “regular”, or temporary ?

Thanks, Mathieu
http://futurs-bretons.com/


#2

We had similar problems when we first signed up with Dreamhost; static pages were fast, but anything PHP related was uber slow. The load average of the server we were on got waaaaaay too high, and that was at least a major contributing factor for our PHP slowness. Eventually we heckled the tech support to move us to a new server which is under reasonable load, and now our sites are all fast’n’snappy. Occasionally database-driven stuff gets slow when the MySQL server decides to be ornery, but pure PHP is fast.

Why don’t you do top on your server and see where the load stands, just in case you’re experiencing the same phenomenon. If it stays consistently high, contact tech support and tell them to put you on a server which isn’t overloaded.


#3

I haven’t noticed any slowness in my few months here, and I do tend to use some highly complex PHP+MySQL pages.

My guess is that you have some poorly optimized code. If you’re querying a large table with few to no indices, that could easily cause a slowdown.

Good luck!


#4

The site I’m hosting don’t use anything that complexe, and used to work fine on the free hosting provided with my DSL line …


#5

OK, thanks for the tip.
top don’t tell much more as I can only see my process, but the CPUs are not used that much.
I noticed that much usage was done by the system, not user, which is strange.

It’s my second day here and I’m already considering moving :confused:


#6

i can also testify to this. it seems that at peak times things are VERY slow. does anyone know if dreamhost moves sites to a new server if requested?


#7

I juse retested, 24 second to load the home page of my site !


#8

Maybe MySQL then? Have you tried a PHP page that doesn’t use the database?

Edit: I just tried your page – that was just bad. Took half a minute to load. Weird stuff. Even our site wasn’t that slow when DH servers were sputtering. I’m inclined to think the problem’s with the database…


#9

Yeah I thought it was more mysql than PHP on the server itself.
I’m still waiting for tech support to look at my ticket, but I didn’t set it to critical - so it may take some time…

One thing I noticed though, when doing a ls on the server, it takes a LOT of time.
Files are displayed fast, but the command takes some time to end.
Here is what it just took :[code][ivan]$ time ls ~
Maildir futurs-bretons.com logs

real 0m8.639s
user 0m0.000s
sys 0m0.020s[/code]Oh, the ‘script’ I use to manage the site are widely used in France (developper here) and it’s not known to be a DB hog or a php hog.


#10

Weird stuff. Here’s what I see when I do time ls:

real 0m0.075s
user 0m0.000s
sys 0m0.010s

Just out of curiosity what’s the memory usage and the 15 minute load average on your server? The 15 minute average hovers around 0.45 on ours, with around 38M free memory and 257M swap usage.


#11

Now everything is running smoothly again, but I saw 15 minute load over 15, which is quite high.
No swap was used then, and there was like 50M free (same as now, with a load of .35)

UPDATE : I found the site slow again, here is the load that I was having :
15:25:18 up 2 days, 13:17, 9 users, load average: 25.60, 18.38, 11.26


#12

Y’know, that’s kinda high. If you see that more than once an hour, or if it lasts for more than about a minute contact the tech support and tell them that there seems to be a problem with an overloaded server. We have load averages like that on our first server, and our site’s speed problems weren’t fixed until they moved us to a different server where the loads were reasonable.

Anyway, have you tried creating just a simple static page with just one line of PHP doing something extra simple like print(“Hello world!”); or such? See if a page that simple slows to a crawl when your site is slow. Just to eliminate MySQL out of the equation for certain.


#13

You can also always use time() and have it print out the difference after key points in your script – that would tell you whether MySQL queries are slowing you down, for instance.