My Gallery 3 is very slow

hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 08:58

On my side i run to different galleries.
One with 4images and one with gallery3

www.softengineer.de/
www.softengineer.de/gallery3

At the moment gallery3 is very slow.
And i don't know why. The other gallery works fast.

* Version: 3.0.1 (Menlo Park)
* Albums: 7
* Photos: 32

* Host name: SunOS localhost 5.10 Generic_139556-08 i86pc
* Operating system: SunOS localhost 5.10 Generic_139556-08 i86pc SunOS localhost 5.10 Generic_139556-08 i86pc
* Apache: Unknown
* PHP: 5.2.17
* MySQL: 5.0.91-log
* Server load: 5.87890625 5.09765625 4.73046875
* Graphics toolkit: gd

I have to mention, that both galleries share the same data base,
(I am limited to use only one database, by my provider)
but i think this should not be the problem.

Thank you in advance.

 
tlwmsu
tlwmsu's picture

Joined: 2009-09-23
Posts: 21
Posted: Wed, 2011-02-16 12:34

Take a look at http://gallery.menalto.com/node/96742

? Might be similar issues?

-------------------
Gallery 3 Album Up! (Under Construction and only 2 main albums are public)
http://www.buzzardsroost.us/gallery3

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 14:49

@tlwmsu

changing gallery3/application/config.config.php
/**
modified because of performance
$config["internal_cache"] = FALSE;
$config["internal_cache_path"] = VARPATH . "tmp/";
*/
$config["internal_cache"] = 3600;
$config["internal_cache_path"] = VARPATH . "tmp/";

improves the performance, but still i don't know
the reason why the system is so slow.

Hm?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2011-02-16 15:20

There is a developer module that has some info that can be gained as well. Install the developer module and enable the option.
Post the results.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 15:30

@dave
where can i find it? under the modules there is none.

 
cnakamoto
cnakamoto's picture

Joined: 2009-11-12
Posts: 10
Posted: Wed, 2011-02-16 15:39

Look at http://www.gallerymodules.com/ and search for developer.

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 15:48

@cnakamoto
thank you. :)

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 16:12

$config["internal_cache"] = FALSE;


Benchmarks	Count	Time	Memory
Kohana Loading	1	0.273	0.87MB
Environment Setup	1	0.262	0.50MB
System Initialization	1	11.056	2.09MB
Controller Setup	1	0.079	0.03MB
Controller Execution	1	10.498	1.74MB
Total Execution		21.907	4.74MB
Session	Value
session_id	01d49de5bf609afb4981829622e6452f
total_hits	25
_kf_flash_	

Array
(
)

user_agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET
CLR 3.5.30729)
ip_address	62.245.183.130
last_activity	1297872122
user	User_Model [object]
group_ids_timeout	1297957899
csrf	a04f04d33a405428c9671a6914138d85
group_ids	

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

active_auth_timestamp	1297871499
admin_area_activity_timestamp	1297872125
debug	1
profiler	1
Cookies	Value
gd_sidebar	right
gd_sidebar_pos	right


Benchmarks	Count	Time	Memory
Kohana Loading	1	0.273	0.87MB
Environment Setup	1	0.262	0.50MB
System Initialization	1	11.056	2.09MB
Controller Setup	1	0.079	0.03MB
Controller Execution	1	10.498	1.74MB
Total Execution		21.907	4.74MB
Session	Value
session_id	01d49de5bf609afb4981829622e6452f
total_hits	25
_kf_flash_	

Array
(
)

user_agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET
CLR 3.5.30729)
ip_address	62.245.183.130
last_activity	1297872122
user	User_Model [object]
group_ids_timeout	1297957899
csrf	a04f04d33a405428c9671a6914138d85
group_ids	

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

active_auth_timestamp	1297871499
admin_area_activity_timestamp	1297872125
debug	1
profiler	1
Cookies	Value
gd_sidebar	right
gd_sidebar_pos	right


-----------------------------------------------

$config["internal_cache"] = 3600;


Benchmarks	Count	Time	Memory
Kohana Loading	1	0.080	1.01MB
Environment Setup	1	0.065	0.64MB
System Initialization	1	1.565	2.08MB
Controller Setup	1	0.002	0.03MB
Controller Execution	1	6.089	1.72MB
Total Execution		7.736	4.84MB
Session	Value
session_id	01d49de5bf609afb4981829622e6452f
total_hits	36
_kf_flash_	

Array
(
)

user_agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET
CLR 3.5.30729)
ip_address	62.245.183.130
last_activity	1297872429
user	User_Model [object]
group_ids_timeout	1297957899
csrf	a04f04d33a405428c9671a6914138d85
group_ids	

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

