Skip site navigation (1) Skip section navigation (2)

Re: Committing Resources to Win32

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To:
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Committing Resources to Win32
Date: 2003-11-10 22:10:35
Message-ID: 3FB00CDB.1080504@dunslane.net (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-hackers-win32 by date

Next:From: Marsh RayDate: 2003-11-10 22:45:13
Subject: Re: Committing Resources to Win32
Previous:From: Merlin MoncureDate: 2003-11-10 21:39:58
Subject: Re: Committing Resources to Win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group