Multiple random blocks and slow performance

tigerstripedcat

Joined: 2005-06-20
Posts: 7
Posted: Mon, 2005-06-20 23:32

I have 6 randomblocks which fetch random images. However, like others, I have serious performance problems because of it. The loadtime of my site goes from 5sec to 15-20sec. From checking the logs, it seems to be when gallery is generating random images. I have ~3000 pictures and I'm using gallery2. I don't know if this matters.

I hope there's a solution because, my site looks nice with the images.

Thank you!

 
tigerstripedcat

Joined: 2005-06-20
Posts: 7
Posted: Tue, 2005-06-21 02:36

If it helps. It seems if I reference the randomblock to localhost instead of the actual website name it is much faster. But this doesn't help me much because if it's set up this way it will only display properly on the localhost.

Anyone?

 
tigerstripedcat

Joined: 2005-06-20
Posts: 7
Posted: Tue, 2005-06-21 02:44

Acording to my apache access.log you can see that it takes the webserver 10 seconds to fetch each random image. Is this normal?!

192.168.1.1 - - [20/Jun/2005:22:38:17 -0400] "
192.168.1.1 - - [20/Jun/2005:22:38:17 -0400] "
....
192.168.1.1 - - [20/Jun/2005:22:39:29 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 399 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:39:39 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 408 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:39:50 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 399 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:40:01 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 402 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:40:14 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 402 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /gallery/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none HTTP/1.0" 200 399 "-" "-"
192.168.1.1 - - [20/Jun/2005:22:39:19 -0400] "GET / HTTP/1.1" 200 17438 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /styles-site.css HTTP/1.1" 304 - "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /img/contrails.jpg HTTP/1.1" 304 - "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=88&g2_serialNumber=2 HTTP/1.1" 200 4148 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=4318&g2_serialNumber=2 HTTP/1.1" 200 2675 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=2362&g2_serialNumber=2 HTTP/1.1" 200 3805 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"
192.168.1.1 - - [20/Jun/2005:22:40:24 -0400] "GET /gallery/main.php?g2_view=core.DownloadItem&g2_itemId=1945&g2_serialNumber=2 HTTP/1.1" 200 2609 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1"