how to troubleshooting gallery2 performance problem

tigeryao

Joined: 2005-06-10
Posts: 5
Posted: Tue, 2006-01-03 23:10

I installed gallery2 on a hosted server a couple of months back, but now the site is really slow. What is the best way to troubleshooting the perf issue? how do I know is that the hosting server doesn't have enough power or the MySql is not fast enough, will deactivate/uninstall the module make any performance difference?

I noticed mostly the slow is only when user click the external link (but on the same site) to my gallery, i.e. my front page is www.tigeryao.com, it has a link to www.tigeryao.com/gallery2, once I am in the gallery, the links work pretty responsive.

Thanks for your help

Sherwood

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-01-03 23:35

topic moved to the a more appropriate support forum.

http://www.tigeryao.com/gallery2/main.php indeed loads very slowly.
you can enable database query logging to check which db queries take so long. (config.php $gallery->setProfile(array('sql')); )

what hardware / OS are you using?

a php accelerator could do wonders.
FAQ: Is it my imagination, or is G2 slower than G1?

http://codex.gallery2.org/index.php/Gallery2:Performance_Tips

 
tigeryao

Joined: 2005-06-10
Posts: 5
Posted: Wed, 2006-01-04 02:24

thanks for your quick pointers, my host is resellerzoom.com, using linux (kernel 2.4.27) running on intel dual xeon (not sure how fast and how many users are sharing it though) I have asked the system admin to consider install PHPA which might help the problem.

to run the profiler test, I installed another gallery2.0.2 on the same host with a new database created on the same mysql, http://www.tigeryao.com/gallery/gallery2/main.php

after I enabled profiler, the time reported didn't add up to the actual user experience, the first page loading takes a few second, but the g2 reported time for each query is all in 0.0x range, which totals less than 0.5 sec (when you test it, see below, it is only slow only if the site is left idle for a while)

One thing I don't quite understand is once I loaded the gallery once from one client browser, subsequent access from the same client to the gallery page, include front page is pretty good. Even if I closes all my browser. But then if I tried access the page again after a while (a few hours, the front page will be slow again. so if it is the db runtime performance issue, shouldn't it be slow on every page that I access? so sounds like this site needs a prime process to prepare the gallery, could other things that slow things down other than db?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 16:38

there's also your browser cache involved. if you visit a page, your browser caches the images etc.
so only after a hard-refresh or after clearing your browser cache, you'll see the same request again, else it will only request new things.