Subject | Re: Forces writes and transaction throughput? |
---|---|
Author | Adam |
Post date | 2008-12-09T00:35:48Z |
--- In firebird-support@yahoogroups.com, Doug Chamberlin
<dougchamberlin@...> wrote:
My advice would be to seriously consider what storage platform your
databases will live on in a couple of years. My guess is that is wont
be disk based (probably some form of hardware RAID on SSD modules).
Such a configuration would present no benefit from storage ordered
reads or writes.
But I must say I am surprised at the low throughput you are getting,
so we may be putting the horse before the cart. Either your hardware
is giving you unacceptably slow speeds, or my testing here is not
reflective of your environment.
My test table looks like this:
create table test (f1 varchar(100), f2 varchar(100), f3 varchar(100));
commit;
My test application was written in Delphi using IBX (hardly the
performance king in connection suites). The connection string etc was
configured at design time, and the query was a simple 'insert into
test(f1, f2, f3) values (:f1, :f2, :f3)'
procedure TForm1.Button1Click(Sender: TObject);
const
cMax=10000;
cf1 = 'Hello World';
cf2 = 'Hello';
cf3 = 'World';
var
i : Integer;
start : TDateTime;
begin
Con.Open;
try
start := now;
for i := 0 to cMax-1 do
begin
Tra.StartTransaction;
try
qry.ParamByName('f1').Value := cF1;
qry.ParamByName('f2').Value := cF2;
qry.ParamByName('f3').Value := cF3;
Qry.ExecSQL;
Tra.Commit;
except
Tra.Rollback;
raise;
end;
end;
MessageDlg(Format('Done in %d seconds', [SecondsBetween(now,
start)]), mtInformation, [mbOK], 0);
finally
Con.Close;
end;
My environment is a Windows XP laptop that is pushing 5 years old.
(Pentium M 1400MHz, 1GB RAM). The database itself is on an encrypted
partition on a laptop hard drive (both really hurt performance!). I am
running Firebird 2.1 Classic Server with ODS 11.1 database and forced
writes.
The test application finished in 25 seconds (2 seconds if done in a
single transaction), so something is seriously wrong in your
environment if you are measuring in 10s of minutes, or my test
application does not accurately reflect your scenario. Which is it?
Adam
<dougchamberlin@...> wrote:
>Kjell,
> Kjell Rilbe wrote:
> > I still wonder how to configure a FB system to maximize transaction
> > throughput, on a given hardware setup.
> >
> > Link to relevant docs, how-to:s, previous discussion threads etc are
> > also welcome.
My advice would be to seriously consider what storage platform your
databases will live on in a couple of years. My guess is that is wont
be disk based (probably some form of hardware RAID on SSD modules).
Such a configuration would present no benefit from storage ordered
reads or writes.
But I must say I am surprised at the low throughput you are getting,
so we may be putting the horse before the cart. Either your hardware
is giving you unacceptably slow speeds, or my testing here is not
reflective of your environment.
My test table looks like this:
create table test (f1 varchar(100), f2 varchar(100), f3 varchar(100));
commit;
My test application was written in Delphi using IBX (hardly the
performance king in connection suites). The connection string etc was
configured at design time, and the query was a simple 'insert into
test(f1, f2, f3) values (:f1, :f2, :f3)'
procedure TForm1.Button1Click(Sender: TObject);
const
cMax=10000;
cf1 = 'Hello World';
cf2 = 'Hello';
cf3 = 'World';
var
i : Integer;
start : TDateTime;
begin
Con.Open;
try
start := now;
for i := 0 to cMax-1 do
begin
Tra.StartTransaction;
try
qry.ParamByName('f1').Value := cF1;
qry.ParamByName('f2').Value := cF2;
qry.ParamByName('f3').Value := cF3;
Qry.ExecSQL;
Tra.Commit;
except
Tra.Rollback;
raise;
end;
end;
MessageDlg(Format('Done in %d seconds', [SecondsBetween(now,
start)]), mtInformation, [mbOK], 0);
finally
Con.Close;
end;
My environment is a Windows XP laptop that is pushing 5 years old.
(Pentium M 1400MHz, 1GB RAM). The database itself is on an encrypted
partition on a laptop hard drive (both really hurt performance!). I am
running Firebird 2.1 Classic Server with ODS 11.1 database and forced
writes.
The test application finished in 25 seconds (2 seconds if done in a
single transaction), so something is seriously wrong in your
environment if you are measuring in 10s of minutes, or my test
application does not accurately reflect your scenario. Which is it?
Adam