Subject Re: [IB-Architect] SUPERSERVER_V2
Author Olivier Mascia

I can't comment on the IB code itself, but more on the useage and some pro
/ cons of those flags. I used them in different projects.

As you know, used to initiate asynchronous file handling. Requires a lot of
code to be changed to really benefit from it. If the updates consist in
replacing a plain ReadFile by an asynchronous one immediately followed by a
wait for the asynchronous read to complete, no benefit would be gained. But
cleverly using asynchronous I/O may bring huge improvement in Windows NT.
Especially if using the "I/O completion ports" techniques.

Also interesting. But not without carefull analysis and design up-front.
This basically shuts down the Windows cache manager for accesses to that
file. There is one BIG condition : I/O must always be of a number of bytes
which are multiple of a "sector" size. That must be queried dynamically,
because can be different from file system to file system. Often what people
do (and that sounds logical), is to use the OS page size (which is of
course such a multiple - no questions asked). In most Windows NT
configurations that is 4K. But there is an API to check that (do not remind
it right now). I think I remember the page size is 8K and not 4K on Alpha
processor versions of NT 4 - not really sure though.
Bypassing Windows cache can be a big benefit or a big hit depending on IB
own caching (which is then the only kind of cache between program code and
data on disk).
The most common use of that flag I have seen is when you want to use
memory-file mapping (mapping all or part of your in memory).

For sure, with the right threading handling (pool of worker threads),
asynchronous I/O and no buffering mixture, you can make I/O scream on NT.
But this is far more from being an easy exercise.

Olivier Mascia

-- On 31/01/2001 16:24 +0300 Dmitry Kuzmenko <dima@...> wrote :

> Hello, All!
> My question is related to sources, but I think it is question about FB
> architecture and features.
> Reading sources I've found interesting define named
> At least in jrd\winnt.c there is a code
> P I O _ o p e n (open a database file)
> if ((desc = CreateFile (ptr,
> #endif
> these two flags (in SUPERSERVER_V2 ifdef) looks very interesting.
> Does somebody tested performance with this define enabled?
> Will it be set in future FireBird builds for Windows?
> Why this define is not yet enabled? (or it is already?)
> p.s. also, who can comment another interesting define -
> --
> Dmitry Kuzmenko, Epsylon Technologies.