FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Very Slow run of php process(elsewhere more than 10x faster)






Did you have such problems?
yes, once or twice
0%
 0%  [ 0 ]
never
100%
 100%  [ 3 ]
quite often
0%
 0%  [ 0 ]
Total Votes : 3

Royal
http://royalindigo.frih.net/CLV/prooster.php?docent=Kg
http://personeel.clv.nl/roosterplus/prooster.php?docent=Kg

Twice the same program, at frih.net takes 35-40 sec, at clv.nl it takes 3-4 sec.
Basically does this: reads a external php result, writes it to a temp file with minor changes, decides the extra reads to request (max 40 times, std like 10-15 times), finally reads the temp file again with minor changes, displays the result at the clients side.

Is the writing of the temp file monitored? Other things slowed down on purpose?
For now somewhat disappionted, of course.
mOrpheuS
Royal wrote:
http://royalindigo.frih.net/CLV/prooster.php?docent=Kg
http://personeel.clv.nl/roosterplus/prooster.php?docent=Kg

Twice the same program, at frih.net takes 35-40 sec, at clv.nl it takes 3-4 sec.
Basically does this: reads a external php result, writes it to a temp file with minor changes, decides the extra reads to request (max 40 times, std like 10-15 times), finally reads the temp file again with minor changes, displays the result at the clients side.

Is the writing of the temp file monitored? Other things slowed down on purpose?
For now somewhat disappionted, of course.

I'm not sure as to what might be causing this, but there is no deliberate throttling mechanism that has been implemented at FRIHost.

Is the script accessing data from external network ? In that case, the slow-down could be caused by latency or address resolution.

Perhaps you could debug the script and narrow down to the part of the code or function that is taking the most time.
Bondings
I have no idea why it takes so long. Probably a different server configuration.

Maybe that script is the only thing running on the other server, while here a lot of websites are running?

Or maybe because our server is located in the USA and yours in the Netherlands? If your script needs a lot of accesses to files in the Netherlands, then maybe this might cause such a delay.
Royal
mOrpheuS, Thank you for your answer!

Each call to my external resource takes about 0.8 seconds as an average. That is: I echo the result of php function time() just before and after the outgoing call. 36 out of 46 calls that are processed show a difference of 1 second (between .5 and 1.5 sec).
So it must be those calls, the rest of the program runs 'in no time' (always a difference of 0).
On the other server the same source code runs much faster.

http://80.69.68.31/
If my external source starts like this, it can't be address resolution or name resolving, can it?

Maybe it is a matter of our bandwidth against the other server's?

Exclamation Bondings, I wrote the above before I read your reply.
I think you must be right! For these extravaganzas I should try and find a nearby and more dedicated server. Even then FriHost is a great testing site. THANKS.
swizzy
you can try gzipping your php files via .htaccess
Royal
That is new to me, Swizzy. What content would the .htaccess have, in case files are named one.php and two.php?
Related topics
Very Slow run of php process
how to make Php process won't stop after user disconnect.
"Go slow now so you can go faster later"
How to speed up slow PC's?
All About WoW
PHP vs J2EE
Embed PHP+HTML
Very slow DVD burning process
Fantastico could be updated
PHP Question
PHP Memory on Server 2
CSS Editor?
dual core dilemma
Communicating between web pages
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.