Announcement

#1 2012-06-28 19:58:57

rbr28
Member
Bloomington, IN USA
2010-07-13
35

[resolved] Trying to figure out Piwigo 2.4 thumbnails

I'm very confused about how 2.4 is handling thumbnails.  After upgrading my album pages load very slowly, and the thumbnails load very slowly.  It seems almost like a full resolution version of the images is loading as the thumbnails, and the view is just resized.

I actually host my server on my home workstation, so I edit my images and save them directly to my Piwigo directly.  In the past I would then use Piwigo to generate the thumbnails, and then sync.  The thumbnails would reside in the thumbnail directory with a TN prefix.  Now when I do the same thing, I have no option to generate the thumbnail, and there are no thumbnails created in the thumbnail directory after I sync...yet there are thumbnails for the images.

That's what's confusing me.  If there are no resized images, that says to me that the full resolution image is just being scaled for the thumbnail view, and that would certainly explain why my pages are loading so much slower.  I suppose another option is that the thumbnails are now stored in the database. 

Other pertinent information:  Under configuration options for photos, I left the thumbnail and square options at their default sizes.  I unchecked all the other options except for XXL - huge, and changed that size to 9000x9000 are just always at full resolution.  I'm using the stripped theme and my settings for that are to use the thumbnail size for both album thumbnail and thumbnail size, and XXL for the image size.

Anyway, is there any documentation or can someone explain to me how the thumbnails are supposed to be generated in 2.4 and what might be causing the incredibly slow loading of thumbnails since my upgrade?

Thanks,
Vern

Last edited by rbr28 (2012-06-29 15:38:54)

Offline

 

#2 2012-06-28 20:05:37

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3271

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

hi
did you read that http://piwigo.org/releases/2.4.0#multiple_size ?
all sizes are cached into _data/i, only the first view take a while

it's not recommanded to unchecked all medium sizes because the full size will always be entirely loaded, even if resized by the browser

Last edited by mistic100 (2012-06-28 20:07:15)

Offline

 

#3 2012-06-28 21:39:21

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13276

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

Hi rbr28,

I agree that loading a page of missing thumbnails is very slow on your website. When the thumbnail is not in the cache (has not been generated yet), Piwigo loads it from i.php and then displays it. Thumbnails are generated 3 by 3 to avoid overload on your server.

I have opened a page with missing thumbnails (in the "Trees" album) and thanks to the console in Firebug, I see the i.php request in AJAX, 3 by 3. BUT then it is very slow to display the thumbnail.

If I remember correctly, you're not using Apache. Maybe you have an equivalent of the keep-alive setting and a very limited number of simultaneous threads.

Another solution is to build all thumbnails in the cache, without waiting for the visitors to generate thumbnails. You can do it from the Batch Manager.

Offline

 

#4 2012-06-29 03:13:27

rbr28
Member
Bloomington, IN USA
2010-07-13
35

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

Thanks for the excellent information as usual.  I had seen the information about the various size thumbnails, but I don't remember seeing the information about how or where those images were stored.

I am using lighttpd but the default settings that I've kept are below, and way more robust than I would ever need for my server (which typically has no more than a few simultaneous users).  It also wouldn't necessarily explain why things were fine until after the upgrade.

server.max-keep-alive-requests = 128
server.max-keep-alive-idle = 30
server.max-read-idle = 60
server.max-write-idle = 360

My Piwigo 'galleries' directory is actually a symbolic link to a directory on a faster drive than the one the web server root is on.  This may be having some impact since my thumbnails were in that directory, and already generated with Piwigo 2.3.x, but now the thumbnails are being created dynamically on a slower drive.  Things do seem much faster after the images are cached, but just to be safe I'm going to try relocating the _data directory to the faster drive, which I would have done anyway for other reasons.

Thanks again for all the good information.

Vern

Offline

 

#5 2012-06-29 09:22:50

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13276

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

Hi rbr28, once you have move _data to a faster drive, please tell us if it becomes lightning fast :-) then we can mark this topic as resolved.

Offline

 

#6 2012-06-29 15:37:43

rbr28
Member
Bloomington, IN USA
2010-07-13
35

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

The issue can definitely be marked resolved.  I was a bit surprised, but moving the _data directory to the faster drive definitely makes a very significant difference.  The slower drive is an older 250GB drive with I think an 8MB cache, versus a very new 2TB drive with a 64MB cache, both 7200rpm SATA drives.  It's still obvious when the thumbnails haven't been created, but the individual thumbnails load almost immediately, where previously you could watch each one loading slowly as if I was on a modem connection.  Now I'm thinking it might be worthwhile to move my database too.

Vern

Offline

 

#7 2012-06-29 16:02:26

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13276

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

Maybe it's a bit faster, but it's still very slow in my opinion. I really think this is related to the web server and not to your HDD (on my desktop computer I have "old" 160GB drives, they are much faster than what I see on your website)

Offline

 

#8 2012-06-29 22:28:03

rbr28
Member
Bloomington, IN USA
2010-07-13
35

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

I reinstalled apache 2.2.22 (configured with the worker MPM), pointed it to the same root, and the thumbnails that were not pre-generated did load a good bit faster.  I've grown to dislike apache over the years so I'm not all that motivated to go back to it.  I'll have to keep looking and see if I can figure out why there's suddenly a bottleneck with lighttpd.

Vern

Offline

 

#9 2012-06-29 22:34:26

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13276

Re: [resolved] Trying to figure out Piwigo 2.4 thumbnails

OK, now we can say it's fast.

When you have time, I would be very interested in your investigation on Lighttpd.

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact