Performance

pr1001

Joined: 2005-08-26
Posts: 2
Posted: Fri, 2005-08-26 07:02

This is a question not necessarily related directly to development, but hey...

Does Gallery 2 perform much better than v1? I have an old installation of v1 and it seems quite sluggish. In fact, I believe it crashed my server when one of the sub-galleries got linked to on craigslist. I believe this is happening because Gallery is creating thumbnails dynamically with ImageMagick, rather than creating them once when the photos are uploaded. Has this been changed? Maybe even in a later version of v1?

The reason I ask is that I need to upgrade and I'm trying to decide with it's worth staying with Gallery (which otherwise has been a very good program) or would be better to switch to Coppermine or Minigal. Thanks.

Login or register to post comments
laga

Joined: 2005-08-20
Posts: 5
Posted: Fri, 2005-08-26 08:00

hello,

just stay at your old one.

(ecuse my english, i am from romania)

so. since more than 4 weeks, since i have try Gallery2 Bingo3 it´s look like hell to me. i have a dedicated debian server and i try to install reinstall reconfigure the whole server. to set time limits, execution limits and all what i know (not much because i do not know php).

so. here it is. gallery 2 right now goes for maximum 3 users in the same time online. maybe i must say -3.

i try to embed it in mambo. that´s much beter. (if you know a good joke). no. it´s not better. in fact it´s going down very quick.

i do not realy know what happend. it use smarty so i think it must goes quick but it doesn´t. i have 3 more sites with smarty, coded by friends. when i acces them an the server the server load doesn´t move. when i acces gallery 2, from the first page it´s goes if i am lucky to 0.30. if the internet connection is more than a modem, and even in romania i have 256k, it is your DEAD. (my server has 3.1 Gbit Backbone with no restriction on bandwidth)

scenarios
1) if you click 4-5 times with no waiting to load, you got a server load instantly at 3 or 4 points. than you must pray that it stops there and comes down.
2) if you surf to fast, and click on this image, and on the next image and so on, maybe you can see 10 or 20 pictures.
3) if you embed it in mambo, 3 or 4 pictures.
4) if you put imagemagick as the first coiche in the priority, pictures are loaded very quick, but the server crashing just as long as you can say "gallery 2". so i put gd as my fisrst coiche and hope to not have more than 3 visitors at the same time on my site till the next updat or a update of gallery will fix this problems.
...

i try to rebuild anything, to clean cache, to clean sessions from database, to delete and rebuild anything. if i am the only user of the gallery it´s ok. if there are more people look at it in the same time it´s goes BOOOM! and the best, your server too. the whole server. in apayhe and mysql there are so many query that you could not belive.

top - 10:53:35 up 18:58, 1 user, load average: 0.68, 0.50, 0.68
Tasks: 61 total, 2 running, 59 sleeping, 0 stopped, 0 zombie

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 my.server.nowhere:www crawl-66-249-65-7:37433 ESTABLISHED
tcp 0 0 my.server.nowhere:www crawl-66-249-65-7:62896 TIME_WAIT
tcp 0 0 my.server.nowhere:www my.ip...:3656 SYN_RECV
tcp 0 0 my.server.nowhere:www my.ip...:3658 SYN_RECV
tcp 0 0 my.server.nowhere:www my.ip...:3660 SYN_RECV
tcp 0 0 my.server.nowhere:www my.ip...:3652 SYN_RECV
tcp 0 0 my.server.nowhere:www my.ip...:3668 SYN_RECV
tcp 0 396 my.server.nowhere:ssh my.ip...:1266 ESTABLISHED

i write in this forum, so i am not active an my site. now could you multiply the server load (load average: 0.68) : 1) x 3 - in most cases google, yahoo and msn comes at the same time to visit me.
x N - who N is the number of visitors.

so. tha i must learn an my own skin. my advice. go kill yourself and take something else or take a crack of photoshop and put the automaticaly generated html files (there is a function that do a gallery for you with complete html) on the web. it´s must faster and secure than gallery2.

