summaryrefslogtreecommitdiff
path: root/doc/src/sgml/pgtestfsync.sgml
blob: c4b4014b1a0a72a49d8824a8a269f5139d99e548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!-- doc/src/sgml/pgtestfsync.sgml -->

<refentry id="pgtestfsync">
 <indexterm zone="pgtestfsync">
  <primary>pg_test_fsync</primary>
 </indexterm>

 <refmeta>
  <refentrytitle><application>pg_test_fsync</application></refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pg_test_fsync</refname>
  <refpurpose>determine fastest wal_sync_method for <productname>PostgreSQL</productname></refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_test_fsync</command>
   <arg rep="repeat"><replaceable>option</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

 <para>
  <application>pg_test_fsync</> is intended to give you a reasonable
  idea of what the fastest <xref linkend="guc-wal-sync-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
  <application>pg_test_fsync</application> might not make any significant
  difference in real database throughput, especially since many database servers
  are not speed-limited by their transaction logs.
  <application>pg_test_fsync</application> reports average file sync operation
  time in microseconds for each <literal>wal_sync_method</literal>, which can also be used to
  inform efforts to optimize the value of <xref linkend="guc-commit-delay">.
 </para>
 </refsect1>

 <refsect1>
  <title>Options</title>

   <para>
    <application>pg_test_fsync</application> accepts the following
    command-line options:

    <variablelist>

     <varlistentry>
      <term><option>-f</option></term>
      <term><option>--filename</option></term>
      <listitem>
       <para>
        Specifies the file name to write test data in.
        This file should be in the same file system that the
        <filename>pg_xlog</> directory is or will be placed in.
        (<filename>pg_xlog</> contains the <acronym>WAL</> files.)
        The default is <filename>pg_test_fsync.out</> in the current
        directory.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s</option></term>
      <term><option>--secs-per-test</option></term>
      <listitem>
       <para>
        Specifies the number of seconds for each test.  The more time
        per test, the greater the test's accuracy, but the longer it takes
        to run.  The default is 5 seconds, which allows the program to
        complete in under 2 minutes.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-V</></term>
      <term><option>--version</></term>
      <listitem>
       <para>
        Print the <application>pg_test_fsync</application> version and exit.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-?</></term>
      <term><option>--help</></term>
      <listitem>
       <para>
        Show help about <application>pg_test_fsync</application> command line
        arguments, and exit.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>

 </refsect1>

 <refsect1>
  <title>Author</title>

  <para>
   Bruce Momjian <email>[email protected]</email>
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="app-postgres"></member>
  </simplelist>
 </refsect1>
</refentry>