Re: PATCH: pgbench - merging transaction logs

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: pgbench - merging transaction logs
Date: 2015-03-29 15:45:19
Message-ID: alpine.DEB.2.10.1503291737180.17117@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> I also implemented a quick and dirty version for a merge log based on
>> sharing a file handle (append mode + sprintf + fputs).

I tried the "append + per-thread 2KB buffered sprintf + fputs when full",
with the same number of runs. The logs are out of order by chunks, the
overhead seems higher with 1 thread, but there is no extra overhead
with 12 threads.

>> The results are as follow:
>>
>> * 1 thread 33 runs median tps (average is consistent):
>> - no logging: 22062
>> - separate logging: 19360 (-12.2%)
>> - merged logging: 19326 (-12.4%, not significant from previous)

- buf merged logging: 18751 (-15%, seems significant)

>> The worst overhead I could trigger is with 12 threads:
>>
>> * 12 threads 35 runs median tps (average is consistent)
>> - no logging: 155917
>> - separate logging: 124695 (-20.0%)
>> - merged logging: 119349 (-23.5%)

- buf merged logging: 124914 (-19.9%, not significant from separate)

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-03-29 15:51:00 Re: getting rid of "thread fork emulation" in pgbench?
Previous Message Erik Rijkers 2015-03-29 15:43:51 Re: TRAP: BadArgument - mcxt.c, Line: 813