Gallery very slow (again)

jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Sat, 2014-03-08 10:41

Hello,

I've got an installation of Gallery3 on a webhosting, with over 1800 photo's. To load a photo, it takes about 8 seconds.

I contacted my hosting, Mijndomein.nl, but they say it's not a problem on their side.

Anyone any idea how I could solve this?

System information:
Versie: 3.0.9 (Chartres)
Albums: 12
Foto's: 1808

Server information:
Hostnaam: vs7366
Besturingssysteem: Linux 2.6.32-5-vserver-amd64
Apache: Apache/2.2.16 (Debian)
PHP: 5.3.3-7+squeeze16
MySQL: 5.1.73-1
Serverbelasting:
Grafische toolkit: gd

Regards,
Tim Nederveen

Ps. I'm sorry for my English, I'm Dutch.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2014-03-08 16:17

@profiling:
1. edit modules/gallery/helpers/gallery_theme.php and edit the page_bottom() function:

static function page_bottom($theme) {
    $session = Session::instance();
    if ($session->get("profiler", true)) {
      $profiler = new Profiler();
      $profiler->render();
    }

(changed "false" to "true").

2. edit var/database.php and change the benchmark value to true:

$config['default'] = array(
  'benchmark'     => true,
  'persistent'    => false,
  'connection'    => array(

Then there will be some performance info at the bottom of the page.
Post the url to your site.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Sat, 2014-03-08 17:07

Hey Dave,

I've changed the code.

Link to my Gallery: www.vrachtwagenfoto.nl/fotoalbum?debug=1 (remove spaces)

Please add ?debug=1 to each URL. The website is used live, and I don't want the information visible for all visitors. ;)

Regards,
Tim

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2014-03-08 20:02

Seems to be fast for me. All page views are between 0.9 and 1.7 with the odd one just above 2 seconds.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Sun, 2014-04-27 11:40

I'm working on my website, and again, it seems to be very slow (9.887 s).

Here is a screenshot from the profiling: http://prntscr.com/3dwkun

Anyone a clue?

Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2014-04-29 13:29

I don't know what to say.... I get fast responce:

Benchmarks	       Count	Time	Memory
Kohana Loading	        1	0.085	2.45MB
Environment Setup	1	0.073	1.79MB
System Initialization	1	0.167	4.45MB
Controller Setup	1	0.006	0.12MB
Controller Execution	1	0.230	2.30MB
Total Execution		        0.487	9.33MB

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Tue, 2014-04-29 13:43

Hi Dave,

Any idea what can cause this, irregular, slowness?

Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-04-30 13:35

Your host would be the best bet for irregular issues. Software does not change over time.
This is what I see now. Perhaps some maintenance procedure (like backups) on the server when it is slow?

Benchmarks	Count	Time	Memory
Kohana Loading	        1	0.487	2.45MB
Environment Setup	1	0.470	1.79MB
System Initialization	1	2.893	4.53MB
Controller Setup	1	0.147	0.12MB
Controller Execution	1	3.864	2.32MB
Total Execution		        7.390	9.42MB

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Mystical

Joined: 2011-04-12
Posts: 4
Posted: Mon, 2014-05-05 22:46

I have no more this problem since using php as fastcgi. Very good is using keep alive as well.

OS: FreeBSD 10.0-RELEASE
Apache: 2.2.24
PHP: 5.4.28
MySQL: 5.5.37-log
Server load: 0,103515625 0,150390625 0,15478515625
Grafický toolkit: imagemagick

 
jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Wed, 2014-05-07 16:37

I've contacted my hosting. They tell me that they've already changed the memory from 64 to 128MB. I asked them for a solution, but I didn't get one yet.

Maybe you can tell me something more with this information.

 
Mystical

Joined: 2011-04-12
Posts: 4
Posted: Mon, 2014-05-12 10:50

How many modules are you using? Disable all modules what you arent using, disable more modules to test performance (for example search, tags...).

Create info.php and visit this page in browser:

Quote:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Chceck if Server API is CGI/FastCGI.

Your memory limit should be fine now:
PHP Memory Limit: 32M should be the minimum for PHP's memory limit if you're restricted to using GD as your image toolkit. Processing images with GD eats into PHP's allotted memory and can get consumed rather quickly with even smaller images.

 
jptned
jptned's picture

Joined: 2014-03-08
Posts: 6
Posted: Mon, 2014-05-12 13:32
Mystical wrote:
How many modules are you using? Disable all modules what you arent using, disable more modules to test performance (for example search, tags...).

Create info.php and visit this page in browser:

Quote:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Chceck if Server API is CGI/FastCGI.

Your memory limit should be fine now:
PHP Memory Limit: 32M should be the minimum for PHP's memory limit if you're restricted to using GD as your image toolkit. Processing images with GD eats into PHP's allotted memory and can get consumed rather quickly with even smaller images.


Currently I use the following Modules (translated from Dutch):

  • Akismet
  • Code Block
  • Comments
  • Imageblock
  • Info
  • Organize
  • Search
  • Social Share
  • Tags

I've tried disabling Modules, but it doesn't have any effect.

Results of phpinfo() can be found here. My server seems to be using CGI.

I got another response of my hosting. Quickly translated, this is what it sais:

Research shows that Gallery3 has this often, these are my findings on the Google search.
More people, independently of a hosting provider, are affected. 

The only thing I can recommend is the Webhosting Plus package, this platform can be able to help with the speed. 
And as a final alternative, you may choose another album script / plugin.