Subject | Re: [firebird-support] Firebird on Linux 300% slower than XP??? |
---|---|
Author | Luciano Enzweiler |
Post date | 2004-03-22T21:29:44Z |
Ola Alexandre.
Thanks a lot for your answer and for your time. I'll try to answer your questions :-)
I will upload the code and the test DB on the files directory of firebird-support group (under the name "DBTest_XP_vs_Linux.zip"). Maybe it can also help. There's also an excel file on it, where I put all the times I got, on each test on each OS.
1) "How are you connecting the test program run on local machine ?" Yes, I'm connecting the test software locally on both of them using a TSQLConnection, using no network connections, with these params:
Windows XP:
DriverName=Interbase
GetDriverFunc=getSQLDriverINTERBASE
LibraryName=dbexpint.dll
VendorLib=gds32.dll
DBPrincipal=C:\DBTest\Test.gdb
RedHat 8:
DriverName=Interbase
GetDriverFunc=getSQLDriverINTERBASE
LibraryName=libsqlib.so
VendorLib=libgds.so.0
DBPrincipal=/mnt/hd98/DBTest/Test.gdb
2) You are right about the code. I just tried to put a sample of the code but messed it up :-)
That second line setting CDCliente = 153 doesn't exist. But I'm getting the time just before and after the "qryGeral1.Open" line, but I forgot to mention that the functions "GetStartTime" and "GetEndTime" sum all the time, so I get how long it took to execute that command 1000 times. I decided not to use the whole loop in order to avoid any other interference.
3) "Did you tried to isolate some parts ? The connection Time for example" Yes, that's what I tried with this test code. I didn't isolated the connection time, but I did isolated the time to open a query, to execute a query, to open a clientdataset and to applyupdates. All of them were much slower on Linux.
4) "Did you tried with other component set ? FIBPlus, IBO, etc..." No I didn't because I'd like to be able to connect to other DB Servers, but I can make some tests to see if it's the component. Although I really don't think it's the problem because of the many different tests I made and always with Linux much slower, and it really seems to be the DB.
5) "Did you find any network problems (a bad NIC ?)" I'm not testing it thought the network, but it's working perfectly because my customer is using it a lot. It's just slower than I think it should.
Alexandre, thanks for your help. I hope I had answered your questions accordingly and you can help me some more :-)
If anyone has any idea, please post it and I'll try your suggestion. I just can't believe XP will win this match... LOL
Best regards (e um grande abraco),
Luciano Enzweiler.
Subject: Re: [firebird-support] Firebird on Linux 300% slower than XP???
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 ?)
"if"... You just open every time with CDCliente = 153
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*******
Did you tried with other component set ? FIBPlus, IBO, etc...
Did you find any network problems (a bad NIC ?)
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.
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
[Non-text portions of this message have been removed]
Thanks a lot for your answer and for your time. I'll try to answer your questions :-)
I will upload the code and the test DB on the files directory of firebird-support group (under the name "DBTest_XP_vs_Linux.zip"). Maybe it can also help. There's also an excel file on it, where I put all the times I got, on each test on each OS.
1) "How are you connecting the test program run on local machine ?" Yes, I'm connecting the test software locally on both of them using a TSQLConnection, using no network connections, with these params:
Windows XP:
DriverName=Interbase
GetDriverFunc=getSQLDriverINTERBASE
LibraryName=dbexpint.dll
VendorLib=gds32.dll
DBPrincipal=C:\DBTest\Test.gdb
RedHat 8:
DriverName=Interbase
GetDriverFunc=getSQLDriverINTERBASE
LibraryName=libsqlib.so
VendorLib=libgds.so.0
DBPrincipal=/mnt/hd98/DBTest/Test.gdb
2) You are right about the code. I just tried to put a sample of the code but messed it up :-)
That second line setting CDCliente = 153 doesn't exist. But I'm getting the time just before and after the "qryGeral1.Open" line, but I forgot to mention that the functions "GetStartTime" and "GetEndTime" sum all the time, so I get how long it took to execute that command 1000 times. I decided not to use the whole loop in order to avoid any other interference.
3) "Did you tried to isolate some parts ? The connection Time for example" Yes, that's what I tried with this test code. I didn't isolated the connection time, but I did isolated the time to open a query, to execute a query, to open a clientdataset and to applyupdates. All of them were much slower on Linux.
4) "Did you tried with other component set ? FIBPlus, IBO, etc..." No I didn't because I'd like to be able to connect to other DB Servers, but I can make some tests to see if it's the component. Although I really don't think it's the problem because of the many different tests I made and always with Linux much slower, and it really seems to be the DB.
5) "Did you find any network problems (a bad NIC ?)" I'm not testing it thought the network, but it's working perfectly because my customer is using it a lot. It's just slower than I think it should.
Alexandre, thanks for your help. I hope I had answered your questions accordingly and you can help me some more :-)
If anyone has any idea, please post it and I'll try your suggestion. I just can't believe XP will win this match... LOL
Best regards (e um grande abraco),
Luciano Enzweiler.
Subject: Re: [firebird-support] Firebird on Linux 300% slower than XP???
>I must be doing something wrong, but I can't figure out what. I'll...snip...
>describe the problem shortly and then more detailed.
>
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 lotHere I must missed something...
>of others, with the same result)
>
>
>**********START********qryGeral1.Prepare;
>
> qryGeral1.SQL.Clear;
>
> qryGeral1.SQL.Add('SELECT C.CDCLIENTE, C.NOME FROM CLIENTE C WHERE
> C.CDCLIENTE = :CDCLIENTE');
>What is this line for ??? Here you just nullify the alternance given by the
>
> 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;
"if"... You just open every time with CDCliente = 153
> qryGeral1.Close;I think this line should be before the loop
>
> GetStartTime; // --- Here is a function where I start to count the time
> qryGeral1.Open;I think this line should be outside the loop
>
> GetEndTime; // --- The end. So I know how long it took to execute
> this line 1000 times.
> end;I the code you run is not this one right ? or you will get wrong results...
>
>**********END*******
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*******
>Did you tried to isolate some parts ? The connection Time for example:
>
>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 with other component set ? FIBPlus, IBO, etc...
Did you find any network problems (a bad NIC ?)
>More questions than answers this time...
>
>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.
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 Enzweilerum abraco !
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
[Non-text portions of this message have been removed]