response time

response time

Postby eaburk on Thu Jan 28, 2010 9:17 pm

When accessing pages through the browser on static pages response time is great.

If I add some php code to connect to the database (i5_connect) response time becomes terrible (up to 7 seconds to load a small page) and events are generated with the following text:

Severe Slow Request Execution (Absolute)

I can get better response time by using i5_pconnect but why is connecting to the database so resource intensive?
eaburk
 
Posts: 58
Joined: Mon Jan 04, 2010 3:42 pm

Re: response time

Postby chris_hird on Fri Jan 29, 2010 5:35 pm

I just created a page which uses the i5_ functions and found the same problem, its terribly slow! I then created a similar prgram using the db2_ functions and it flies through! I have a problem because I want to be able to store the row number with each record, i5_bookmark is great but there is no db2_ function I can find that provides the same functionality??

Chris...
Shield Advanced Solutions Ltd
Home of JobQGenie and the Receiver Apply Program
http://www.shield.on.ca/Blog
chris_hird
 
Posts: 168
Joined: Fri Apr 10, 2009 12:41 am
Location: Toronto

Re: response time

Postby zend_i5 on Sun Jan 31, 2010 1:04 pm

The connection process in in the Toolkit is the reason for slow response time. Use persistent toolkit connection function i5_pconnect() http://files.zend.com/help/Zend-Server-IBMi/i5_php_connector_api.htm#MiniTOCBookMark2
to improve an overall Toolkit response time.
zend_i5
 
Posts: 140
Joined: Mon Mar 23, 2009 5:22 pm

Re: response time

Postby chris_hird on Mon Feb 01, 2010 2:45 pm

Tried that and the response time is still 6-7 seconds where as the db2 connections take subsecond? Any other ideas?

Chris...
Shield Advanced Solutions Ltd
Home of JobQGenie and the Receiver Apply Program
http://www.shield.on.ca/Blog
chris_hird
 
Posts: 168
Joined: Fri Apr 10, 2009 12:41 am
Location: Toronto

Re: response time

Postby chris_hird on Mon Feb 01, 2010 3:17 pm

OK it is faster! I am using studio which seemed to save the file but didn't! I had no errors so when I ran the request again it was just as slow as before. I was looking for another function and when I re-opened the file it still showed the old i5_connect() function not 15_pconnect() as it should! I changed to i5_pconnect() again, saved and now it is running much faster! Studio does seem to be a bit flaky at times? I am running it on Widows7 64bit which could be part of the reason.

Chris...
Shield Advanced Solutions Ltd
Home of JobQGenie and the Receiver Apply Program
http://www.shield.on.ca/Blog
chris_hird
 
Posts: 168
Joined: Fri Apr 10, 2009 12:41 am
Location: Toronto

Re: response time

Postby eaburk on Mon Feb 01, 2010 8:18 pm

Why is the toolkit connection process so intense?

If I use i5_connect throughout my application it would become unusable.
eaburk
 
Posts: 58
Joined: Mon Jan 04, 2010 3:42 pm

Re: response time

Postby zend_i5 on Tue Feb 02, 2010 8:44 am

Make sure to use i5_connect() function once in the script and each i5_connect() function should have i5_close(). To improve the Toolkit performance use persistent connection i5_pconnect() http://files.zend.com/help/Zend-Server-IBMi/i5_php_connector_api.htm#MiniTOCBookMark2
zend_i5
 
Posts: 140
Joined: Mon Mar 23, 2009 5:22 pm


Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 3 guests