Doc: fix memory requirement section.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 6 Jun 2022 13:06:37 +0000 (22:06 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 6 Jun 2022 13:15:35 +0000 (22:15 +0900)
- enhance the formula to calculate shared memory requirement so that it computes more accurate result.

- fix shared memory requirement for shared rel cache. The old value 64MB was simply wrong.

- fix process memory requirement. Previously the formula was based on
  RSS. However PSS should be used because RSS includes shared memory
  such as the memory used for libraries. This resuls in lot smaller
  memory requirement than before.

doc.ja/src/sgml/performance.sgml
doc/src/sgml/performance.sgml

index b4e190c54fdee38a76682b1f200de82795406af7..65e091c85eb309752c15223d003f9edff1140c80 100644 (file)
@@ -38,9 +38,9 @@
     <para>
      必要共有メモリの計算式を示します。
      <programlisting>
-      å¿\85è¦\81å\85±æ\9c\89ã\83¡ã\83¢ã\83ª(ã\83\90ã\82¤ã\83\88) = <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> * 17408
+      å¿\85è¦\81å\85±æ\9c\89ã\83¡ã\83¢ã\83ª(ã\83¡ã\82¬ã\83\90ã\82¤ã\83\88) = 10 + <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> * 0.02
      </programlisting>
-     例えば<varname>num_init_children</varname> = 32 (デフォルト値です)で、<varname>max_pool</varname> = 4 (デフォルト値です)ならば、必要メモリは32 * 4 * 17408 = 2228224 bytes = 2.1 MBです。
+     例えば<varname>num_init_children</varname> = 32 (デフォルト値です)で、<varname>max_pool</varname> = 4 (デフォルト値です)ならば、必要メモリは10 + 32 * 4 * 0.02 = 12.6 MBです。
     </para>
 
     <para>
@@ -49,7 +49,7 @@
     </para>
 
     <para>
-     ただし<productname>Pgpool-II</productname> 4.1移行では、インメモリクエリキャッシュが有効になっていなくても、<xref linkend="guc-enable-shared-relcache">が有効なら(デフォルトで有効です)、追加で64MBの共有メモリを使用することに注意してください。
+     ただし<productname>Pgpool-II</productname> 4.1移行では、インメモリクエリキャッシュが有効になっていなくても、<xref linkend="guc-enable-shared-relcache">が有効なら(デフォルトで有効です)、追加で128MBの共有メモリを使用することに注意してください。
     </para>
 
    </sect3>
@@ -59,9 +59,9 @@
     <para>
      必要プロセスメモリの計算式を示します。
      <programlisting>
-      合計必要プロセスメモリ(メガバイト単位) = <xref linkend="guc-num-init-children"> * 5
+      合計必要プロセスメモリ(メガバイト単位) = <xref linkend="guc-num-init-children"> * 0.16
      </programlisting>
-     たとえば<varname>num_init_children</varname> = 32 (デフォルト値です)なら、160MBのメモリが必要です。
+     たとえば<varname>num_init_children</varname> = 32 (デフォルト値です)なら、5.2 MBのメモリが必要です。
     </para>
    </sect3>
   </sect2>
index 3f192d6e52de1569bc02c425cfac0eef1d0c11cb..92ce013a502cfc6601d66a865947da691fd7208e 100644 (file)
     <para>
      Here is a formula to calculate the shared memory requirement.
      <programlisting>
-      Shared memory requirement (in bytes) = <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> * 17408
+      Shared memory requirement (in mega bytes) = 10 + <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> * 0.02
      </programlisting>
      For example if you have <varname>num_init_children</varname> = 32 (the default) and <varname>max_pool</varname> = 4 (the
-     default), then you will need 32 * 4 * 17408 = 2228224 bytes = 2.1 MB.
+     default), then you will need 10 + 32 * 4 * 0.02 = 12.6 MB.
     </para>
 
     <para>
@@ -64,7 +64,7 @@
     <para>
      Note that, however, in <productname>Pgpool-II</productname> 4.1
      or after, even if the in memory query cache is not enabled, it
-     consumes additional 64MB of shared memory, if <xref
+     consumes additional 128MB of shared memory, if <xref
      linkend="guc-enable-shared-relcache"> is enabled (it is enabled
      by default).
     </para>
 
      Here is a formula to calculate the process memory requirement.
      <programlisting>
-      Process memory requirement in total (in mega bytes) = <xref linkend="guc-num-init-children"> * 5
+      Process memory requirement in total (in mega bytes) = <xref linkend="guc-num-init-children"> * 0.16
      </programlisting>
      For example if you have <varname>num_init_children</varname> =
-     32 (the default), you will need 160MB.
+     32 (the default), you will need 5.2MB.
     </para>
    </sect3>
   </sect2>