Gallery load times

Alienswede

Joined: 2002-09-23
Posts: 2
Posted: Mon, 2002-09-23 04:43

Hi there,

I realize this might be a bit of a vague problem description but I'll try my best to describe what's happening. I have a fairly large gallery at http://www.dallasraves.org/pictures . As of right now there's 370 albums and 5914 photos in total. Any time the first index page is loaded the page takes at least 10 seconds to load. It used to be quite snappy. I recently upgraded from gallery 1.2.5 to 1.3.1 in the hopes that it would alleviate the problem but it still persists. Any ideas as to what might be causing this slowdown? If I monitor the load averages on the box, sometimes when the gallery is being browsed it shoots up to 15+ whereas normal load is around 2-3. The box is a PIII 800Mhz, 512Mb, RAID-5 Redhat 7.2 system running Apache 1.3.26 and PHP 4.2.2.

Is the size of the albums.dat database affecting the loadtime? Any ideas anyone could help shed on this problem would be appreciated.

On another note, after having upgraded, gallery calimed about 20 or so of my albums were invalid. These albums worked perfectly fine before the upgrade. Is there any way I can rebuild these albums without having the users upload the pictures again?

Thanks,

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2002-09-23 07:43

The main issue is that Gallery's current data management scheme consumes a huge amount of memory. We have a patch in the pipeline to rectify this situation, but for now, you could try the solution I mention here:

http://gallery.menalto.com/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=168&530

It may reduce your loads considerably.

 
Alienswede

Joined: 2002-09-23
Posts: 2
Posted: Mon, 2002-09-23 18:25

Thank you for the quick response. I've implemented the quick-fix mentioned in that thread and it seems to have helped a wee bit, although not much. I am eagerly awaiting G2 :smile:

I'm certain you get this question constantly but do you have a ballpark estimate as to when a compilable version of G2 might be available on cvs? I've been using your wonderful software since very early on and there's just no other gallery software out there that comes even close to being this good. This latest performance issue is the only problem I've ever had. I think alleviating the data management with MySQL is just what gallery needs.

Thanks again,

EDIT: My apologies, I just now found the roadmap. I think that just about answers my question assuming you are still on target? :smile:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-24 02:28

G2 is scheduled to have a limited alpha on October 15. That date might slip, though since things are really heating up in my day job. Keep an eye on <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=G2%20Project%20Development%20Roadmap" TARGET="_blank">G2 Road Map</A><!-- BBCode End -->

 
JnGDotCom

Joined: 2002-09-26
Posts: 5
Posted: Thu, 2002-09-26 02:37

We've got about 60 albums with about 13,000 images... load times are insanely slow. Had to up the page timeouts and tweak a few other things to keep it in the "acceptable pause" range... I imagine that moving to a sql-based db engine would speed things up considerably and provide a lot more options for data manipulation.

We ditched a commercial solution to switch to Gallery™ specifically for it's open architecture. The other code was perl/mysql (relatively speedy) and had a pretty funky template system, but it was a mess to manipulate. We are, however, working on a model of their eCard subsystem that will interface directly with Gallery™ (whenever we get around to finishing it).

I've also noticed that when you get over 1000 images in an album, there's an inherit delay in processing -- simply from system level directory parsing (1000 images * 3 files per + db files = 3010+ files)... perhaps a configurable subdir scheme for the thumbs/sized/etc files? The old "fewer files in a dir" addage...

If you're rounding up G2 beta sites, count me in!

:grin:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-09-26 03:23

There are several things that can help you here.

1. Cache the top level page as outlined here: http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=168&amp;530

2. Jesse Mullan has a speedup patch that separates the album data from its metadata -- this should cause a significant speedup for large galleries. He's in the final stages of testing it. Read the gallery-devel mailing list archives (there's a link to the mailing lists on the nav bar to the left) and send him an email if you can help him test it out.

3. Split up your gallery into many smaller galleries: http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=554&amp;2191

G2 is actually a tiny bit slower for very small Galleries, but is very consistently speedy and scales nicely as your Gallery gets larger. I've tested it with 10,000 items and experienced performance as good as G1 with 100 photos. G2 also splits out the derivative images (thumbnails, resizes) into a separate directory tree to cut down on the filesystem load.

We'll definitely need G2 beta sites. You can download the code now and play with it -- read the gallery-devel archives for info on that also.