Bad Network Performance

General discussion on Zend Server for IBM System i
Post Reply
andwaw
Posts: 4
Joined: Tue Jan 10, 2012 3:10 pm

Bad Network Performance

Post by andwaw » Fri May 04, 2012 9:59 am

Hello all,

I have a very big problem on my i5 running ZendServer CE.
There are two issues I can not solve.
First, when I start the ZendServer, the network bandwidth descreases so far, that my customers loose the connection to my i5.
Second, when I run a ZendFramwork application, every database task takes just to long. For example, an application fetches 5 rows out of a table of 10 rows. This task takes about one minute. Other task, which are more "complex", like fetching 20 rows out of 50, are that slow, that they can not finish their task until the server gets a timeout.

If you need any information, please ask for it. I really need a solution.

best regards,
andwaw

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: Bad Network Performance

Post by aseiden » Fri May 04, 2012 4:46 pm

Hi, andwaw,

I'm not sure about your first question (network performance). I've never seen that happen. Why would Zend Server affect network performance? Does the Apache access log show many hits?

Regarding ZF database speed, if you're using Zend_Db_Table then you must also turn on the metadata cache. You can configure it in application.ini if you're using the standard structure.

Write back if you need more information.

--Alan Seiden

formaserve
Posts: 66
Joined: Mon Mar 23, 2009 11:11 am

Re: Bad Network Performance

Post by formaserve » Wed May 09, 2012 11:45 am

Hi Alan

I presume you are talking about resources.db.defaultMetadataCache in the app ini file??

Do you have any examples of using the cache manager for optimal DB performance?

Many thanks

davelhs03
Posts: 38
Joined: Mon Mar 30, 2009 6:20 pm
Contact:

Re: Bad Network Performance

Post by davelhs03 » Wed May 09, 2012 3:17 pm

That's extremely slow. Are you using the DB2 database adapter? Have you profiled the database query to see if its the database having the problem or the network bandwidth? I imagine the problem is not with the database query but with http request being sent back to the client. Either their download bandwidth is too slow or your server's upload bandwidth is too slow. To test that you could have the run a network speed test at http://www.speedtest.net/

To see if the database is the problem you could do:

Code: Select all

echo 'Start of Query:'.time();
//do db2 query
$sql = "SELECT * FROM LIB.TABLE";
$stmt = $this->databasehandler->prepare($sql);
$stmt->execute();
var_dump($stmt->fetchAll());
echo 'End of Query:'.time();
Also at the end of the script you could do:

Code: Select all

$timeTaken = time() - $_SERVER['REQUEST_TIME'];
echo "This script took $timeTaken to run.";
to see if the Server execution time is the problem.

Hope this helps

Dave

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: Bad Network Performance

Post by aseiden » Fri May 11, 2012 9:49 pm

Regarding Zend_Db_Table on IBM i, you must use metadata caching. Look for my ZF performance slides on SlideShare, where I show how to configure application.ini.

Post Reply