good luck
lucian

Login or register to post comments
laga

Joined: 2005-08-20
Posts: 5
Posted: Fri, 2005-08-26 08:08

tcp 0 0 my.server:www smanet.galati.ast:60094 TIME_WAIT
tcp 0 0 my.server:www aectracatv1.media:42419 TIME_WAIT
tcp 0 0 my.server:www servded5.myps.ro:1571 TIME_WAIT
tcp 0 0 my.server:www servded5.myps.ro:1571 TIME_WAIT
tcp 0 0 my.server:www aectracatv1.media:42415 TIME_WAIT
tcp 0 0 my.server:www servded9.myps.ro:1570 TIME_WAIT
tcp 0 0 my.server:www msnbot.msn.com:25129 TIME_WAIT
tcp 0 0 my.server:www 81.181.176.170:1413 TIME_WAIT
tcp 0 0 my.server:www 81.181.176.170:1412 TIME_WAIT
tcp 0 0 my.server:www crawl-66-249-65-7:35869 TIME_WAIT
tcp 0 132 my.server:ssh my.ip:1266 ESTABLISHED

Tasks: 76 total, 7 running, 69 sleeping, 0 stopped, 0 zombie
Cpu(s): 29.5% user, 25.6% system, 0.0% nice, 44.9% idle
Mem: 225284k total, 223072k used, 2212k free, 4584k buffers
Swap: 499928k total, 29084k used, 470844k free, 7692k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21377 www-data 11 0 14304 12m 3272 R 17.5 5.9 0:02.05 apache
4 root 8 0 0 0 0 S 12.3 0.0 2:42.43 kswapd
21519 www-data 7 0 8920 7888 3060 R 11.3 3.5 0:01.07 apache
21530 www-data 5 0 3056 1668 1348 R 6.5 0.7 0:00.20 apache
21527 www-data 4 0 3804 2588 2208 R 3.9 1.1 0:00.25 apache
21235 www-data 1 0 19644 18m 3536 S 1.9 8.3 0:03.21 apache

i start pto pray

Login or register to post comments
Panu

Joined: 2002-11-11
Posts: 37
Posted: Fri, 2005-08-26 08:26
laga wrote:
so. since more than 4 weeks, since i have try Gallery2 Bingo3 it´s look like hell to me. i have a dedicated debian server and i try to install reinstall reconfigure the whole server. to set time limits, execution limits and all what i know (not much because i do not know php).

Usually Gallery doesn't need a recompile for php.ini or httpd.conf changes?

laga wrote:
scenarios
1) if you click 4-5 times with no waiting to load, you got a server load instantly at 3 or 4 points. than you must pray that it stops there and comes down.

Do you mean percent?

laga wrote:
2) if you surf to fast, and click on this image, and on the next image and so on, maybe you can see 10 or 20 pictures.

Not a normal usage scenario I quess

laga wrote:
4) if you put imagemagick as the first coiche in the priority, pictures are loaded very quick, but the server crashing just as long as you can say "gallery 2". so i put gd as my fisrst coiche and hope to not have more than 3 visitors at the same time on my site till the next updat or a update of gallery will fix this problems.

I fail to see why that is a Gallery problem? Imagemagick is a separate program. Are you able to use imagemagick from the terminal, does it crash then?

laga wrote:
there are more people look at it in the same time it´s goes BOOOM! and the best, your server too. the whole server. in apayhe and mysql there are so many query that you could not belive.

If you wan't per item permissions for example it's going to take some queries from a database. Nothing a modern hardware couldn't handle. I have 256MB ram too on my server and I even run x server all the time on it and G2 works really well.

laga wrote:
so. tha i must learn an my own skin. my advice. go kill yourself and take something else or take a crack of photoshop and put the automaticaly generated html files (there is a function that do a gallery for you with complete html) on the web. it´s must faster and secure than gallery2.

Well this is a nice advice.

