Subject Re: [firebird-support] fbserver using 100% CPU in a big database!
Author Alexandre Benson Smith
Hi

I have a 1 GB database running on RedHat 8 and FB 1.5 all works fine.
Sub-second response time with joins between 900K records and 1.5M
records and a some other small (15K records, 500 records, etc) tables.

I did a test and got
0.02 seconds to retrieve 8 rows joinning a 1.5M records table, with a
900 K records table and a 43 records table

If I do a select count(*) on the 1.5M records table, then I think I will
wait a bit :-)

Just tried rigth now,

17.0235 seconds (1.512.355 records)

This is a weak server (Duron 1.4GHz 128 RAM, IDE disc), but right now I
think just me was quering the DB.

Looking on top's screen on as ssh session to the server, I can see FB
using up to 42% of CPU.

I did a select count(*) on another table with 994.238 records, and I
have not used that table, so no pages should be on cache FB CPU usage
peaks at 47% execution time 8 secs.

When you mention that a select count(1) from SomeTable, the server goes
to 100% is expected (on a 300k records table), since FB needs to visit
every record (and therefore every page that holds that records), you
could expect a lot of disk activity and some processing power to be used.

When the server touchs a record it tries to clean the back versions (if
they exists), this could cause some delay too...

Have no more thoughts about it....

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br