Re: Committing Resources to Win32 - Mailing list pgsql-hackers-win32

From Andrew Dunstan
Subject Re: Committing Resources to Win32
Date
Msg-id 3FB00CDB.1080504@dunslane.net
Whole thread Raw
In response to Re: Committing Resources to Win32  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Responses Re: Committing Resources to Win32  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers-win32
Merlin Moncure wrote:

>Joshua D. Drake wrote:
>
>
>
>
>
>>I believe that Apache 2.x is not completly threaded.. don't they use
>>some kind of hybrid model?
>>
>>
>
>Apache by nature has a lot more performance issues wrt threading and
>process management.  Postgres is more generally I/O bound.  My
>professional opinion is that for win32 performance we should be looking
>at how the file system calls, especially synching, will run rather than
>ipc and threading.
>

Yes, Web requests by the nature of the protocol are short-lived
connections - if you are setting up and breaking down connections at a
very fast clip then forking a server per connection is going to be very
expensive. That is not a common usage pattern with a database server and
a well written app, IMNSHO.

Apache's APR took them years to get right, too.

>>Hmmm... maybe this all becomes moot if we also do connection pooling?
>>
>>
>
>This would serialize all database access...IMO not worth considering
>this angle.
>

Why does it serialize access? I have a web server app with connection
pooling - it has a pool of 20 connections that it keeps around for when
they are needed - they can all be active at any given time. And a good
connection pool manager sets up the connections ahead of time so that
each request sees *no* startup time.

>
>TLS variables are supported by the Win32 API, and all C compilers for
>windows support the Win32 API.  __declspec(thread) is just syntactic
>sugar which automate the API TLS commands.  Converting the variable
>access syntax is likely just one part of the overall move to the
>threaded approach.  A win32 centric move to threading will marginalize
>the port (again, IMO).
>
>
>

*nod*

Joshua, can you tell us any more about the nature of your client's
app(s)? Speculating like this in the dark is a bit fruitless.

cheers

andrew


pgsql-hackers-win32 by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: Committing Resources to Win32
Next
From: Marsh Ray
Date:
Subject: Re: Committing Resources to Win32