Re: [HACKERS] Performance TODO items

2001-09-05 Thread Bruce Momjian
> > > > We could use POSIX spinlocks/semaphores now but we > > > > don't because of performance, right? > > > > > > No. As long as no one proved with test that mutexes are bad for > > > performance... > > > Funny, such test would require ~ 1 day of work. > > > > Good question. I know the number

Re: [HACKERS] Performance TODO items

2001-07-31 Thread Bruce Momjian
> On Mon, 30 Jul 2001, Bruce Momjian wrote: > > > * Improve spinlock code, perhaps with OS semaphores, sleeper queue, or > > spining to obtain lock on multi-cpu systems > > You may be interested in a discussion which happened over on > linux-kernel a few months ago. > > Quite a lot of people

Re: [HACKERS] Performance TODO items

2001-07-31 Thread Matthew Kirkwood
On Mon, 30 Jul 2001, Bruce Momjian wrote: > * Improve spinlock code, perhaps with OS semaphores, sleeper queue, or > spining to obtain lock on multi-cpu systems You may be interested in a discussion which happened over on linux-kernel a few months ago. Quite a lot of people want a lightweight

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Bruce Momjian
> A more general solution is for indexscan to collect up a bunch of TIDs > from the index, sort them in-memory by TID order, and then probe into > the heap with those TIDs. This is better than the above because you get > nice ordering of the heap accesses across multiple key values, not just > am

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I have thought of a few new TODO performance items: > 1) Someone at O'Reilly suggested that we order our duplicate index > entries by tid so if we are hitting the heap for lots of duplicates, the > hits will be on sequential pages. Seems like a nice id

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Bruce Momjian
> So why do we cache sequetially-read pages? Or at least not have an > option to control it? > > Oracle (to the best of my knowledge) does NOT cache pages read by a > sequential index scan for at least two reasons/assumptions (two being > all that I can recall): > > 1. Caching pages for sequent

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > New TODO entries are: > > * Add queue of backends waiting for spinlock > > I already see: > > * Create spinlock sleepers queue so everyone doesn't wake up at once That is an old copy of the TODO. I reworded it. You will only see this now:

RE: [HACKERS] Performance TODO items

2001-07-30 Thread Darren King
> 3) I am reading the Solaris Internals book and there is mention of a > "free behind" capability with large sequential scans. When a large > sequential scan happens that would wipe out all the old cache entries, > the kernel detects this and places its previous pages first > on the free list.

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Should we be spinning waiting for spinlock on multi-cpu machines? Is > that the answer? A multi-CPU machine is actually the only case where a true spinlock *does* make sense. On a single CPU you might as well yield the CPU immediately, because you hav

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > New TODO entries are: > * Add queue of backends waiting for spinlock I already see: * Create spinlock sleepers queue so everyone doesn't wake up at once BTW, I agree with Vadim's opinion that we should add a new type of lock (intermediate betwe

RE: [HACKERS] Performance TODO items

2001-07-30 Thread Mikheev, Vadim
> > > We could use POSIX spinlocks/semaphores now but we > > > don't because of performance, right? > > > > No. As long as no one proved with test that mutexes are bad for > > performance... > > Funny, such test would require ~ 1 day of work. > > Good question. I know the number of function call

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Bruce Momjian
> > > > * Order duplicate index entries by tid > > > > > > In other words - add tid to index key: very old idea. > > > > I was thinking during index creation, it would be nice to > > order them by tid, but not do lots of work to keep it that way. > > I hear this "not do lots of work" so

RE: [HACKERS] Performance TODO items

2001-07-30 Thread Mikheev, Vadim
> > > * Order duplicate index entries by tid > > > > In other words - add tid to index key: very old idea. > > I was thinking during index creation, it would be nice to > order them by tid, but not do lots of work to keep it that way. I hear this "not do lots of work" so often from you -:) Da

RE: [HACKERS] Performance TODO items

2001-07-30 Thread Mikheev, Vadim
> New TODO entries are: > > * Order duplicate index entries by tid In other words - add tid to index key: very old idea. > * Add queue of backends waiting for spinlock We shouldn't mix two different approaches for different kinds of short-time internal locks - in one cases we need

Re: [HACKERS] Performance TODO items

2001-07-30 Thread Bruce Momjian
> > New TODO entries are: > > > > * Order duplicate index entries by tid > > In other words - add tid to index key: very old idea. I was thinking during index creation, it would be nice to order them by tid, but not do lots of work to keep it that way. > > * Add queue of backends waiti