'Minimize the resource consumption' in Gallery2?

pulok

Joined: 2006-11-15
Posts: 15
Posted: Tue, 2010-10-19 19:01

I am using gallery2 (version: 2.3 core 1.3.0) for my photo site for last few years. 2/3 days back the hosting company suddenly disabled the web access for my site. The reason they mention ' your account ... is running processor intensive scripts continuously and causing major problem for the entire server ...'

I clarified that I am not using any custom script, instead using standard gallery2 installation. Still they advices '... You need to optimize your codes/scripts to make them more CPU efficient. Check with the support of Gallery2 in order to check how this situation can be improved or what sort of adjustments can be applied on Gallery2 to minimize the resource consumption ...'

The other alternative I was given to move my account to semi-dedicated servers , which is obviously more expensive to me. So I am seeking help to the forum how can I 'minimize the resource consumption' in Gallery2?

Rgds/

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-10-19 19:35

First, who's your host?

Is it just CPU or is it also disk space, memory, or number of files?

How big is your Gallery? If you post the information gathered from these steps we can get a better idea of what you have going on:
FAQ: What information is required when I ask for help in the forums?

Otherwise I can only point you to these:
http://codex.gallery2.org/Gallery2:Performance_Tips
http://codex.gallery2.org/Gallery2:ACL_Performance

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
pulok

Joined: 2006-11-15
Posts: 15
Posted: Thu, 2010-10-21 18:37

Thanks nivekiam.
a. I have hosted my site with www.jaguarpc.com
b. I guess (based on their communication), it’s just CPU usages. Because they mentioned unix process list (see sample below) in their mail:
blah blah /usr/php4/bin/php /home/user_x/public_html/exmaple.com/main.php
blah blah /usr/php4/bin/php /home/user_x/public_html/exmaple.com/main.php
blahblah /usr/php4/bin/php /home/user_x/public_html/exmaple.com/main.php

c. My photo site contains about 6000 photos.
d. Thanks for mentioning those two document on performance & ACL. I am checking in detail.
e. Below is my gallery system information:

Quote:
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.4.9 cgi
Webserver = Apache/1.3.42 (Unix) mod_gzip/1.3.26.1a mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8e-fips-rhel5
Database = mysqlt 4.1.22-standard, lock.system=flock
Toolkits = NetPBM, Gd, ImageMagick
Acceleration = none/0, none/0
Operating system = Linux newdione.nocdirect.com 2.6.18-194.17.1.el5PAE #1 SMP Wed Sep 29 13:31:51 EDT 2010 i686
Default theme = bangladesh
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Rows in GalleryAccessMap table = 4155
Rows in GalleryAccessSubscriberMap table = 6088
Rows in GalleryUser table = 1344
Rows in GalleryItem table = 6078
Rows in GalleryAlbumItem table = 541
Rows in GalleryCacheMap table = 0

Any further advice will be appreciated.

Rgds/

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2010-10-21 18:49
Quote:
Default theme = bangladesh

What's your custom theme based off of?

Quote:
Toolkits = NetPBM, Gd, ImageMagick

Uninstall GD and NetPBM. If ImageMagick is working it'll use less resources in the long run.

Quote:
Acceleration = none/0, none/0

Definitely turn on some caching. See Site Admin > Performance. Sure it uses more files on the system, but it'll make gallery work less, making browsing faster and reducing cycles used on the server.

Once your "fast" as a "jaguar" host catches to this decade and ditches 8 YEAR old software (apache 1.x is ancient), MySQL 4.x is OLD, PHP 4.4 is OLD then I'd look at using G3. But G3 will not run on that configuration.

If they are running software that old still I'd really question the age of their hardware and specs.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2010-10-22 02:49

JaguarPC is actually a decent host.

A few years ago, when I first went with them, they were one of the highest rated on webhostingtalk. Cost a bit more but you got excellent service ... then they went into the mass hosting market and everything went downhill quite quickly.

They expanded rapidly by buying up loads on smaller hosts and I bet your old server is probably one of those legacy ones.

Ask them to transfer you to a server that has Apache 2 and PHP 5 and I am sure they will do this although if you are on a "$0.25/mo with unlimited everything" plan, they might politely refuse.

As for your site, follow the performance tips. Switch on acceleration etc.

PS. I left JPC a few months ago for a non mass host. I believe though that they are all doomed to go through the cycle of "High quality -> increased reputation -> increased user base -> reckless expansion into mass hosting -> reduced quality"

--
dakanji.com

 
pulok

Joined: 2006-11-15
Posts: 15
Posted: Fri, 2010-10-22 08:48

@nivekiam
a. The theme is based on matrix and was developed by me.
b. Uninstalled GD and NetPBM. Now only ImageMagick is activated
c. Acceleration set to maximum. Now ‘Acceleration = full/86400, full/86400’
d. Followed the applicable steps as per the document on performance & ACL
e. Modified robots.txt as per http://codex.gallery2.org/Gallery2:How_to_keep_robots_off_CPU_intensive_pages
f. Set Helper Processes priority to low as per http://codex.gallery2.org/Gallery2:How_to_use_less_CPU
Anything else, Sir?

@Dayo
a. I will ask JaguarPC.com to transfer my account to a server that has Apache 2 and PHP 5.

Thank you nivekiam & Dayo very much.
Rgds/

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2010-10-22 17:17

Nothing I can think of that can be accomplished on a shared host.

If there are still issues, I'd like to see a list of all modules you have installed and activated and possibly also the changes you did to create your theme.

Quote:
I believe though that they are all doomed to go through the cycle of "High quality -> increased reputation -> increased user base -> reckless expansion into mass hosting -> reduced quality"

I hope not all, but I can see as how they want to increase profits like all businesses do, that it can be tempting. I'm hoping that Pair and Linode never suffer this fate. But if they ever get purchased by someone..... I've seen it happen time and time again. Some companies are able to stick by their standards for a long time and others that you thought were going to be around forever surprise everyone by selling out...
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here