@@ -1028,14 +1028,14 @@ sysctl -w kern.sysv.shmall
10281028
10291029
10301030 <varlistentry>
1031- <term><systemitem class="osname">Solaris</></term>
1031+ <term><systemitem class="osname">Solaris</> 2.6 to 2.9 (Solaris
1032+ 6 to Solaris 9)</term>
10321033 <indexterm><primary>Solaris</><secondary>IPC configuration</></>
10331034 <listitem>
10341035 <para>
1035- At least in version 2.6, the default maximum size of a shared
1036- memory segment is too low for <productname>PostgreSQL</>. The
1037- relevant settings can be changed in <filename>/etc/system</>,
1038- for example:
1036+ The default maximum size of a shared memory segment is too low for
1037+ <productname>PostgreSQL</>. The relevant settings can be changed in
1038+ <filename>/etc/system</>, for example:
10391039<programlisting>
10401040set shmsys:shminfo_shmmax=0x2000000
10411041set shmsys:shminfo_shmmin=1
@@ -1047,14 +1047,59 @@ set semsys:seminfo_semmni=512
10471047set semsys:seminfo_semmns=512
10481048set semsys:seminfo_semmsl=32
10491049</programlisting>
1050- You need to reboot for the changes to take effect.
1050+ You need to reboot for the changes to take effect. See also
1051+ <ulink url="http://sunsite.uakom.sk/sunworldonline/swol-09-1997/swol-09-insidesolaris.html"></ulink>
1052+ for information on shared memory under older versions of Solaris.
1053+ </para>
1054+ </listitem>
1055+ </varlistentry>
1056+
1057+ <varlistentry>
1058+ <term><systemitem class="osname">Solaris</> 2.10 (Solaris
1059+ 10)</term>
1060+ <term><systemitem class="osname">OpenSolaris</></term>
1061+ <indexterm><primary>Solaris</><secondary>IPC configuration</></>
1062+ <listitem>
1063+ <para>
1064+ In Solaris 10 and OpenSolaris, the default shared memory and
1065+ semaphore settings are good enough for most
1066+ <productname>PostgreSQL</> applications. Solaris now defaults
1067+ to a <varname>SHMMAX</> of one-quarter of system <acronym>RAM</>. If
1068+ you need to increase this in order to set shared memory settings
1069+ slightly higher, you should use a project setting associated
1070+ with the <literal>postgres</> user. For example, run the
1071+ following as <literal>root</>:
1072+ <programlisting>
1073+ projadd -c "PostgreSQL DB User" -K "project.max-shm-memory=(privileged,8GB,deny)" -U postgres -G postgres user.postgres
1074+ </programlisting>
1075+ </para>
1076+
1077+ <para>
1078+ This command adds the <literal>user.postgres</> project and
1079+ raises the shared memory maximum for the <literal>postgres</>
1080+ user to 8GB, and takes effect the next time that user logs
1081+ in, or when you restart <productname>PostgreSQL</> (not reload).
1082+ The above assumes that <productname>PostgreSQL</> is run by
1083+ the <literal>postgres</> user in the <literal>postgres</>
1084+ group. No server reboot is required.
1085+ </para>
1086+
1087+ <para>
1088+ Other recommended kernel setting changes for database servers which will
1089+ have a large number of connections are:
1090+ <programlisting>
1091+ project.max-shm-ids=(priv,32768,deny)
1092+ project.max-sem-ids=(priv,4096,deny)
1093+ project.max-msg-ids=(priv,4096,deny)
1094+ </programlisting>
10511095 </para>
10521096
10531097 <para>
1054- See also <ulink
1055- url="http://sunsite.uakom.sk/sunworldonline/swol-09-1997/swol-09-insidesolaris.html"></>
1056- for information on shared memory under
1057- <productname>Solaris</>.
1098+ Additionally, if you are running <productname>PostgreSQL</>
1099+ inside a zone, you may need to raise the zone resource usage
1100+ limits as well. See "Chapter2: Projects and Tasks" in the
1101+ <citetitle>Solaris 10 System Administrator's Guide</> for more
1102+ information on <literal>projects</> and <command>prctl</>.
10581103 </para>
10591104 </listitem>
10601105 </varlistentry>
0 commit comments