You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifies the TCP/IP address(es) on which the server is to listen for new remote direct memory access (<literal>RDMA</literal>) connections via <literal>rsocket</literal> from client applications. The value takes the form of a comma-separated list of host names
647
+
and/or numeric IP addresses. The special entry <literal>*</>
Copy file name to clipboardExpand all lines: doc/src/sgml/installation.sgml
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -798,6 +798,17 @@ su - postgres
798
798
</listitem>
799
799
</varlistentry>
800
800
801
+
802
+
<varlistentry>
803
+
<term><option>--with-rsocket</option></term>
804
+
<listitem>
805
+
<para>
806
+
Enable <literal>rsocket</literal> API support for remote direct memory access (<acronym>RDMA</acronym>).
807
+
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
Connects to the server using <literal>rsocket</literal> API.
1138
+
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
Connects to the server using <literal>rsocket</literal> API.
561
+
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
Connect to the server using <literal>rsocket</literal> API.
740
+
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
<para><productname>&productname;</productname> provides support for client/server connections that use remote direct memory access (<acronym>RDMA</acronym>) technology. You must have an <acronym>RDMA</acronym> implementation set up on both client and server systems.</para>
2524
+
<para>With <acronym>RDMA</acronym>, data can be sent directly into the memory of the remote system, bypassing the operating system kernel. As a result, this reduces the CPU load, ensures low network latency in distributed systems, and yields better performance.
<para>For client/server <acronym>RDMA</acronym> connections, <productname>&productname;</productname> uses <application>libpq</application> with <literal>rsocket</literal> API.
2531
+
To enable <acronym>RDMA</acronym> connections for your <productname>&productname;</productname> database via <literal>rsocket</literal>, you must configure both client and server systems, as follows:
2532
+
</para>
2533
+
2534
+
<orderedlist>
2535
+
<listitem>
2536
+
<para>On the server side, add the <xref linkend="listen-rdma-addresses"> GUC variable to the <filename>postgresql.conf</filename> configuration file to specify TCP/IP address(es) on which the server is to listen for new <acronym>RDMA</acronym> connections via <literal>rsocket</literal> from client applications. For example:
You can specify a comma-separated list of host names and/or numeric IP addresses. If set to <literal>*</>, this variable will enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal> to all the available IP interfaces.
2541
+
</para>
2542
+
</listitem>
2543
+
2544
+
<listitem>
2545
+
<para>
2546
+
On the client side, modify the <application>libpq</application> connection parameters to use <literal>rsocket</literal> API. This can be done in one of the following ways:
2547
+
</para>
2548
+
<itemizedlist>
2549
+
<listitem>
2550
+
<para>Add the following <literal>rsocket</literal> settings to the <application>libpq</application> <link linkend="libpq-pgservice">connection service file</link> <filename>pg_service.conf</filename>:
2551
+
<programlisting>
2552
+
# rsocket configuration
2553
+
[rsocket]
2554
+
host=<replaceable>hostname</>
2555
+
port=5433
2556
+
user=<replaceable>username</>
2557
+
with_rsocket=true
2558
+
</programlisting>
2559
+
When the client is connecting to the server via <application>libpq</application>, the name of the service provided in square brackets in the <filename>pg_service.conf</filename> file must be specified in the <link linkend="LIBPQ-PARAMKEYWORDS"><option>service</option></link> parameter keyword, or in the corresponding <link linkend="libpq-envars"><envar>PGSERVICE</envar></link> environment variable. This approach enables you to dynamically control client/server connection type.
2560
+
</para>
2561
+
</listitem>
2562
+
2563
+
<listitem>
2564
+
<para>Alternatively, you can set the <envar>WITH_RSOCKET</envar> environment variable:
2565
+
<programlisting>
2566
+
export WITH_RSOCKET=true
2567
+
</programlisting>
2568
+
In this case, all the client/server connections will use <literal>rsocket</literal> API.
2569
+
</para>
2570
+
</listitem>
2571
+
</itemizedlist>
2572
+
</listitem>
2573
+
</orderedlist>
2574
+
2575
+
</sect2>
2576
+
2577
+
<sect2>
2578
+
<title>Using <acronym>RDMA</acronym> with <application>pg_dump</application></title>
2579
+
<para>To connect <application>pg_dump</application> to the server over <acronym>RDMA</acronym> via <literal>rsocket</literal>:</para>
2580
+
<orderedlist>
2581
+
<listitem>
2582
+
<para>Set up the server as described in <xref linkend="rdma-setup">.
2583
+
</para>
2584
+
</listitem>
2585
+
<listitem>
2586
+
<para>Set the <envar>WITH_RSOCKET</envar> environment variable:
2587
+
<programlisting>
2588
+
export WITH_RSOCKET=true
2589
+
</programlisting>
2590
+
</para>
2591
+
</listitem>
2592
+
</orderedlist>
2593
+
<para>Once the setup is complete, launch <application>pg_dump</application> as usual. For example:
<title>Using <acronym>RDMA</acronym> for Master-Slave Replication</title>
2603
+
<para>To enable master-slave replication over <acronym>RDMA</acronym> connections via <literal>rsocket</literal>, you need to configure master and slave nodes as described below.</para>
2604
+
2605
+
<para><emphasis role="strong">To set up the master node for replication over <acronym>RDMA</acronym> connections via <literal>rsocket</literal>:</emphasis>
2606
+
</para>
2607
+
<orderedlist>
2608
+
<listitem>
2609
+
<para>Edit the <filename>pg_hba.conf</filename> file to allow client connections and replication at the specified IP addresses. For example:
2610
+
<programlisting>
2611
+
host all postgres 172.0.3.0/24 md5
2612
+
host replication postgres 172.0.3.0/24 md5
2613
+
</programlisting>
2614
+
</para>
2615
+
</listitem>
2616
+
<listitem>
2617
+
<para>
2618
+
Edit the <filename>postgresql.conf</filename> file:
2619
+
<programlisting>
2620
+
listen_rdma_addresses = '172.0.3.21'
2621
+
wal_level = hot_standby
2622
+
hot_standby = on
2623
+
max_wal_senders = 1
2624
+
</programlisting>
2625
+
The <varname>listen_rdma_addresses</varname> specifies the TCP/IP address(es) on which the server is to listen for new <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
2626
+
</para>
2627
+
</listitem>
2628
+
<listitem>
2629
+
<para>Restart the master node.
2630
+
</para>
2631
+
</listitem>
2632
+
</orderedlist>
2633
+
2634
+
<tip>
2635
+
<para>If you set <varname>log_connections</varname> and <varname>log_disconnections</varname> GUC variables, the log file will include detailed information on each client connection and disconnection, respectively. For example:
<para>In the <filename>postgresql.conf</filename> file, clear the <varname>listen_rdma_addresses</varname> parameter:
2671
+
<programlisting>
2672
+
listen_rdma_addresses = ''
2673
+
</programlisting>
2674
+
</para>
2675
+
</listitem>
2676
+
</orderedlist>
2677
+
2678
+
<para>Once the setup is complete, start the slave node. The streaming replication is now performed over the <acronym>RDMA</acronym> connections using <literal>rsocket</literal> API.</para>
0 commit comments