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

Commit60e612b

Browse files
committed
Use ppoll(2), if available, to wait for input in pgbench.
Previously, pgbench always used select(2) for this purpose, but that'sproblematic for very high client counts, because select() can't dealwith file descriptor numbers larger than FD_SETSIZE. It's pretty commonfor that to be only 1024 or so, whereas modern OSes can allow many moreopen files than that. Using poll(2) would surmount that problem, but itcreates another one: poll()'s timeout resolution is only 1ms, which ispoor enough to cause problems with --rate specifications approaching orexceeding 1K TPS.On platforms that have ppoll(2), which includes Linux and recentFreeBSD, we can use that to avoid the FD_SETSIZE problem without anyloss of timeout resolution. Hence, add configure logic to test forppoll(), and use it if available.This patch introduces an abstraction layer into pgbench that couldbe extended to support other kernel event-wait APIs such as kevents.But actually adding such support is a matter for some future patch.Doug Rady, reviewed by Robert Haas and Fabien Coelho, and whacked arounda good bit more by meDiscussion:https://postgr.es/m/23D017C9-81B7-484D-8490-FD94DEC4DF59@amazon.com
1 parent87d9bbc commit60e612b

File tree

6 files changed

+258
-42
lines changed

6 files changed

+258
-42
lines changed

‎configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15093,7 +15093,7 @@ fi
1509315093
LIBS_including_readline="$LIBS"
1509415094
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
1509515095

15096-
for ac_func in cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l
15096+
for ac_func in cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocateppollpstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l
1509715097
do :
1509815098
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1509915099
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

‎configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ PGAC_FUNC_WCSTOMBS_L
15621562
LIBS_including_readline="$LIBS"
15631563
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15641564

1565-
AC_CHECK_FUNCS([cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l])
1565+
AC_CHECK_FUNCS([cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocateppollpstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l])
15661566

15671567
AC_REPLACE_FUNCS(fseeko)
15681568
case $host_os in

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp