mirror of https://github.com/postgres/postgres
parent
8aea1373d8
commit
606a3d54fc
@ -0,0 +1,23 @@ |
|||||||
|
#
|
||||||
|
# Makefile for test_fsync
|
||||||
|
#
|
||||||
|
# contrib/test_fsync/Makefile
|
||||||
|
|
||||||
|
PGFILEDESC = "test_fsync - test various disk sync methods"
|
||||||
|
PGAPPICON = win32
|
||||||
|
|
||||||
|
PROGRAM = test_fsync
|
||||||
|
OBJS = test_fsync.o
|
||||||
|
|
||||||
|
PG_LIBS = $(libpq_pgport)
|
||||||
|
|
||||||
|
ifdef USE_PGXS |
||||||
|
PG_CONFIG = pg_config
|
||||||
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
|
include $(PGXS) |
||||||
|
else |
||||||
|
subdir = contrib/test_fsync
|
||||||
|
top_builddir = ../..
|
||||||
|
include $(top_builddir)/src/Makefile.global |
||||||
|
include $(top_srcdir)/contrib/contrib-global.mk |
||||||
|
endif |
@ -0,0 +1,70 @@ |
|||||||
|
<!-- doc/src/sgml/pgtestfsync.sgml --> |
||||||
|
|
||||||
|
<sect1 id="pgtestfsync"> |
||||||
|
<title>pg_test_fsync</title> |
||||||
|
|
||||||
|
<indexterm zone="pgtestfsync"> |
||||||
|
<primary>pg_test_fsync</primary> |
||||||
|
</indexterm> |
||||||
|
|
||||||
|
<para> |
||||||
|
<application>pg_test_fsync</> is intended to give you a reasonable |
||||||
|
idea of what the fastest fsync_method is on your specific system, |
||||||
|
as well as supplying diagnostic information in the event of an |
||||||
|
identified I/O problem. However, differences shown by test_fsync |
||||||
|
might not make any difference in real database throughput, especially |
||||||
|
since many database servers are not speed-limited by their transaction |
||||||
|
logs. |
||||||
|
</para> |
||||||
|
|
||||||
|
<sect2> |
||||||
|
<title>Usage</title> |
||||||
|
|
||||||
|
<sect2> |
||||||
|
<title><application>pg_test_fsync</> Options</title> |
||||||
|
|
||||||
|
<para> |
||||||
|
<application>pg_test_fsync</application> accepts the following command-line arguments: |
||||||
|
|
||||||
|
<variablelist> |
||||||
|
|
||||||
|
<varlistentry> |
||||||
|
<term><option>-f</option></term> |
||||||
|
<term><option>--filename</option></term> |
||||||
|
<listitem> |
||||||
|
<para> |
||||||
|
Specifies the filename for test. The file should be in the |
||||||
|
same file system as the <filename>pg_xlog</> directory. |
||||||
|
<filename>/pg_xlog</> contains the <acronym>WAL</> files.) |
||||||
|
The default is <filename>test_fsync.out</> in the current |
||||||
|
directory. |
||||||
|
</para> |
||||||
|
</listitem> |
||||||
|
</varlistentry> |
||||||
|
|
||||||
|
<varlistentry> |
||||||
|
<term><option>-o</option></term> |
||||||
|
<term><option>--ops-per-test</option></term> |
||||||
|
<listitem> |
||||||
|
<para> |
||||||
|
Specifies the number of operations per test. The more operations |
||||||
|
per test, the greater the test's accuracy. The default is |
||||||
|
2000. |
||||||
|
</para> |
||||||
|
</listitem> |
||||||
|
</varlistentry> |
||||||
|
|
||||||
|
</variablelist> |
||||||
|
</para> |
||||||
|
|
||||||
|
</sect2> |
||||||
|
|
||||||
|
<sect2> |
||||||
|
<title>Author</title> |
||||||
|
|
||||||
|
<para> |
||||||
|
Bruce Momjian <email>bruce@momjian.us</email> |
||||||
|
</para> |
||||||
|
</sect2> |
||||||
|
|
||||||
|
</sect1> |
@ -1,25 +0,0 @@ |
|||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Makefile for src/tools/fsync
|
|
||||||
#
|
|
||||||
# Copyright (c) 2003-2011, PostgreSQL Global Development Group
|
|
||||||
#
|
|
||||||
# src/tools/fsync/Makefile
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
subdir = src/tools/fsync
|
|
||||||
top_builddir = ../../..
|
|
||||||
include $(top_builddir)/src/Makefile.global |
|
||||||
|
|
||||||
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) |
|
||||||
|
|
||||||
OBJS= test_fsync.o
|
|
||||||
|
|
||||||
all: submake-libpq submake-libpgport test_fsync |
|
||||||
|
|
||||||
test_fsync: test_fsync.o $(libpq_builddir)/libpq.a |
|
||||||
$(CC) $(CFLAGS) test_fsync.o $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
|
||||||
|
|
||||||
clean distclean maintainer-clean: |
|
||||||
rm -f test_fsync$(X) $(OBJS)
|
|
@ -1,25 +0,0 @@ |
|||||||
test_fsync |
|
||||||
========== |
|
||||||
|
|
||||||
This program tests fsync. The tests are described as part of the program output. |
|
||||||
|
|
||||||
Usage: test_fsync [option...] |
|
||||||
|
|
||||||
Options: |
|
||||||
-f, --filename specify filename for test |
|
||||||
-o, --ops-per-test operations per test |
|
||||||
|
|
||||||
test_fsync is intended to give you a reasonable idea of what the fastest |
|
||||||
fsync_method is on your specific system, as well as supplying diagnostic |
|
||||||
information in the event of an identified I/O problem. However, |
|
||||||
differences shown by test_fsync might not make any difference in real |
|
||||||
database throughput, especially since many database servers are not |
|
||||||
speed-limited by their transaction logs. |
|
||||||
|
|
||||||
The output filename defaults to test_fsync.out in the current directory. |
|
||||||
test_fsync should be run in the same filesystem as your transaction log |
|
||||||
directory (pg_xlog). |
|
||||||
|
|
||||||
Operations per test defaults to 2000. Increase this to get more accurate |
|
||||||
measurements. |
|
||||||
|
|
Loading…
Reference in new issue