Drupal and Gallery 2 slow

Hi everyone,

I have both Drupal and Gallery 2 installed on my site. And they are both very, very slow. You can wait up to around 20 seconds for a single page to load /without/ the images!

Considering the official sites for both those applications seem to have no problems with speed, and static pages load really fast, is this just something happening with the MySQL servers at Dreamhost? If so, is it going to be resolved?

I can understand that dynamic sites generated by Drupal, Gallery 2, and any other similar application is a bit more expensive on resources, but I don’t think it should be that slow…

Any ideas? Thanks in advance.

I created a similar thread about Gallery2. My speeds aren’t quite as slow as yours, but they’re pretty bad. If you turn on accelleration, that helps, but the pages still don’t seem to be fast. :frowning:

Check out Gordaen’s Knowledge, the blog, and the MR2 page.

I read about APC (Alternate PHP Cache):


And read that Drupal speeds up a lot once that is install, according to those benchmarks:

I’m guessing it will help Gallery also. However, when I tried to install it myself (in my directory on their server, so I can use only for my hosts) via ssh, phpize returns the following error:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

I cannot install the extension, even for just myself. I wonder if Dreamhost can do anything for us… I’d suggest they can install it but leave it disabled by default (by setting apc.enabled to 0 in their php.ini), since it is rarely needed. Those who need it can put the following directive in their .htaccess file:

php_flag apc.enabled on

And that would enable it!

A good part of the problem is that you have to run Gallery as a CGI application, which is much slower than mod_php. And toggling mod_php on for it isn’t an option because certain PHP functions that Gallery needs are disabled under mod_php.

[quote]Those who need it can put the following directive in their .htaccess file:

php_flag apc.enabled on[/quote]
The problem with this is that you can only set PHP options via .htaccess if you’re using mod_php. There are workarounds for this though.

For the record, my Gallery installation is also deadly slow. The other part of the reason is that Gallery is hugely bloated. I’ll be dropping it just as soon as I can motivate myself to do the install/customize/evaluate thing with some of the other, more lightweight options out there.

If you want useful replies, ask smart questions.

It’s true. Though, I can still set many php.ini options within PHP scripts, and most PHP applications have their configuration in an included PHP file. In this case, I could simply add the following at the top of the configuration file and enable APC:

ini_set(‘apc.enabled’, 1);

I know Drupal and Gallery are big apps, but having APC or eAccellerator would be nice to have.