Subject Re: [firebird-php] set cpu or memory max limit
Author Thomas Steinmaurer
Hello,

> we have a web site with PHP5.3 and firebird 2.5 database. Some queries that
> search in heavy tables, about 1,8 million of records, with joins to other
> tables, makes 100% of cpu.

Have a look on the execution plan and I/O stats. You can get both by
using the Trace API, as you are on Firebird 2.5.

> We have about 50 users concurrent connected
> (hits per second), so the users have to wait to the last

Are you using some kind of connection pool. The header page below shows
~ 147000 connection establishments in 4 days.

> I was wondering to know if we can set the max limit per thread or process
> (we tried with SuperServer, Superclassic and Classic server).

You can't. You'd best using a SMP-friendly architecture like Classic or
SuperClassic. Then fine-tune page cache, lock manager etc. taking max.
number of connections, available RAM etc. into account.

But first, I would have a look on optimizing some of your queries. I can
imagine that a long-running (unoptimized) query, multiplied by the
number of connections can hog up the server.

--
With regards,
Thomas Steinmaurer
http://www.upscene.com/