Performance issue

Having trouble installing serendipity?
Post Reply
DrNI
Regular
Posts: 13
Joined: Thu Apr 23, 2009 1:16 pm

Performance issue

Post by DrNI »

Hi all,

a very long time ago I asked how to move s9y to a new server. What Garvin had posted back then is what worked out for me today. (http://board.s9y.org/viewtopic.php?f=1&t=15993)

I also solved the blank page issue by updating to the latest full release (http://board.s9y.org/viewtopic.php?f=1&t=16899)

Now the thing is... Firebug shows that loading the page as such takes 5 to 8 seconds, and so does loading the CSS and the JS of the static page navigation. This makes my site and blog very slow. Loading static HTML from the same server works in virtually no time.

Is there a way to find out what's happening?

In case you want to have a look yourself, here it is: http://niels.drni.de/

Thanks for your assistance

DrNI
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Performance issue

Post by yellowled »

DrNI wrote:In case you want to have a look yourself, here it is: http://niels.drni.de/
Are you sure this wasn't just a temporary issue? I do notice some slow loading, but it doesn't seem to be that bad. Also, YSlow just gives 2 hints on this blog - one is gzipping components, the other one refers to some redirects:
There are 5 redirects

* /niels/design/img/base.gif
redirects to
/design/img/base.gif
* /niels/design/img/nolines_minus.gif
redirects to
/design/img/nolines_minus.gif
* /niels/design/img/folderopen.gif
redirects to
/design/img/folderopen.gif
* /niels/design/img/empty.gif
redirects to
/design/img/empty.gif
* /niels/design/img/page.gif
redirects to
/design/img/page.gif


URL redirects are made using HTTP status codes 301 and 302. They tell the browser to go to another location. Inserting a redirect between the user and the final HTML document delays everything on the page since nothing on the page can be rendered and no components can be downloaded until the HTML document arrives.
(YSlow actually gives the full URL for these, but I wouldn't be able to quote it here if I posted those because of the forum's spam protection.)

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Performance issue

Post by garvinhicking »

Hi!

What kind of server are you running? Already calling your main URL (that only redirects to /s9y) takes very long. So this leads me to believe that not s9y is slow, but your server is.

If you're on a shared webhost, ask the provider what load the server is running; maybe other customers on the same server are drawing all the power...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
DrNI
Regular
Posts: 13
Joined: Thu Apr 23, 2009 1:16 pm

Re: Performance issue

Post by DrNI »

There are 5 redirects
I know, the redirects are an unresolved issue, I have to find out why the static page navigation doesn't load the stuff from the correct domain. I'll find out. But Firebug has a nice display showing the loading time for each element and it turns out the redirects take a few msecs only. Plus, they are performed in parallel.

So these aren't the problem. The problem are the things that are created or passed thru by s9y.
DrNI
Regular
Posts: 13
Joined: Thu Apr 23, 2009 1:16 pm

Re: Performance issue

Post by DrNI »

garvinhicking wrote: What kind of server are you running? Already calling your main URL (that only redirects to /s9y) takes very long. So this leads me to believe that not s9y is slow, but your server is.

If you're on a shared webhost, ask the provider what load the server is running; maybe other customers on the same server are drawing all the power...
The server is a virtual machine (running Ubuntu) on a real box AMD running only two other virtual machines. All things hosted there are quite low-traffic.

For example, the PHP code on the following domain is on the same server, it's not horribly fast, I'd say "normal": http://em.drni.de/

Is there a way of finding out what takes so much cpu time or makes s9y take much time? You're right that the initial redirect from / to /s9y takes too long as well. I did this via a php-oneliner, should perhaps have used a redirect in .htaccess.

Gzipping is turned off, I have enough transfer volume and it's a little bit of HTML only.

My problem is that I simply don't have any idea how to trace down the issue. I'm pretty much sure that it's not a bug or something in s9y, but something in the setup either of my s9y installation or my machine, or a combination of both.

Thanks for your time
DrNI
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Performance issue

Post by garvinhicking »

Hi!

Did you check the ubuntu machine's load times and see if they spike? You might want to create /server-status page that shows you how many request your apache handles.

As long as the / redirect takes long to process, I wouldn't start inspecting s9y, but try to dig why this initial lookup takes long. Check your server logfiles (error&access), maybe files are too large?

For PHP, if you want to get down and dirty, there's the excellt XDebug2 extension, which has support for profiling data that you can put through kvalgrind and the likes. This one allows you to easily spot how many cycles any app (also s9y) spends on doing what. But to setup XDebug2 is some kind of work and takes some basic PHP server knowhow...?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
DrNI
Regular
Posts: 13
Joined: Thu Apr 23, 2009 1:16 pm

Re: Performance issue

Post by DrNI »

Hi

I just noticed I never reported on the outcome of this thing. Well, the performance issue just went away one day. I had installed eaccelerator, it was operational but not accelerating at all. Then it just worked. I asked the owner of the server what he had done and he said "nothing" and something like "some update perhaps"...

Anyway, thanks for your help. At least I have eaccelerator now. ;-)

DrNI
Post Reply