Subject Re: [firebird-support] Turn on WireCompression on Firebird 3
Author Mr. John
Hi
I'm using latest version 6.5.0 
found no isc_database_info item isc_info_firebird_version; in FbConnection.ServerVersion.

thanks


On Monday, March 4, 2019, 10:52:43 AM GMT+2, Mark Rotteveel mark@... [firebird-support] <firebird-support@yahoogroups.com> wrote:


 

On 4-3-2019 08:13, 'Mr. John' mr_johnmr@... [firebird-support] wrote:
>  I've installed Firebird 3.0.4 x64 on VPS,and got slow performance with
> our app
>  changes made in firebird.conf:
>     TcpRemoteBufferSize = 32767
> WireCompression = true
> + restart firebird service

The WireCompression setting does nothing for the server. It is a
fbclient-only setting, and generally clients do not read the
firebird.conf of the server.

> in client connection (.NET connector): I put
>    Compression=True
> I have zlib1.dll in app folder

Firebird's zlib1.dll is not used by the Firebird ADO.net provider, it
has the compression built-in.

Also, which Firebird ado.net provider version? Support was introduced in
5.5.0 IIRC. In any case, your question might be more suitable for the
firebird-net-provider Google group.

> I've installed also mysql 8 and postgres 11(with default configuration
> ),and setup a simple table with 10 records for each
>
>
> CREATE TABLE city (
>   ID bigint NOT NULL,
>   Name CHAR(35) NOT NULL,
>   PRIMARY KEY (ID)
> );
>
> INSERT INTO city VALUES (1,'Kabul');
> INSERT INTO city VALUES (2,'Qandahar');
> INSERT INTO city VALUES (3,'Herat');
> INSERT INTO city VALUES (4,'Mazar-e-Sharif');
> INSERT INTO city VALUES (5,'Amsterdam');
> INSERT INTO city VALUES (6,'Rotterdam');
> INSERT INTO city VALUES (7,'Haag');

Unrelated to your problem, but if this is meant to be the Dutch city
that is the seat of government, then it is Den Haag (or 's-Gravenhage if
you prefer the old-fashioned name).

> INSERT INTO city VALUES (8,'Utrecht');
> INSERT INTO city VALUES (9,'Eindhoven');
> INSERT INTO city VALUES (10,'Tilburg');
>
> I've run this query for 15 times on every server:
> SELECT first 1 name from city where id=5 (fb)
> select name from city where id=5 limit 1 (mysql+pg)
>
>  and got this result:
>
> firebird:    3.082 2 sec
> postgres : 0.0754 sec
> mysql:      0.0874 sec
> as seen fb is much slower,with or without WireCompression I see no
> change the result is identical,seems to me that WireCompression is not
> turned on
>
> any help there?

I'm not sure this can be taken as an indication that wire compression is
enabled or not. In Firebird 3, to determine this you can check the
isc_database_info item isc_info_firebird_version; which is exposed in
Firebird ado.net on FbConnection.ServerVersion.

For example, when compression is not enabled, it will return:

WI-V3.0.4.33054 Firebird 3.0/tcp (Ramona)/P13

When it is enabled, it will return:

WI-V3.0.4.33054 Firebird 3.0/tcp (Ramona)/P13:Z

(Z for zlib)

Mark
--
Mark Rotteveel