Updating ancient system - performance/network load issues

7 views
Skip to first unread message

a...@actadata.dk

unread,
Oct 17, 2022, 7:44:41 AM10/17/22
to firebird-java

I have this very old setup which consists of a Java client communicating over an encrypted internet connection with a Firebird server (Java applikation built using JBuilder 2006, jre 1.7, InterClient 2.0.1 type 3 driver, Zebedee 2.4.1 ip tunneling software and Firebird 1.5.3 all running on Windows platforms)

The application makes occasionally bursts of small requests to a selection of tables which makes the performance pretty sensitive to network latency. On a network with a 35 ms ping time the performance is ok. Network bandwidth is not so important due to small amounts of data.

A server replacement is wanted due to age and power consumption.

The ancient Firebird server will not install on the new Windows server platform, so I have to update Firebird. 

I can’t get the antique InterClient driver to with the newer version of Firebird. I believe that the first database write fails.

(The old ZeBedee tunnel although still works).

A test setup using a recent Firebird server, the Jaibird 4.0.6.java7 class 4 driver and the old Zebedee tunnel is working fine but performs badly during request bursts due to a 3 times increase in network traffic, as I understand it, due to protocol differences.

1: I want to make sure that my network setup in itself is not introducing too much overhead. I would therefore like to know the dataflow to and from the server executing a simple SELECT statement on a table returning a small result set. (That is how many data packets will be transferred excluding protocol overhead.)

2: Is it possible to make the old InterClient class 3 driver work with the newer, more strict Firebird servers? And eventually what is the latest version of Firebird that works with InterClient?


This topic has probably been discussed before - years ago. I have not been able to locate it, so you mush excuse me. 

Mark Rotteveel

unread,
Oct 17, 2022, 8:24:16 AM10/17/22
to firebi...@googlegroups.com
On 17-10-2022 13:42, a...@actadata.dk wrote:
> A test setup using a recent Firebird server, the Jaibird 4.0.6.java7
> class 4 driver and the old Zebedee tunnel is working fine but performs
> badly during request bursts due to a 3 times increase in network
> traffic, as I understand it, due to protocol differences.

As I mentioned on firebird-support, this increase is likely due to the
fact InterClient is a JDBC Type 3 driver, which uses a custom protocol
between the Java client and the InterClient middleware server that is
running next to your Firebird server on the same host.

The custom protocol used by InterClient has a number of optimizations to
avoid network roundtrips. Jaybird uses the normal Firebird
wire-protocol, which has - for JDBC use - some inefficiencies.

To repeat the example I gave on firebird-support: a
Statement.executeUpdate is only 1 roundtrip in InterClient, while it is
at least 3 roundtrips in Jaybird (prepare, execute, retrieve update count).

As far as I can tell from a quick look at the sources of InterClient
which were open sourced together with InterBase 6.0 (see
https://github.com/FirebirdSQL/x-cvs-interclient), it also includes
optimizations like starting transactions when needed.

> 1: I want to make sure that my network setup in itself is not
> introducing too much overhead. I would therefore like to know the
> dataflow to and from the server executing a simple SELECT statement on a
> table returning a small result set. (That is how many data packets will
> be transferred excluding protocol overhead.)

Assuming you're using Statement to execute, or allocate a new
PreparedStatement for each execute:

1x allocate + prepare statement
1x execute
Nx fetch (where N depends on the total number of rows, the fetch size,
and how many rows the server actually returns for each fetch as since
Firebird 3.0 the server can decide to return less rows than the
requested fetch size, this depends on the actual row size and some
buffer size value used by Firebird)
1x release cursor (if result set close was called)
1x close statement (if statement close was called)

If the response includes blobs, there is - for each blob - the
additional overhead of opening blob, fetching segment(s), closing blob.

If you don't have an active transaction, Jaybird will also start a
transaction.

If you're using auto-commit mode, Jaybird will also (optionally) commit
the previous transaction, start a new transaction and commit/roll back
the transaction after completion.

> 2: Is it possible to make the old InterClient class 3 driver work with
> the newer, more strict Firebird servers? And eventually what is the
> latest version of Firebird that works with InterClient?

As far as I am aware, formally Firebird was never supported by
InterClient, it just happened to work because early Firebird versions
were very compatible with InterBase 6.0. I guess that things stopped
working with Firebird 2.0, but that is only a guess.

Mark
--
Mark Rotteveel

a...@actadata.dk

unread,
Oct 17, 2022, 9:18:06 AM10/17/22
to firebird-java
Thank you so much for the detailed answers, perfect. Now I will count packets. 
- we have used interbase/Firebird for 20+ years and have never had a corrupted database -

Reply all
Reply to author
Forward
0 new messages