Subject Re: Firebird Usage Load Problem
Author Maurice Ling
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:

> >
> >I sense some defensiveness......
>
> Not! :-) Just curiosity...and I'm still curious....
>
>
> >What my script essentially does to get a list of primary keys from A
> >table using kinterbasdb.cursor.execute() method and roll out as a
> >Python list using kinterbasdb.cursor.fetchall(). For each of the
> >elements in the list (primary keys), it is used to pull out a record
> >in another table for processing and insert the results (usually a few
> >records) into another table. This process is repeated for about 500k
> >times.
>
> All of these are *database* operations, not Python operations. All
Python
> is doing here is composing pieces to slot into API function structures
> (very minimal on CPU, since it's all reusable code). Once it
submits its
> request, all it has to do is wait for something to come back - again,
> pieces packaged in reusable structures and handled with reusable code.
>
>
> >Yes, all operations finishes. More than a thousand records are
> >retrieved and processed and many thousands inserted every hour.
>
> OK - all those thousands of operations are database server activity
- as
> mentioned by others, very amenable to using CPU.
>
> You ought to be as curious as I am, as to why your system
administrator is
> wetting his knickers about a database MANAGEMENT server using
> CPU. Processing stuff is what *REAL* database management systems
> do. Isn't it...? :-))
>
> ./hb

There are a few reasons why my system administrator is agitated.

1. He's a mysql user and is very used to seeing database processes
using low CPU. So, to that is, why is FB using >90% CPU while mysql is
<10% CPU? If DBMS is by nature of the beast CPU intense, shouldn't
both be as intense? So what is different here?

2. FB's CPU usage almost never drop and is always so high. Shouldn't
it be a blip of FB usage, followed by a blip of Python usage, and so
on? As in FB reads, python process, FB reads/writes...... Shouldn't FB
is doing nothing when data is out for processing?

3. If Python scripts are using a lot of CPU also, then I can say that
Python is processing very hard and FB has to keep up the I/O
processes. In this case, it isn't.

Cheers
Maurice