Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BDE optimization for multiple instances (cgi) apps

177 views
Skip to first unread message

Thierry Tuchagues

unread,
Jan 10, 1999, 3:00:00 AM1/10/99
to
I've been banging my head on a wall for a while now on that one:

Web server is IIS 4.0, 128MB RAM (256MB w/swap file), CGI application uses
BDE 5.01 w/Interbase SQL Link driver.

No matter how I try to configure the BDE memory settings (from BDE admin) -
I've even tried increasing the stack size within the project - It seems that
after 8-10 instances of cgi applications using the BDE are running, I get
the infamous "Borland Database Engine initialization error $xxx" (xxx
varies).

Does ANYONE know how to properly optimize the BDE so that it uses the least
amount of memory per instance? the cgi app only needs to run 1-2 query
(unilateral), and there is no need for buffer storage at all.

ANY HELP WOULD BE IMMENSELY APPRECIATED !!!
(replies with solutions, please cc my email address as well...)

Thierry
Access Technology Group Inc.
ttuch...@accesstechnologygroup.com


John Kaster

unread,
Jan 10, 1999, 3:00:00 AM1/10/99
to
Have you tried increasing the shared mem size for the BDE?


John Kaster, Enterprise Product Manager
Please post MIDAS-related messages in inprise.public.midas

Thierry Tuchagues

unread,
Jan 11, 1999, 3:00:00 AM1/11/99
to
Yeah,

That's one of the things I tried...
Thanks though!

Thierry

John Kaster wrote in message <36993c70....@forums.inprise.com>...

John Kaster

unread,
Jan 11, 1999, 3:00:00 AM1/11/99
to
How much did you increase it to?

>
> That's one of the things I tried...
>Thanks though!
>
>Thierry
>

Marc Schmidt Le Roi

unread,
Jan 12, 1999, 3:00:00 AM1/12/99
to
Hi,

I have the same configuration : Delphi 4.01, 256 Mo of RAM, 4Go of free
Space Disk, Interbase 5.5, BDE 5.01, IIS 4.0 and NT 4.0 SP4.

What is the best configuration of the BDE for the best result :

I have this parameters :

MAXBUFSIZE = 2048
MAXFILEHANDLES = 48
MEMSIZE = 16
MINBUFSIZE = 128
SHAREDMEMSIZE = 4098

Best Regards

Marc Schmidt Le Roi


John Kaster <jkaster...@inprise.com> a écrit dans le message :
36993c70....@forums.inprise.com...

John Kaster

unread,
Jan 12, 1999, 3:00:00 AM1/12/99
to
I have not confirmed it myself, but some of our engineers have said that bumping
up the SHAREDMEMSIZE a LOT (like 64MB) makes a big difference. Got this second
hand, so I can't be positive.

Brian Bushay TeamB

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to

>I have the same configuration : Delphi 4.01, 256 Mo of RAM, 4Go of free
>Space Disk, Interbase 5.5, BDE 5.01, IIS 4.0 and NT 4.0 SP4.
>
>What is the best configuration of the BDE for the best result :
>
>I have this parameters :
>
>MAXBUFSIZE = 2048
>MAXFILEHANDLES = 48
>MEMSIZE = 16
>MINBUFSIZE = 128
>SHAREDMEMSIZE = 4098

I have never tested with more than 64 meg on a machine but the only thing I have
found that gives consistant preformance incresses in all testing is to get
MinBufsize to at least 1 meg.

Following is a recomendation for memory setting that came from BDE QA

1) Take the total amount of RAM on the machine and subtract 16MB for NT or
8MB for Win95.

2) With the remaining amount of RAM, set MEMSIZE to 3/4 of the amount and
SHAREDMEMSIZE to 1/4 of the amount.

For example : If you had a 64MB machine running NT you would start with
48MB (64-16) and set :

MEMSIZE = 36 (48 * .75)
SHAREDMEMSIZE = 12288 (48 * .25)


--
Brian Bushay (TeamB)
Bbu...@NMPLS.com

Paul Motyer

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to
For BDE versions prior to V5, the algorythm from QA causes the BDE to CRASH
if the machine has >256 Mb of RAM.

Unfortunately, some of my sites have 512 Mb so I have had to adjust the
algorythm:

my Apps initialization code now uses:

MS.dwLength:= SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
RAM:= (MS.dwTotalPhys) div (1024*1024); //in Mb
if RAM<16 then exit;
if RAM>256 then RAM:= 255;
if Win32Platform=VER_PLATFORM_WIN32_NT then
begin //NT
RAM:= RAM-16;
end else begin //Win95/98
RAM:= RAM-8;
end;
RAM:= ((RAM*25) div 100)-1; // 1/4 of RAM after OS overhead- 1 in Mb
if RAM>0 then
begin
SetReg('MEMSIZE', inttostr(RAM*3)); // in Mb
SetReg('MAXBUFSIZE', inttostr(RAM*1024)); //in Kb "Must be a multiple of
128"
SetReg('SHAREDMEMSIZE', inttostr(RAM*1024)); //in Kb
end;

HTH,


Paul Motyer
SoftStuff
PO Box 637, Croydon, VIC, Australia, 3136

Brian Bushay TeamB wrote in message <369cfba4.36430082@floyd>...

Thierry Tuchagues

unread,
Jan 13, 1999, 3:00:00 AM1/13/99
to
Thanks for your invaluable insight!
I've made the changes recommended and am waiting to see how the system
behaves.. In your experience, how many instances (bde sessions) should the
system be able to handle on a system with 128mb? Can I discard the changes I
made to my projects to increase the stack size (in other words, should this
have any bearing on this particular issue)?

This is great feedback, thanks everyone!

Thierry Tuchagues,
Access Technology Group inc.
Toronto, CAN

Paul Motyer wrote in message <77i22e$ri...@forums.borland.com>...

0 new messages