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

Re: Using Threads?

From: Myron Scott <mscott(at)sacadia(dot)com>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using Threads?
Date: 2001-01-02 16:46:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Alfred Perlstein wrote:

> It's possible what you're seeing is the entire process
> wait for a disk IO to complete.
> I'm wondering, how many lwps does your system use?  Are all
> the threads bound to a single lwp or do you let the threads
> manager handle this all for you?

Yeah, I looked at this.  I have one thread per process that
does all flushing of buffer pages at transaction commit.
The client threads register buffer writes with this thread and
wait for this thread to complete writes
at transaction end.  Unfortuately, selects also wait which really
isn't nessessary.  I hoped this would speed
simultaneous connections.  I created this as both
a bound thread with its own lwp and a threads manager
managed thread.  I eventually settled on a threads manager
managed thread, thinking that I wanted to set the priority
of this thread low and commit as many transactions as
possible simulateously.  Maybe, I should rethink this.

As for client threads, that is managed by TAO and I
haven't really played with that configuration.

Myron Scott

In response to


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-01-02 17:14:01
Subject: NetBSD libedit (Re: GNU readline and BSD license)
Previous:From: Alfred PerlsteinDate: 2001-01-02 15:52:34
Subject: Re: Using Threads?

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