Re: Performance of fastcgi on AIX

Shaun Coughlin <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hi Dan

Thanks for getting back so quickly.

I am using Informix SE on this particular server. I have checked out
most of the things you suggested and I am pretty sure that the database
connection is not the issue here.

You final suggestion makes sense. I will do some measurements on
fastcgi and mod_php to try and track it down. I can also get the
application to echo back without connecting to the database. This
should help to isolate the problem.

Thanks again

Shaun

Dan Horne wrote:

Message

Hi Shaun

I think that there could be any number of issues
here that can cause the problem. I don't know Informix but use MySQL
and Oracle quite a bit. Here are some ideas - some of which may be
irrelevant because they're not pertinent to your environment, or you
already know that they're not applicable cos you've checked 'em off:

- Row fetches over the network are much slower
than local queries. In fact, row fetching is quite slow full stop, but
hard to avoid. Only C/C++ used to support batch fetching with Oracle,
but this may have changed.

- Oracle can sometimes have very slow connection
times, and in my experience two different installation of the same DB
may behave differently on different OSes. However, once connected
Oracle runs pretty quickly. If you have lots of connects and
disconnects, this will cause a problem. Connecting to each DB with
SQL*Plus will give you an idea if they've different connection times.

- There may be a connection limit on the remote
DB, so that new connections queue.

- Your database schemas may be out of sync. There
may be extra indexes or lack thereof which can cause one database to
run differently. Oracle Enterprise Manager should be able to compare to
schema and show any differences (I use PL/SQL Developer for this, but
you'd need to buy it. It's a nice inexpensive tool).

- The db parameters may differ between instances
(shared pool/db cache sizes, optimizer preferences etc)

- Unless the data is the same in both your local
and remote databases, the optimizer may choose a different execution
path for the same query. If you can, generate stats on both local and
remote databases, and see if that makes a difference

- Turn on tracing in both your local and remote
databases, and execute the same queries against each, The execution
plan for the SQL should be the same.

- Is it the same DB vendor that you're comparing
times with? Some, like MySQL, Sybase and MS SQL Server are
case-insensitive. Others, like Oracle, aren't. People often wrap lower
or upper around their column names to perform matches, but this means
that standard indexes can't be used and full-table scans will
occur.(Function-based indexes can get around this)

- How do the Fastigii and mod_php execution
times compare? This will probably help to tell if its really FASTCGI,
or the infrastructure (DBs/platform/OS/network) that are the bottleneck.

Dan

-----Original Message-----

From: Shaun Coughlin [ mailto:[email protected] ]

Sent: Monday, 31 October 2005 05:23

To: [email protected]

Subject: Re: [FASTCGI] Performance of fastcgi on AIX

Hi Dan

I have a database independant server which currently supports Oracle
and Informix and soon MySql. It works on a row by row basis and so
emulates record access. This means the web developers don't need to
know SQL as all access is via PHP objects.

Shaun

Dan Horne wrote:

out of curiosity, what database are you using?

-----Original Message-----
lman.fastcgi.com] On Behalf Of Shaun Coughlin
Sent: Monday, 31 October 2005 02:30
Hello

I have recently ported my fastcgi application to AIX 4.2

Everything compiled OK and the applications run. However,
when I connect
over the LAN to the AIX machine with a request the performance is
terrible. The machine itself is fine. It is a production
machine with 40
users and performance is excellent. Apache responds well but
the fastcgi
requests from the client take a very long time , seconds
for each one.
The same application running on linux is near instantaneous.

The system is multi-tier. Client connects to (linux server running
apache and PHP). PHP makes fastcgi requests to AIX machine to
retrieve
data from the database and pass back. Typical size of request
data block
is 100-800 bytes and similar for response. A typical page
load will make
60-70 requests for data. With a linux database server this is
done sub
second. With AIX database server this takes 15 seconds!! The LAN is
100MB/s. I suspect it has to be something to do with the socket
connection between the PHP server and the AIX server.

Any help would be greatly appreciated.

Shaun Coughlin

Tel: 01827 304100
Fax: 01827 310526

www.traderman.co.uk

Intelligent Software for Transport and Warehousing

___________________________________
fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/

--
Shaun Coughlin
Managing Director

Tel: 01827 304100
Fax: 01827 310526

www.traderman.co.uk

Intelligent Software for Transport and Warehousing

--
Shaun Coughlin
Managing Director

Tel: 01827 304100
Fax: 01827 310526

www.traderman.co.uk

Intelligent Software for Transport and Warehousing

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.