Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3da0dfb

Browse files
committed
Multi-threaded version of pgbench contributed by ITAGAKI Takahiro,
reviewed by Greg Smith and Josh Williams.Following is the proposal from ITAGAKI Takahiro:Pgbench is a famous tool to measure postgres performance, but nowadaysit does not work well because it cannot use multiple CPUs. On the otherhand, postgres server can use CPUs very well, so the bottle-neck ofworkload is *in pgbench*.Multi-threading would be a solution. The attached patch adds -j(number of jobs) option to pgbench. If the value N is greater than 1,pgbench runs with N threads. Connections are equally-divided intothem (ex. -c64 -j4 => 4 threads with 16 connections each). It canrun on POSIX platforms with pthread and on Windows with win32 threads.Here are results of multi-threaded pgbench runs on Fedora 11 with intelcore i7 (8 logical cores = 4 physical cores * HT). -j8 (8 threads) wasthe best and the tps is 4.5 times of -j1, that is a traditional result.$ pgbench -i -s10$ pgbench -n -S -c64 -j1 => tps = 11600.158593$ pgbench -n -S -c64 -j2 => tps = 17947.100954$ pgbench -n -S -c64 -j4 => tps = 26571.124001$ pgbench -n -S -c64 -j8 => tps = 52725.470403$ pgbench -n -S -c64 -j16 => tps = 38976.675319$ pgbench -n -S -c64 -j32 => tps = 28998.499601$ pgbench -n -S -c64 -j64 => tps = 26701.877815Is it acceptable to use pthread in contrib module?If ok, I will add the patch to the next commitfest.
1 parent9072592 commit3da0dfb

File tree

2 files changed

+519
-279
lines changed

2 files changed

+519
-279
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp