Page 1 of 1

CPU Load too high.

Posted: 19 May 2010, 22:01
by Bosman71
Hi There,

I read a lot of posts on this forum and also manual.

I've got 2.6.2 Phoca Gallery version installed on Joomla 1.5. I've got there 124 Categories and about 5600 photos in it.

The problem is that my server provider is blocking my site because of the CPU load. It is too high. And easily and quickly reaches the maximum time of 4hours per day of CPU work. I do not know what causes the problem.

In the Admin page for the Gallery component i've set up everything as it should. On the Info page all parameters are highlighted green as they should be.

Is there any possibility to change something in the component to decrease of CPU use for this component?

Thanks for every help!

Re: CPU Load too high.

Posted: 20 May 2010, 10:53
by Jan
Hi, you need to test and get information when your site is overloaded:

- if you are working in the backend (then you should set all recommended settings - in Phoca Gallery, pagination is used, so there should not be loading problems - if all recommended settings are enabled)
- if you are creating thumbnails - this can slow down the server but only for time thumbnails are created
- if this is because of frontend - then check all your settings in Joomla! and check the pagination values for all extensions - if there is e.g. not loading of all categories at once, etc.

Jan

Re: CPU Load too high.

Posted: 20 May 2010, 23:47
by Bosman71
Hi Jan,

It is not about the Backend but becuase of front end.

On the Categories View I have pagination set to 12 and in gallery view also 12. And it makes server not dead but so busy that the provider is blocking my page.

Actually I think about writing some simple frontend displaying module that will do this in the simplest way as possible. Do you think that it can help me? :)

Backend will generate all photos and thumbnails, add watermark and so on. Then i will get everything from the DB and display on the front page.

What do you think?

Cheers and thanks for the answer :)

Re: CPU Load too high.

Posted: 21 May 2010, 09:20
by WinterRG
Your CPU load is probably high because you have a large number of images being viewed quite often, making a large number of SQL queries.


- Have you enabled Caching? (Does your host allow SQL Query Caching?)
- Possibly reduce the number of thumbnails displayed per page. This will increase the number of queries, but each query
will be smaller and take less cycles to perform.
- Have you checked you thumbnail options? Turn OFF Thumbnail cleanup
- Ensure GZIP is enabled
- Ensure you have enough PHP memory configured, so PHP is not swapping in and out of/tmp all the time
(this relates to high numbers of thumbnails per page)

Obviously, I am not a Phoca Guru or Team Member, but these are basics that I consider when using the Gallery for some of my customers. Minimum number of images in some of my clients galleries are between 3,000 - 10,000 per parent category, with about 10 top-level/parent categories at a time. (This is an events site, where the images of an event stay online for about 30 days and then the next event replaces them, with about 5 events online at a time)

My hosting is clustered MySQL, VMware Cloud Infrastructure, PHP maximum execution time = 30 seconds, maximum memory = 128MB (they want reasonably high-res images and this is needed for thumbnail creation of high-numbers of high-res images)

Hope this gives you some idea's and help.