Subject RE: [ib-support] Data Caching by IB
Author Jack Cane

A response to my inquiry on the other list (I only saw one reply) began with
the admonition that I was posting that inquiry on the wrong list. I would
have replied there, but did not think it was appropriate.

I am testing the performance of a dynamic data-serving Web application by
making queries of a data source connected to the application. I need to make
repeated tests, and would like to avoid the effects of database caching. The
WebApp and database server are running on a Windows platform (Win2k Server).
I'm using Firebird. I thought Firebird and Interbase were equivalent.
Apparently the implementations differ as to some settings such as Forced
Writes on/off.

Research indicates that database caching is frequently used to improve
WebApp performance, i.e., to reduce the time it takes to get a response back
to a client. According to the literature, in a heavily trafficked site such
as the Olympics, the World Cup, etc., caching makes a big difference in
performance, when different users are requesting the same data, and many are
simply hitting their browser's "Refresh" button over and over again, to get
the very latest scores.

I would like to conduct the tests without data caching if possible. More
important is to be sure that the database server gives the same performance
for every data query. I suspect that the first query would take longer, and
that subsequent queries take less time if caching is enabled.

I plan to use InterBase as my data server. Early testing with WebHub using
the BDE and a Paradox database indicates a slight increase in response time
when different data are requested on two alternating data queries, but have
no idea if that approach actually defeated caching. To run this back to
ground truth requires knowing how caching works, how many copies of data can
be cached, etc. Better would be to just turn off caching.

I'm still not certain of the relationship of caching to the "writes" that
you mentioned below.

If you can point me to a source where caching, synch/asynch writes and
forced writes are explained I would be grateful. I looked for "Using
Firebird" on the Firebird site and in my FB installation folder but it did
not jump out at me. I don't know if "asynchronous writes" are the same as
the "caching" described above, and would appreciate your input based on the
description of caching as I understand it.

Could you also pease confirm if "asynchronous writes" are the same as
"forced writes". I am using Firebird. I am running with Win2k Pro for
development and pilot testing, but will deploy and do my final testing on a
Win2k Server system. I will test my Web App in both states using gfix, and
will see if a change in performance is detected.

Does Win2k Pro support Forced Writes? What I get from your message is that
Forced Writes are equivalent to synchronous writes, and disabling forced
writes amounts to setting asynchronous writes. If you could connect this
terminology to the description of caching that I gave above, that would be
very helpful.


-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, August 23, 2002 11:02 AM
Subject: Re: [ib-support] Data Caching by IB

At 10:45 AM 23-08-02 -0400, you wrote:
>Does anyone know if Interbase supports data caching, wherein data once
>requested are placed in a cache for re-use in case the same data are
>requested again?
>I would like to know if (a) InterBase supports caching, and (b) if yes,
>whether caching can be defeated, and how.

You have multiply posted this same message in more than one list and have
received replies. Please check back through the archives.

Someone asked *why* you want to "defeat caching" and I'm curious too...

I'm wondering if what you really wanted to ask was "How can I defeat
asynchronous writes?" If yes, and you are on a Windows server platform,
the answer is YES, you can and should defeat it. Use the gfix
tool. Snippet from Using Firebird (applies also to InterBase):

Syntax for enabling and disabling Forced Writes
The command switch is –w[rite]{sync | async}
To enable Forced Writes:
gfix -w sync customer.gdb
To disable:
gfix -w async customer.gdb

It's particularly necessary to attend to this with InterBase, which
databases with Forced Writes disabled by default. It's not an issue on
Win9x or ME, which don't support async write at all. Firebird enables it
by default.


Yahoo! Groups Sponsor

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

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