Subject Re: [firebird-support] Firebird on Linux 300% slower than XP???
Author Alexandre Benson Smith
At 19:51 20/03/2004 -0300, you wrote:

>I must be doing something wrong, but I can't figure out what. I'll
>describe the problem shortly and then more detailed.
>

...snip...

Ola Luciono,

How are you connecting the test program run on local machine ? What is the
conection string for both servers... Did you test the name resolution (DNS
problem ?)

>Here is an sample of the code I used to make the test (I also used a lot
>of others, with the same result)
>
>

Here I must missed something...


>**********START********
>
> qryGeral1.SQL.Clear;
>
> qryGeral1.SQL.Add('SELECT C.CDCLIENTE, C.NOME FROM CLIENTE C WHERE
> C.CDCLIENTE = :CDCLIENTE');

qryGeral1.Prepare;

>
>
> Alt := False;
> for K := 1 to 1000 do begin
>
> if Alt then begin
>
> qryGeral1.Params.ParamByName('CDCLIENTE').AsInteger := 153;
> end else begin
>
> qryGeral1.Params.ParamByName('CDCLIENTE').AsInteger := 1485;
> end;
> Alt := not Alt;
> qryGeral1.Params.ParamByName('CDCLIENTE').AsInteger := 153;

What is this line for ??? Here you just nullify the alternance given by the
"if"... You just open every time with CDCliente = 153


> qryGeral1.Close;
>
> GetStartTime; // --- Here is a function where I start to count the time

I think this line should be before the loop

> qryGeral1.Open;
>
> GetEndTime; // --- The end. So I know how long it took to execute
> this line 1000 times.

I think this line should be outside the loop

> end;
>
>**********END*******


I the code you run is not this one right ? or you will get wrong results...
I think you have something similar to this:

**********START********


qryGeral1.SQL.Clear;


qryGeral1.SQL.Add('SELECT C.CDCLIENTE, C.NOME FROM CLIENTE C WHERE
C.CDCLIENTE = :CDCLIENTE');
qryGeral1.Prepare;

Alt := False;

GetStartTime; // --- Here is a function where I start to count the time

for K := 1 to 1000 do begin

if Alt then begin
qryGeral1.Params.ParamByName('CDCLIENTE').AsInteger := 153;
end else begin
qryGeral1.Params.ParamByName('CDCLIENTE').AsInteger := 1485;
end;
Alt := not Alt;


qryGeral1.Open;

qryGeral1.Close;
end;

GetEndTime; // --- The end. So I know how long it took to execute this
line 1000 times.


**********END*******


>
>
>Most of the tests took between 0.5 and 2 seconds, with enough time to have
>a good comparison. I also tested the same software on Win98 (around twice
>slower than XP, but yet faster than Linux) and with Linux Conectiva 9
>(with the same results as Red Hat 8). As I made the tests several times
>and in many different ways trying to isolate the DB part, I guess there
>isn't anything wrong with this conclusion.
>

Did you tried to isolate some parts ? The connection Time for example:

Did you tried with other component set ? FIBPlus, IBO, etc...

Did you find any network problems (a bad NIC ?)

>
>
>I just hope that I'm missing a configuration or something to make it
>faster. I really don't feel like installing the DB server on XP on a
>customer I just installed the server and all clients with
>Linux :-) Please help me!!! :-)
>
>
>
>Thanks you all.

More questions than answers this time...

I did the same tests here at my office...

the results accessing the database on my notebook running WinXP is a little
bit slower then what I got accessing my server running RedHat Linux 8... My
Notebook is a faster machine and has more memory than my linux server, so I
could bet Linux will run better on the same hardware ;-)

The test client program runs from another machine running Win2000
connecting using the following string:
"192.168.1.1:my_db" -> to my server
"192.168.1.199:my_db" -> to my notebook

Both are running Firebird SS 1.5 final version.



>Luciano Enzweiler


um abraco !


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

----------


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/2004


[Non-text portions of this message have been removed]