Re: Ragged latency log data in multi-threaded pgbench - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: Ragged latency log data in multi-threaded pgbench
Date
Msg-id 20100316111337.9C20.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Ragged latency log data in multi-threaded pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Ragged latency log data in multi-threaded pgbench
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp> writes:
> > Oops. There might be two solutions for the issue:
> >   1. Use explicit locks. The lock primitive will be pthread_mutex for
> >      multi-threaded implementations or semaphore for multi-threaded ones.
> >   2. Use per-thread log files.
> >      File names would be "pgbench_log.<main-process-id>.<thread-id>".
> 
> I think #1 is out of the question, as the synchronization overhead will
> do serious damage to the whole point of having a multithreaded pgbench.
> #2 might be a reasonable idea.

Ok, I'll go for #2.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Ragged latency log data in multi-threaded pgbench
Next
From: Takahiro Itagaki
Date:
Subject: Re: Ragged latency log data in multi-threaded pgbench