Subject | performance of PHP + Firebird + Apache 1 |
---|---|
Author | Ard Biesheuvel |
Post date | 2004-08-03T15:42:16Z |
Hello group,
In response to the previous thread concerning Firebird performance, I
thought I'd share one of my recent observations with you on this issue.
I did some measurements using ApacheBench on a query that induces a lot
of calls between the FB client in PHP and the FB server (basically, just
fetching an entire SELECT ... FOR UPDATE statement will do nicely,
because the 'FOR UPDATE' directive defeats the client-side cache/prefetch)
I got a considerable increase in speed (up to 100%) with the following
setup:
- Linux 2.4.25
- Apache 1.3.29
- PHP 5 -- with -prefer-non-pic;
- Firebird 1.5.1 built with:
* production build;
* classic server;
* '-fPIC' removed from prefix.linux;
* CPU specific switches (-arch=pentium4 -msse2 -mmmx etc ...)
As Apache 1 is multi-process already, the usual overhead of running the
classic build is not present. There is no increase in memory use either,
because of Linux's copy-on-write handling of text pages. [However, you
will run out of swap space very fast if you try this on Solaris, as it
will consume at least an additional 2 megs of swap space for each Apache
process.]
In this setup, the server runs in-process, which makes it considerably
faster, because the client and the server use the same address space.
The -fPIC switch is used to produce position independent code, which is
slower and unnecessary if you use Firebird in this way.
Anyone care to try ?
In response to the previous thread concerning Firebird performance, I
thought I'd share one of my recent observations with you on this issue.
I did some measurements using ApacheBench on a query that induces a lot
of calls between the FB client in PHP and the FB server (basically, just
fetching an entire SELECT ... FOR UPDATE statement will do nicely,
because the 'FOR UPDATE' directive defeats the client-side cache/prefetch)
I got a considerable increase in speed (up to 100%) with the following
setup:
- Linux 2.4.25
- Apache 1.3.29
- PHP 5 -- with -prefer-non-pic;
- Firebird 1.5.1 built with:
* production build;
* classic server;
* '-fPIC' removed from prefix.linux;
* CPU specific switches (-arch=pentium4 -msse2 -mmmx etc ...)
As Apache 1 is multi-process already, the usual overhead of running the
classic build is not present. There is no increase in memory use either,
because of Linux's copy-on-write handling of text pages. [However, you
will run out of swap space very fast if you try this on Solaris, as it
will consume at least an additional 2 megs of swap space for each Apache
process.]
In this setup, the server runs in-process, which makes it considerably
faster, because the client and the server use the same address space.
The -fPIC switch is used to produce position independent code, which is
slower and unnecessary if you use Firebird in this way.
Anyone care to try ?