active_auth_timestamp	1297871499
admin_area_activity_timestamp	1297872429
debug	1
profiler	1
Cookies	Value
gd_sidebar	right
gd_sidebar_pos	right

Kohana Loading	1	0.080	1.01MB
Environment Setup	1	0.065	0.64MB
System Initialization	1	1.565	2.08MB
Controller Setup	1	0.002	0.03MB
Controller Execution	1	6.089	1.72MB
Total Execution		7.736	4.84MB
Session	Value
total_hits	36
_kf_flash_	

Array
(
)

user_agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET
CLR 3.5.30729)
ip_address	62.245.183.130
last_activity	1297872429
user	User_Model [object]
group_ids_timeout	1297957899
csrf	a04f04d33a405428c9671a6914138d85
group_ids	

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
)

active_auth_timestamp	1297871499
admin_area_activity_timestamp	1297872429
debug	1
profiler	1
Cookies	Value
gd_sidebar	right
gd_sidebar_pos	right

Is this the info you need?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-02-16 16:21

First thing I'd try is switching to the default Wind theme and disabling as many (all) 3rd party modules that don't ship with G3 and see if that improves things. If it's a dramatic improvement, then try enabling them 1 by 1 and see what slows it down.
____________________________________________
Like Gallery? Like the support? Donate now!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 16:42

switching to wind doesn't solve the problem.
The gallery is still very slow.
The only thing that helps is setting
$config["internal_cache"] = 3600;
Then the Total Execution can reach times < 1 second.
Yes not on the first time the side is opend, but on the second.
Cache of course.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-02-16 16:54

Did you disable all 3rd party themes? I still see things like your Flag Counter, Impressum.
____________________________________________
Like Gallery? Like the support? Donate now!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 17:12

No i did.
I added impressum after i noticed that it is very slow.
The counter i can remove, but i need it.
But you right, this may make it easier to search for the error.
But my other gallery is fast with it.

But okay, I removed all. ;)
Still slow.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-02-16 17:37

hmm, still slow. Dave any ideas? If not I think I'll poke Bharat to see if he can trouble shoot further.

Can you tell us any more about your setup? Do you know if the database is running on the same physical machine as your site?

Do you know how your disk space is mounted? Is is a local physical drive or it is mount through NFS?
____________________________________________
Like Gallery? Like the support? Donate now!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-16 19:23

At the moment i do know have the wished infos, but i sent a mail to the provider and
waiting on the answer. As soon as i get it i will inform you.
:)
Thank you in advance, Hannes

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2011-02-17 03:02

The load average is high, but I've seen worse. My bet is that it's a networked fileshare causing all file operations to be really, really slow. ssh to your server and run "df" and report back with what you find.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Thu, 2011-02-17 10:44

