G2 CPU Hog / performance issues
jelevy01
Joined: 2004-07-20
Posts: 7 |
Posted: Mon, 2005-03-14 17:08 |
I installed G2 Dark Fibre over the weekend and noticed today that it is hogging resources at an enourmous rate, after browsing the site for a few minutes load average is upto 15. This the first PHP/MySQL site that I have run so I am not sure there aren't some settings that I should tweek. When I switch back to G1 my machine operates normally. I have also noticed that my URL shortcuts don't work in G2 either (I migrated from G1) Any help would be appreachiated. ---- |
|
Posts: 32509
upgrade to the current nightly snapshot of G2
http://galleryupdates.jpmullan.com
G2 is now much faster/less cpu intensive for public viewable albums.
Posts: 8601
instructions for G1->G2 redirection are in Site Admin / Import/Gallery 1
Posts: 7
I upgraded to the snapshot from the 14th, however the issue continues.
If I do ps -A f I see multiple threads for MySQL as well as httpd, more then I normally see.
Are there any PHP / MySQL settings I can tweak?
JL
Posts: 7994
It's normal to see multiple threads for MySQL and httpd, that just means that it's prepared to handle multiple simultaneous requests. The question is, is Gallery placing an undue load on your system?
With the latest code, every time we create a new publicly visible thumbnail/resize image (most galleries are 90+% public) G2 creates a "fast download" file for that image. The next time the thumb is viewed, we take a shortcut to the fast download file and serve up the image very quickly, keeping the load down on your server. We added this feature after B1. With B1 and before; every image view is pretty intensive on the server and drives the load average up quickly.
After upgrading, you have to wait a bit for all of your images to be viewed and these fast-download files to be created. You can get an idea of what percentage of your gallery is already prepared for fast downloads by doing this:
Count the number of thumbnails/resizes:
mysql> select count(*) from g2_Derivative;
Count the number of fast download files:
find ../g2data/cache -name '*fast*' | wc -l
Give it a little time, and if the load average is still really high, then let's talk. In the meantime, what kind of hardware are you running on? Your site seems pretty responsive to me right now...