Latch implementation

Поиск
Список
Период
Сортировка
От Ganesh Venkitachalam-1
Тема Latch implementation
Дата
Msg-id Pine.LNX.4.64.1009221329460.20386@aluva.prom.eng.vmware.com
обсуждение исходный текст
Ответы Re: Latch implementation  (Robert Haas <robertmhaas@gmail.com>)
Re: Latch implementation  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: Latch implementation  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Hi,

I've been playing around with measuring the latch implementation in 9.1, 
and here are the results of a ping-pong test with 2 processes signalling 
and waiting on the latch. I did three variations (linux 2.6.18, nehalem 
processor).

One is the current one.

The second is built on native semaphors on linux. This one cannot
implement WaitLatchOrSocket, there's no select involved.

The third is an implementation based on pipe() and poll. Note: in its 
current incarnation it's essentially a hack to measure performance, it's 
not usable in postgres, this assumes all latches are created before any 
process is forked. We'd need to use mkfifo to sort that out if we really 
want to go this route, or similar.

- Current implementation: 1 pingpong is avg 15 usecs
- Pipe+poll: 9 usecs
- Semaphore: 6 usecs

The test program & modified unix_latch.c is attached, you can compile it 
like "gcc -DPIPE -O2 sema.c" or "gcc -DLINUX_SEM -O2 sema.c" or "gcc -O2 
sema.c".


Thanks,
--Ganesh

В списке pgsql-hackers по дате отправления:

Предыдущее
От: tkbysh2000@yahoo.co.jp
Дата:
Сообщение: Re: BUG #5661: The character encoding in logfile is confusing.
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Configuring synchronous replication