http://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&feed=atom&action=historyLinux configuration settings for Sybase ASE - Revision history2024-03-29T10:18:34ZRevision history for this page on the wikiMediaWiki 1.24.2http://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&diff=1987&oldid=prevPsap: /* For connections to ASE */2015-12-02T19:07:50Z<p><span dir="auto"><span class="autocomment">For connections to ASE</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 19:07, 2 December 2015</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 143:</td>
<td colspan="2" class="diff-lineno">Line 143:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Prevent a firewall from dropping idle connections=</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Prevent a firewall from dropping idle connections=</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==For connections to ASE==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==For connections to ASE==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>When your Sybase server is behind a firewall there is always the risk that a connection from the client side (e.g. running isql) to ASE will be dropped when the firewall sees it as an idle session. This is regardless <del class="diffchange diffchange-inline">weather </del>the session is really idle or that it is just a very long running query. To prevent it, put this in /etc/sysctl.conf</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>When your Sybase server is behind a firewall there is always the risk that a connection from the client side (e.g. running isql) to ASE will be dropped when the firewall sees it as an idle session. This is regardless <ins class="diffchange diffchange-inline">whether </ins>the session is really idle or that it is just a very long running query. To prevent it, put this in /etc/sysctl.conf</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  net.ipv4.tcp_keepalive_time = 300</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  net.ipv4.tcp_keepalive_time = 300</div></td></tr>
<!-- diff cache key website-mw_:diff:version:1.11a:oldid:1986:newid:1987 -->
</table>Psaphttp://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&diff=1986&oldid=prevPsap at 16:12, 2 December 20152015-12-02T16:12:13Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 16:12, 2 December 2015</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 140:</td>
<td colspan="2" class="diff-lineno">Line 140:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>After changing kernel.randomize_va_space do a reboot of the Linux server, as that seems to be necessary.  </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>After changing kernel.randomize_va_space do a reboot of the Linux server, as that seems to be necessary.  </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Prevent a firewall from dropping idle connections=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==For connections to ASE==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">When your Sybase server is behind a firewall there is always the risk that a connection from the client side (e.g. running isql) to ASE will be dropped when the firewall sees it as an idle session. This is regardless weather the session is really idle or that it is just a very long running query. To prevent it, put this in /etc/sysctl.conf</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> net.ipv4.tcp_keepalive_time = 300</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">and activate it</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> sysctl -p</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==For ssh sessions==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">===Putty===</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Enable TCP keepalive. On the start screen of Putty click "Connection" and activate the check-box "Enable TCP keepalives".</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">===ssh===</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Create a config file in your ssh directory (~/.ssh/config) with the following content</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> Host *</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> ServerAliveInterval 60</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> ServerAliveCountMax 1000</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> TCPKeepAlive=yes</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Whenever you use ssh tell it to use the config file</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> ssh -F ~/.ssh/config <server></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Soft / Hard limits for memory allocation (Suse only)=</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Soft / Hard limits for memory allocation (Suse only)=</div></td></tr>
<!-- diff cache key website-mw_:diff:version:1.11a:oldid:1978:newid:1986 -->
</table>Psaphttp://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&diff=1978&oldid=prevPsap at 12:09, 9 October 20152015-10-09T12:09:11Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 12:09, 9 October 2015</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 41:</td>
<td colspan="2" class="diff-lineno">Line 41:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* As per Sybase recommendation (CR 627114) “lock shared memory” must be switched off.  </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* As per Sybase recommendation (CR 627114) “lock shared memory” must be switched off.  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* When ASE uses huge pages, it will allocate memory to the nearest multiple of 256Mb so don’t configure the ASE exactly to the maximum number of huge pages, but leave a small amount unused (e.g. 300 Mb). In case a small increase in size is needed due to the change of a Sybase config you will not get into trouble.  </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* When ASE uses huge pages, it will allocate memory to the nearest multiple of 256Mb so don’t configure the ASE exactly to the maximum number of huge pages, but leave a small amount unused (e.g. 300 Mb). In case a small increase in size is needed due to the change of a Sybase config you will not get into trouble.  </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Number of file descriptors=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">You may need to increase the number of file descriptors per process if you get this error:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> The number of file descriptors per ASE process required to support the current configuration exceeds the limit 4096 by 3955.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Make the following changes to /etc/security/limits.conf</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> sybase soft nofile 16384 </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> sybase hard nofile 16384 </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">In this example, "sybase" is assumed to be the unix user running ASE.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Log off and log on again to pick up the new settings.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=DISK I/O=</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=DISK I/O=</div></td></tr>
<!-- diff cache key website-mw_:diff:version:1.11a:oldid:1958:newid:1978 -->
</table>Psaphttp://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&diff=1958&oldid=prevPsap at 07:47, 12 March 20132013-03-12T07:47:09Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 07:47, 12 March 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 135:</td>
<td colspan="2" class="diff-lineno">Line 135:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  Attempt to attach shared memory (id 32768) at address (nil), with flags 0 failed</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  Attempt to attach shared memory (id 32768) at address (nil), with flags 0 failed</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[category:ASE]]</ins></div></td></tr>
<!-- diff cache key website-mw_:diff:version:1.11a:oldid:1956:newid:1958 -->
</table>Psaphttp://petersap.nl/SybaseWiki/index.php?title=Linux_configuration_settings_for_Sybase_ASE&diff=1956&oldid=prevPsap: Created page with 'To run Sybase ASE successfully on a Linux environment you need to configure a number of items. Below you will find a few of these, but please note that this is by far not an full…'2013-03-11T12:52:18Z<p>Created page with 'To run Sybase ASE successfully on a Linux environment you need to configure a number of items. Below you will find a few of these, but please note that this is by far not an full…'</p>
<p><b>New page</b></p><div>To run Sybase ASE successfully on a Linux environment you need to configure a number of items. Below you will find a few of these, but please note that this is by far not an full overview. There could be more improvements to be made.<br />
<br />
=Memory – Huge Pages=<br />
The configuration of Huge Pages is needed to get an efficient translation from virtual memory pages to physical pages. When you configure for Huge Pages, the amount of memory assigned to Huge Pages is allocated and reserved for shared memory. Do not over configure to prevent swapping.<br />
<br />
When ASE reports the below message in the errorlog, you need to configure for huge pages:<br />
<br />
Could not allocate memory using Huge Pages. Allocated using regular pages. For better performance, reboot the server after configuring enough Huge Pages.<br />
<br />
To get the values for huge pages first determine the maximum amount of memory you want to give to ASE. For instance, on a Linux server with 512Gb physical memory you can give 90% to ASE. <br />
512 Gb x 90% = 460 Gb = 471040 Mb.<br />
<br />
Then determine the size of a single huge page:<br />
<br />
cat /proc/meminfo | grep Hugepagesize <br />
<br />
Sample output:<br />
<br />
Hugepagesize: 2048 kB<br />
<br />
In this case 1 huge page is 2 Mb, so the number of huge pages we need will be 471040 Mb / 2 Mb = 235520 <br />
<br />
Then set the correct value in /etc/sysctl.conf:<br />
<br />
vm.nr_hugepages = <value> <br />
<br />
Next step is to calculate the number of huge pages in Kb and give the “sybase” user permission to grab the memory. Take the number of huge pages as calculated above. Then multiply by 2048. That wil give you the number of pages in Kb. Example: 235520 x 2048 = 482344960. Then have it stored in /etc/security/limits.conf like this <br />
<br />
sybase soft memlock 482344960 <br />
sybase hard memlock 482344960 <br />
<br />
In this example, "sybase" is assumed to be the unix user running ASE.<br />
<br />
Now reboot the Linux server to check if everything works as expected.<br />
<br />
To see the configured number of huge pages at runtime:<br />
<br />
cat /proc/sys/vm/nr_hugepages <br />
<br />
Notes: <br />
* As per Sybase recommendation (CR 627114) “lock shared memory” must be switched off. <br />
* When ASE uses huge pages, it will allocate memory to the nearest multiple of 256Mb so don’t configure the ASE exactly to the maximum number of huge pages, but leave a small amount unused (e.g. 300 Mb). In case a small increase in size is needed due to the change of a Sybase config you will not get into trouble. <br />
<br />
=DISK I/O=<br />
==fs.aio-max-nr ==<br />
fs.aio-max-nr is the maximum number of asynchronous I/Os.<br />
<br />
The recommended minimum value for fs.aio-max-nr is 1048576, but on a busy ASE with many engines you may need to have a higher number configured. <br />
<br />
In ASE, set these values as a starting point.<br />
<br />
* Set “disk i/o structures” to 1048576.<br />
* Set “max async i/os per engine” to 8192.<br />
* Keep "max async i/os per server" at it’s default value (2147483647).<br />
<br />
When you have multiple engines configured within ASE then use this formula to calculate the value for fs.aio-max-nr<br />
<br />
(disk i/o structures + max async i/os per engine) * max online engines<br />
<br />
For example: (1048576 + 8192) * 32 engines = 33816576 <br />
<br />
Then set the value in /etc/sysctl.conf:<br />
<br />
fs.aio-max-nr = 33816576 <br />
<br />
To get the value at runtime<br />
<br />
cat /proc/sys/fs/aio-max-nr <br />
<br />
===Troubleshooting fs.aio-max-nr===<br />
When the below messages appear in the ASE errorlog, the configuration of fs.aio-max-nr is not correct:<br />
<br />
kernel asynchronous I/O not initialized. The io_setup() system call returned -22.<br />
or <br />
kernel kistartup: asynchronous I/O not available: No such file or directory<br />
<br />
Either recalculate the vale or reduce the Sybase related configuration options (“disk i/o structures” and/or “max async i/os per engine”) <br />
<br />
===Troubleshooting dstartio===<br />
When this message appears in the errorlog<br />
<br />
kernel dstartio: I/O request repeatedly delayed; block number: <nr>, vdn: <nr><br />
then you need to increase "disk i/o structures" or "max async i/os per engine".<br />
<br />
To determine if "disk i/o structures" or "max async i/os per engine" needs to be increased look at the output of sp_sysmon that was captured during the time that the message appeared. Snapshot of output: <br />
<br />
I/Os Delayed by <br />
Disk I/O Structures n/a n/a 0 n/a <br />
Server Config Limit n/a n/a 0 n/a <br />
Engine Config Limit n/a n/a 24582 n/a <br />
Operating System Limit n/a n/a 0 n/a <br />
<br />
When a non-zero value is reported, increase the corresponding Sybase parameter.<br />
Alternatively, you can run sp_monitorconfig “all” to see if the maximum number of “disk i/o structures” has reached (see column Max_Used).<br />
<br />
Be aware that the Linux setting for fs.aio-max-nr may need to be increased as well after changing the Sybase configuration settings. <br />
<br />
==Queue depth==<br />
Per Linux volume used by ASE the queue depth must be configured. The default value is 128 but it must be set to 1024.<br />
<br />
You can only set the required value at boottime and, depending on the Linux distribution, you need to do it in /etc/init.d/boot.local (Suse) or /etc/init.d/rc.local (Ubuntu) or /etc/rc.d/rc.local (RedHat)<br />
<br />
For example:<br />
<br />
echo 1024 >/sys/block/sdb/queue/nr_requests <br />
<br />
To retrieve the runtime value:<br />
<br />
cat /sys/block/sd*/queue/nr_requests <br />
<br />
=kernel.randomize_va_space=<br />
This may be Suse and ASE 15.0.3 specific, but it may apply to other Linux / ASE version combinations as well.<br />
<br />
Due to a high I/O load you may see stacktraces referring to the cm_writedes module, see below snippet.<br />
<br />
00:00000:00006:2012/11/11 01:18:41.45 kernel pc: 0x00007ffff73a56a0 (null)+0x7ffff73a56a0()<br />
00:00000:00006:2012/11/11 01:18:41.45 kernel pc: 0x00000000018fd036 cm_writedes+0x606()<br />
<br />
In the later versions of ASE 15.7 this should be fixed and an error message is printed.<br />
To prevent the issue, set the value for kernel.randomize_va_space to 0 in combination with a higher value of “cpu grace time” in ASE, like 1500. <br />
To see the runtime value<br />
cat /proc/sys/kernel/randomize_va_space <br />
To see the boottime value, check /etc/sysctl.conf there must be line like kernel.randomize_va_space = 0 <br />
<br />
See also http://www.novell.com/support/kb/doc.php?id=7004855<br />
<br />
After changing kernel.randomize_va_space do a reboot of the Linux server, as that seems to be necessary. <br />
<br />
=Soft / Hard limits for memory allocation (Suse only)=<br />
By default, no more than 80 % of available memory (RAM and swap) can be claimed by a single process. This is the soft-virtual limit. To check the setting: cat /etc/sysconfig/ulimit and look for the value specified as SOFTVIRTUALLIMIT. Default is “80”. <br />
<br />
Increase the setting as setting as needed, or set to “0” for unlimited.<br />
<br />
Associated Sybase error message: <br />
<br />
Attempt to attach shared memory (id 32768) at address (nil), with flags 0 failed</div>Psap