Sorry it seems that i can not connect per ssh. :(
Connection refused. :(
Yes, i have no ssh access. :(

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2011-02-17 14:10

Ask your host if they can get that information for you

____________________________________________
Like Gallery? Like the support? Donate now!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Fri, 2011-02-18 09:02

I will ask them. :)

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Fri, 2011-02-18 17:26

:(
They don't give me any information and told me
that the command would provide secured data of other
users. :(
Also say said that the average response time would be
0,2 seconds and that this would be very good.
Yes, all of this does not help.

More infos and i hope this helps

disk space (max)400 MB (used)249 MB (free)150 MB(38 %)
Traffic 51200 MB

Sorry

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2011-02-18 18:07

They won't tell you if the disk is network mounted or local?
____________________________________________
Like Gallery? Like the support? Donate now!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Sat, 2011-02-19 00:02

They won't run the df command, and give me the information.
At the moment i think about changing the provider.
He is to expensive for the the thing he supplies.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2011-02-19 04:07

Try this. Create a file called "test.php" and put this in it:

<pre>
<?
system("/bin/df");
?>

Then open that in your browser. What do you see?
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Mon, 2011-02-21 10:12

I opened it in firefox, but nothing happens.
www.softengineer.de/test.php

okay, the offerd me a small upgrade.
So know i have a ssh connection.

BUT entering df
returns with df:Command not found.

So this does not work.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2011-02-21 20:57

Hum. You're probably running in a chroot jail (http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=chroot+jail) which limits what you can actually do on the system.

Basically what I suspect is that your system has really slow disk access and this is what's making Gallery slow. This is the most common cause we've seen for this type of terrible performance. We can spend a lot of time trying to diagnose it, but in all likelihood it's not something that we can fix. There's a slim chance that the problem is something else, but it'll take some time to diagnose with the tooling you have available. I'll be willing to ssh in and take a look, but I've got a considerable backlog so I wouldn't be able to investigate for at least a week. In the meantime, if you can get your ISP to tell you whether or not they're using networked file shares for the directories where your Gallery code lives, that would help a lot. You might point them at this forum topic and see if they just want to talk to us directly here.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Tue, 2011-02-22 10:47

Hello and thank you again.

I send all your questions to the provider and hope he will answer them.

In the mean time a installed 3.01 new in
http://www.softengineer.de/gallery3second/index.php/
with a new database. Now are only entries of gallery3 in that
database. It is still very slow.
It seems that the database is on an other server than the software.
Cause i have to enter a server url rdbms.strato.de
Can this cause the problem?

But this server can't so slow, cause my other gallery www.softengineer.de
runs with it in a normal way.
This gallery uses my webspace and the database on rdbms.strato.de

I tried ssh, and have to say, that it does not seem that i am
in a chroot jail. I can step to the upper directories.

My webspace is big enough. I have 2700 MBytes of free space.

I will inform you what my provider answers.
P.S. i sent him your post.

run on http://www.webpagetest.org/
http://www.webpagetest.org/result/110222_78_1E72/1/details/#request4
I entered my site
www.softengineer.de/gallery3second

# Resource Content Type Start Offset DNS Lookup Initial Connection Time to First Byte Content Download Bytes Downloaded Error/Status Code IP Location*
1 http://www.softengin...er.de/gallery3second text/html - 47 ms 142 ms 160 ms 0 ms 0.5 KB 301 81.169.145.157 Berlin, Germany
2 http://www.softengin...r.de/gallery3second/ text/html 0.349 s - - 4827 ms 152 ms 11.9 KB 200 81.169.145.157 Berlin, Germany
3 http://www.softengin.../wind/css/fix-ie.css text/css 5.434 s - 144 ms 167 ms 5 ms 1.0 KB 200 81.169.145.157 Berlin, Germany
4 http://www.softengin...9c55101ffbffacc8d8b1 application/javascript 5.437 s - - 3662 ms 473 ms 72.4 KB 200 81.169.145.157 Berlin, Germany
5 http://www.softengin...425fdb11216df80f8eac text/css 9.648 s - - 3861 ms 44 ms 14.9 KB 200 81.169.145.157 Berlin, Germany
6 http://www.softengin.../lib/images/logo.png image/png 9.649 s - 157 ms 167 ms 302 ms 10.3 KB 200 81.169.145.157 Berlin, Germany
7 http://www.softengin..._1_.JPG?m=1298369058 image/jpeg 13.576 s - - 161 ms 21 ms 4.6 KB 200 81.169.145.157 Berlin, Germany
8 http://www.softengin..._1_.JPG?m=1298369058 image/jpeg 13.578 s - 158 ms 163 ms 168 ms 6.3 KB 200 81.169.145.157 Berlin, Germany
9 http://e.cooliris.co...deshow/v/37732/go.js application/x-javascript 13.596 s 134 ms 136 ms 143 ms 0 ms 0.9 KB 200 216.211.172.39 Palo Alto, CA
10 http://www.softengin..._1_.JPG?m=1298369062 image/jpeg 13.76 s - - 161 ms 17 ms 3.2 KB 200 81.169.145.157 Berlin, Germany
11 http://www.softengin..._1_.JPG?m=1298369062 image/jpeg 13.939 s - - 162 ms 15 ms 5.0 KB 200 81.169.145.157 Berlin, Germany
12 http://www.softengin..._1_.JPG?m=1298369067 image/jpeg 14.069 s - - 159 ms 13 ms 7.4 KB 200 81.169.145.157 Berlin, Germany
13 http://www.softengin...bum.jpg?m=1298369299 image/jpeg 14.117 s - - 197 ms 23 ms 5.6 KB 200 81.169.145.157 Berlin, Germany
14 http://www.softengin..._1_.JPG?m=1298369068 image/jpeg 14.242 s - - 161 ms 31 ms 10.8 KB 200 81.169.145.157 Berlin, Germany

Thank you in advance, Hannes

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Tue, 2011-02-22 12:39

So here now the answer i got:
---------------------
Eine Nutzung von networked file shares findet nicht statt. Man könnte auf den Begriff chroot jail schliessen, in Ihrem Webhosting Paket haben Sie nur Möglichkeiten in dem für Sie freigegebenen Bereich.
Nutzen Sie alternativ bitte die Möglichkeiten unserer dedizierten Server und virtuellen Server, dort können Sie alle Einstellungen selbst mit root Rechten vornehmen und sind der einzige, der Last auf dem Server erzeugt. Daher ist dort eine efiziente und hoch performate Nutzung von grossen Skripten wie dem von Ihnen genutzen Gallery 3 möglich.
---------------------
Meaning. Network file shares is not used.
Futhrer the told me to use a new package with virtual server,
Where only i and my users would use the server.
This would enable the use of big scriptes like the one of
Gallery3.

What a cool provider, no solution but upgrade.
I thing he is from marketing.

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-23 15:23
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2011-02-23 17:48

That is really weird. Ok, would you share your ssh info with me in a private message? I'll try to dig into it this week and see if I can figure out what's going wrong here. It should not be anywhere close to that slow.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Wed, 2011-02-23 18:36

the data comes via pm
THANK YOU!!!

 
moxli
moxli's picture

Joined: 2011-02-04
Posts: 3
Posted: Fri, 2011-02-25 11:43

bharat,

I have my gallery3 running slow too. I takes up to 30 sec in FireFox to navigate on my http://domiam.net/gallery3. I've tried all the fixes described here and in many other threats. I changed "internal_cache" to 3600. I made the changes to my php.

Man, you won't believe how much I've done! But since October, 2010 I can't find the thing that slows my site down. Even though I use it on my own Synology DS209, it shouldn't be so slow.

WHAT I FOUND OUT is WHEN I START NAVIGATE TO GALLERY3 MY HTTPD eats up to 100% of CPU. Even on my Joomla I find it much lower. And it doesn't depend on how much photos and albums I have . Every single operation such a "Login" or "Loguot" eats up to 70%!

I don't know what to do. It might be involved with the same problem why I can't get access to imagemagick due to open_basedir restrictions. Though I added /opt/bin/convert in php.ini, I still have that restriction isn't resolved. I don't really know why. So I decided that might be the issue with the same root that my site "buzzing".

I'm not such a guru, like you are.. Well it might be a problem:) why can't find the answer.

Would you be so kind to check out when you have a time. Should you have SSH access, and other access let me know about that.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2011-02-25 14:40

moxli,
Send bharat a PM ((write to author) in his posts) login,SSH details and he is willing to take a look.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2011-02-25 17:57

@hannes61: I figured out what's wrong with your site. As of 3.0.1, we're shipping a php.ini file in the gallery3 directory to assist for some sites which have overly loose security settings. In your provider's case, that php.ini is overriding their own version and is resulting in a poorly tuned PHP configuration. I've moved the php.ini out of the way and re-enabled caching in application/config/config.php and now your site is quite fast for me. Take a look! (note: I modified gallery3, not gallery3second)

@moxli: Try moving your php.ini out of the way, and if that doesn't help then please send me a PM with ssh access and I'll take a look.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!

 
moxli
moxli's picture

Joined: 2011-02-04
Posts: 3
Posted: Fri, 2011-02-25 18:41

But what do you mean by :".. moving your php.ini out of the way" ?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Fri, 2011-02-25 19:01

@moxli: Just log onto your website's ftp, go to the Gallery3 folder, and delete the php.ini file (or just rename it to something else temporarily).

 
hannes61

Joined: 2011-01-12
Posts: 37
Posted: Sat, 2011-02-26 07:57

@bharat
THANK YOU VERY MUCH!!!
NOW IT WORKS VERY GOOD!
I LIKE IT :)
NOW THE MOD AND THE USER PART IS FAST :)
THANK YOU and all guys working on it,
Hannes

 
ajorgereis

Joined: 2008-09-06
Posts: 132
Posted: Sun, 2011-10-23 00:15

HI Dave or Bharat

my gallery is extremely slow for a long time. What can I do? Module is not, because I disabled ones almost all. I've done this

4 /** 65 * Length of time of the internal cache in seconds. 0 or FALSE means no caching. 66 * The internal cache stores file paths and config entries across requests and 67 * can give significant speed improvements at the expense of delayed updating. 68 */69 $config["internal_cache"] = 3600; 70 $config["internal_cache_path"] = VARPATH . "tmp/";

 
ajorgereis

Joined: 2008-09-06
Posts: 132
Posted: Sat, 2011-10-29 17:34
ajorgereis wrote:
HI

my gallery is extremely slow for a long time. What can I do? Module is not, because I disabled ones almost all. I've done this

4 /** 65 * Length of time of the internal cache in seconds. 0 or FALSE means no caching. 66 * The internal cache stores file paths and config entries across requests and 67 * can give significant speed improvements at the expense of delayed updating. 68 */69 $config["internal_cache"] = 3600; 70 $config["internal_cache_path"] = VARPATH . "tmp/";

www.ajorge.net

www.ajorge.net

 
jenshenrik
jenshenrik's picture

Joined: 2011-10-30
Posts: 1
Posted: Sun, 2011-10-30 18:47

The Module "Navigation Carousel" REALLY slows down Gallery3.
- If you have it installed, remove/disable it.

After i disableded the module, everything is OK again :)

Off Topic:
In stead I use the module "Album Carousel"
Eventualle read this post, where to place the carousel:
http://gallery.menalto.com/node/100455