Hi,
trying to debug the case of slow behavior with 4400 databases. http://sourceforge.net/tracker/index.php?func=detail&aid=1466527&gro...
In header.inc.php:
require_once './libraries/header_http.inc.php'; echo "trace before"; require_once './libraries/header_meta_style.inc.php'; echo "trace after";
When I click a db name on the left panel, I get 20 seconds between the "before" and "after". Can't find what is happening in header_meta_style.inc.php. There are some calls to PMA_generate_commun_url() but it does not seem to be the problem.
Of course, on a server with 20 databases the transition between "before" and "after" is immediate.
Ideas, someone?
Marc
Hi Marc!
When I click a db name on the left panel, I get 20 seconds between the "before" and "after". Can't find what is happening in header_meta_style.inc.php. There are some calls to PMA_generate_commun_url() but it does not seem to be the problem.
Are you sure it takes 20 seconds within that file, or just 20 seconds in your browser output? Because of HTTP chunking, it could appear that it takes so long for that simple file, while in real PHP time the time is spent somewhere else.
I would suggest you instead of echooing a string to echo the current timestamp, and then calculate the difference between the various timestamps...?
Regards, Garvin
Garvin Hicking a écrit :
Hi Marc!
When I click a db name on the left panel, I get 20 seconds between the "before" and "after". Can't find what is happening in header_meta_style.inc.php. There are some calls to PMA_generate_commun_url() but it does not seem to be the problem.
Are you sure it takes 20 seconds within that file, or just 20 seconds in your browser output? Because of HTTP chunking, it could appear that it takes so long for that simple file, while in real PHP time the time is spent somewhere else.
ok, using this require_once './libraries/header_http.inc.php'; $time_before = microtime(true); require_once './libraries/header_meta_style.inc.php'; $time_after = microtime(true); echo $time_after - $time_before;
I only get .0006 seconds. No significant differences when OBgzip is true or false. But still 20 seconds on my watch.
Web server A (Apache 1.3.34) is on a different machine than MySQL server B (MySQL 5.1.7, with 4400 dbs). When connecting Web server A to MySQL server C (MySQL 5.0.18, 100 dbs) there is almost no delay. I'm using Firefox.
So, something else is eating time but it's difficult to find using conventional tracing. I guess I'll have to use a debugger.
P.S. what is HTTP chunking? :)
Marc
I would suggest you instead of echooing a string to echo the current timestamp, and then calculate the difference between the various timestamps...?
Regards, Garvin
Hi Marc!
ok, using this require_once './libraries/header_http.inc.php'; $time_before = microtime(true); require_once './libraries/header_meta_style.inc.php'; $time_after = microtime(true); echo $time_after - $time_before;
I only get .0006 seconds. No significant differences when OBgzip is true or false. But still 20 seconds on my watch.
Okay, basically what I thought it would yield.
Web server A (Apache 1.3.34) is on a different machine than MySQL server B (MySQL 5.1.7, with 4400 dbs). When connecting Web server A to MySQL server C (MySQL 5.0.18, 100 dbs) there is almost no delay. I'm using Firefox.
I do think that the time delay you experience comes from the server table cylcing...
So, something else is eating time but it's difficult to find using conventional tracing. I guess I'll have to use a debugger.
Absolutely, yes. I'd suggest using the XDebug2 Profiler, I think I remember you'Ve worked with that before?
P.S. what is HTTP chunking? :)
HTPP 1/1 supports HTTP chunking; this splits HTTP result data into multiple chunks of data, and even also to compress each of those chunks. This often speeds ups transfer, because the server can already deliver the first chunks of data while it is still chewing on the rest of the execution. I think though this only works with mod_php, not CGI's.
So in that case, if a chunk is 2kb in size, it will send the first 2048 bytes of your HTTP request; and then it might take the script to load several other files before the next 2kb of data are sent; this could be the reason why you thought the delay happened inside that meta file, while in "real time" the slow response is dealt with in some DB execution.
Best regards, Garvin
Garvin Hicking a écrit :
Hi Marc!
ok, using this require_once './libraries/header_http.inc.php'; $time_before = microtime(true); require_once './libraries/header_meta_style.inc.php'; $time_after = microtime(true); echo $time_after - $time_before;
I only get .0006 seconds. No significant differences when OBgzip is true or false. But still 20 seconds on my watch.
Okay, basically what I thought it would yield.
Web server A (Apache 1.3.34) is on a different machine than MySQL server B (MySQL 5.1.7, with 4400 dbs). When connecting Web server A to MySQL server C (MySQL 5.0.18, 100 dbs) there is almost no delay. I'm using Firefox.
I do think that the time delay you experience comes from the server table cylcing...
So, something else is eating time but it's difficult to find using conventional tracing. I guess I'll have to use a debugger.
Absolutely, yes. I'd suggest using the XDebug2 Profiler, I think I remember you'Ve worked with that before?
Yes, to find that blowfish.php was eating many cycles, this is when we added mcrypt support. I don't have a machine nearby for this, it'll have to wait.
P.S. what is HTTP chunking? :)
HTPP 1/1 supports HTTP chunking; this splits HTTP result data into multiple chunks of data, and even also to compress each of those chunks. This often speeds ups transfer, because the server can already deliver the first chunks of data while it is still chewing on the rest of the execution. I think though this only works with mod_php, not CGI's.
So in that case, if a chunk is 2kb in size, it will send the first 2048 bytes of your HTTP request; and then it might take the script to load several other files before the next 2kb of data are sent; this could be the reason why you thought the delay happened inside that meta file, while in "real time" the slow response is dealt with in some DB execution.
Thanks, can't I force output with flush() ?
Best regards, Garvin
Marc Delisle a écrit :
Garvin Hicking a écrit :
Hi Marc!
ok, using this require_once './libraries/header_http.inc.php'; $time_before = microtime(true); require_once './libraries/header_meta_style.inc.php'; $time_after = microtime(true); echo $time_after - $time_before;
I only get .0006 seconds. No significant differences when OBgzip is true or false. But still 20 seconds on my watch.
Okay, basically what I thought it would yield.
Web server A (Apache 1.3.34) is on a different machine than MySQL server B (MySQL 5.1.7, with 4400 dbs). When connecting Web server A to MySQL server C (MySQL 5.0.18, 100 dbs) there is almost no delay. I'm using Firefox.
I do think that the time delay you experience comes from the server table cylcing...
So, something else is eating time but it's difficult to find using conventional tracing. I guess I'll have to use a debugger.
Absolutely, yes. I'd suggest using the XDebug2 Profiler, I think I remember you'Ve worked with that before?
Yes, to find that blowfish.php was eating many cycles, this is when we added mcrypt support. I don't have a machine nearby for this, it'll have to wait.
With $cfg['ShowStats'] set to false, I save about 5 seconds. So we are probably really waiting for the MySQL server to count records or retrieve something from information_schema.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Marc Delisle schrieb: | Hi, | | trying to debug the case of slow behavior with 4400 databases. | http://sourceforge.net/tracker/index.php?func=detail&aid=1466527&gro...
| | | In header.inc.php: | | require_once './libraries/header_http.inc.php'; | echo "trace before"; | require_once './libraries/header_meta_style.inc.php'; | echo "trace after"; | | When I click a db name on the left panel, I get 20 seconds between the | "before" and "after". Can't find what is happening in | header_meta_style.inc.php. There are some calls to | PMA_generate_commun_url() but it does not seem to be the problem. | | Of course, on a server with 20 databases the transition between "before" | and "after" is immediate. | | Ideas, someone?
i cannot confirm this delay, with having 4000 db's (without tables) it takes only long get them listed in left.php or server_databases.php - all other works fine
- -- Sebastian Mendel
www.sebastianmendel.de