Subject Re: [Firebird-general] Just a few words about Firebird 3.0 performance.
Author Ann Harrison

On Thu, Jun 9, 2016 at 6:50 AM, un_spoken@... [Firebird-general] <Firebird-general@yahoogroups.com> wrote:
Hello

First of all I wanted to say that my post has no intention to diminish the value of new Firebird version.
I was in Prague last year on Firebird conference (very nice event BTW) but even then there were doubts how well FB 3 performs in comparision to FB 2.5. As far as I remember there were two presentations with examples regarding perfromance and both were indeterminate - sometimes FB 2.5 behaved better or similar.

(Rest of post follows my comments.)

The major performance focus of Firebird 3 was to improve multi-user, short transaction throughput on SuperServer by allowing it to use multiple threads simultaneously on multi-core machines.  Different connections are assigned to different threads and run in parallel.  Different connections could always run in parallel in the Classic architecture but each connection has its own page and metadata cache, so shared pages spent a lot of time flying between processes ... going to disk on the way if the page was changed. Super Client allowed all connections to run in the same process, but each still had its own page and metadata caches.   In the new SuperServer architecture, connections share caches.

Firebird 3 does not decompose queries and run the pieces in parallel, so the significant changes in V3 won't improve performance on a single connection running requests in series.  To see the benefits of V3, try testing eight or ten connections running short update transactions.

Best regards,

Ann

Few days ago I've decided tu put FB 3.0 under test on a real business application which is working for 24/7.

This application is reading data from PostgreSQL database (stored in JSON), parses the data, inserts it to Firebird database and then scans the inserted data and inserts some additional information. (Proccess of scanning the data must be separated from initial inserts).

Here are the tests results for 80000 records stored in PostgreSQL.


 |Test|2.5 CL 1 THR|2.5 CL 4 THR|2.5 SS 1 THR|2.5 SS 4 THR|3.0 CL 1 THR|3.0 CL 4 THR|3.0 SS 1 THR|3.0 SS 4 THR|
| Time(s)  |    201     |    285     |    169     |     107    |    221     |    321     |    216     |    112     |

How to read the tests:

2.5 CL 1 THR - Firebird 2.5, Classic, 1 Thread.
3.0 SS 4 THR - Firebird 3.0, SuperServer, 4 Threads.

Tests were performed on 32 bit version and no configration changes has been made with one except: CpuAffinityMask = 255

Tests were made on my dev machine, locally. I've had all unnecessary processes turned off. But these werent a tests made with a "laboratory" precision.
However I think you can see here some pattern which may suggest that tests are close to the reality.

That is not everything:

3.0 SS 4 THR - In my opinion behaved unstable. There were lost connections to database and threads had to reconnect. At first I thought it is a coincidence so I've repeated the test and it happened again.

Firebird 3.0 Classic also did not pass my standard test suite in terms of interrupting a query. The test is implemented in a way that I create a big loop in a stored procedure. I call this procvedure from my program and then I try to interrupt query via separate thread. It works without any problems on Firebird 2.5 but in 3.0 it is not or is it much slower and timeout for my test occured. I haven't check the reason very thoroughly.

Ok that is all, if you have any comments or toughts how to improve Firebird performance let me know.

best regards.



------------------------------------
Posted by: un_spoken@...
------------------------------------

Community email addresses:
  Post message: Firebird-general@yahoogroups.com
  Subscribe:    Firebird-general-subscribe@yahoogroups.com
  Unsubscribe:  Firebird-general-unsubscribe@yahoogroups.com
  List owner:   Firebird-general-owner@yahoogroups.com

Shortcut URL to this page:
  http://www.yahoogroups.com/community/Firebird-general
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Firebird-general/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/Firebird-general/join
    (Yahoo! ID required)

<*> To change settings via email:
    Firebird-general-digest@yahoogroups.com
    Firebird-general-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    Firebird-general-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/