Instead of bashing have you tried seeking help from these forums?

Login or register to post comments
zenpig66

Joined: 2004-05-05
Posts: 6
Posted: Sat, 2005-08-27 22:54

I'm using RC-2 with 152 users and 31k+ images and it runs fine though I'd say a bit slower than G1 was going for me...nothing like what laga is describing. The move was necessary for me for with so many users, with quite a few being on at the same time, I was running into lock issues. G2 does seem to handle all of that quite a bit better and I truthfully haven't done much to attempt to speed it up yet...there are some resources here that I've been meaning to hunt down :)

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Sun, 2005-08-28 01:02

it's true that g2 is slower than G1 if you just have a few hundred images. that's because g2 needs to load a larger framework than g2, and because of G2's image firewall.

for a few thousand++ items, g2 should perform quicker than g1.

of course there are always webserver related issues. some people try to make g2 work on a p3 400mhz, which of course works, but is a little slow.
some users experience performance problems on a 3ghz p4. that shouldn't happen and is mostly due to very weird issues. mostly, g2 performs very well on such systems.
and as the faq on codex.gallery2.org explains, there are a few measures that you can take to make g2 perform faster on your webserver.

and as zenpig66 points out. flaming doesn't really help :)

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Sun, 2005-08-28 01:45

btw:

of course g1 and g2 generate the thumbnails and resizes on the fly when they are first needed. once generated, they are stored on the disk. so if you view a page that shows a thumb / resize for the second, 3rd, ... time, it is served from the disk, in g2 and in g1.

Login or register to post comments
fryfrog

Joined: 2002-10-30
Posts: 3233
Posted: Sun, 2005-08-28 04:14

G1 does NOT generate ANY images on the fly when they are needed. G1 ALWAYS creates the thumb, resize and (if it gets modified for some reason) full at upload ONLY. There are some scripts to help you comb over your album and change these, but its NEVER done on the fly.

G2 can generate the images on the fly OR at upload, depending on the check boxes (settings) you have picked. Your choice of when is dependant on you and how you feel about it. Doing it at upload will speed up the first visit by anyone, but slow down your upload time. Doing it on the fly at first view will speed up your upload, but make people wait longer to see first images.

Login or register to post comments
pr1001

Joined: 2005-08-26
Posts: 2
Posted: Mon, 2005-08-29 18:40
fryfrog wrote:
G1 does NOT generate ANY images on the fly when they are needed. G1 ALWAYS creates the thumb, resize and (if it gets modified for some reason) full at upload ONLY. There are some scripts to help you comb over your album and change these, but its NEVER done on the fly.

G2 can generate the images on the fly OR at upload, depending on the check boxes (settings) you have picked. Your choice of when is dependant on you and how you feel about it. Doing it at upload will speed up the first visit by anyone, but slow down your upload time. Doing it on the fly at first view will speed up your upload, but make people wait longer to see first images.

Great, that answers my question.

Login or register to post comments
smind

Joined: 2004-03-13
Posts: 5
Posted: Mon, 2005-08-29 19:54

Hi, G2 is great.

Is there a way to manually trigger a site- or album-wide rebuild?

On my older server hardware (dual P3-650), G2 is acceptible in speed for most things, but the resize operaton takes too long when a user hits an image for the first time. I have changed the alternate sizes of the images in my existing albums, and I'd like to get the server to generate the resized versions without waiting for a user to actually browse the images.

Can this be done?

Thanks

Login or register to post comments
Lapinoo
Lapinoo's picture

Joined: 2004-05-08
Posts: 363
Posted: Mon, 2005-08-29 21:20

There is a maintenance task for this operation.
Just go in the Site Admin, then Maintenance.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32356
Posted: Tue, 2005-08-30 12:43

the maintenance task builds missing and broken thumbs / resizes.
if you want to rebuild your existing thumbs / resizes, you first have to delete your existing ones in yourgalleryurl/lib/support/ delete derivative cache.

Login or register to post comments