From: | Duane Currie <dcurrie(at)sandman(dot)acadiau(dot)ca> |
---|---|
To: | Michael(dot)Ansley(at)intec(dot)co(dot)za (Ansley, Michael) |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Threads |
Date: | 1999-08-03 11:44:01 |
Message-ID: | 199908031144.IAA08418@sandman.acadiau.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This was one of the points I was talking about in the original message.
This way, it's still one session per backend, but uses threads to improve
throughput...
"(While one thread is waiting for the disk to respond to
an IO request, another processes the last chunk of data)"
This one looks to me like the best idea.
Now that pthreads is pretty much standard on systems (or available),
threading shouldn't be so problematic from a portability standpoint...
Duane
> Aren't there cases, though, where multi-threading could be used within the
> back end design that we have at the moment, for example, to avoid lags
> during I/O? So, while the nth block of data is being read from the disk,
> the (n-1)th block is being processed by the next process down the line. For
> example...
> This wouldn't (shouldn't?) break the isolation that currently exists due to
> single-process servers.
>
> MikeA
>
> >> > As well, a few have been asking about multi-threading.
> >> > Any thoughts?
> >>
> >> Threads within a client backend might be interesting. imho a
> >> single-process multi-client multi-threaded server is just asking for
> >> trouble, putting all clients at risk for any single misbehaving one.
> >> Particularly with our extensibility features, where users and admins
> >> can add functionality through code they have written (or are
> >> trying to
> >> write ;) having each backend isolated is A Good Thing.
> >>
> >> istm that many of the cases for which multi-threading is
> >> proposed (web
> >> serving always comes up) can be solved using persistant
> >> connections or
> >> other techniques.
> >>
> >> - Thomas
>
From | Date | Subject | |
---|---|---|---|
Next Message | Duane Currie | 1999-08-03 13:33:44 | Re: [HACKERS] Threads |
Previous Message | Hannu Krosing | 1999-08-03 11:32:10 | Re: [HACKERS] RE: |