{"id":1574,"date":"2024-05-30T19:50:09","date_gmt":"2024-05-30T14:20:09","guid":{"rendered":"https:\/\/adilfahim.com\/myblog\/?p=1574"},"modified":"2024-05-30T19:50:09","modified_gmt":"2024-05-30T14:20:09","slug":"os-memory-and-kernel","status":"publish","type":"post","link":"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/","title":{"rendered":"OS Memory and Kernel Parameters for SAP DB &#038; Application Installation"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69eb3965e6079\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69eb3965e6079\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#Optimizing_OS_Memory_and_Kernel_for_SAP_DB_and_Application_Installation\" >Optimizing OS Memory and Kernel for SAP DB and Application Installation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#Understanding_the_SAP_Kernel\" >Understanding the SAP Kernel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#Upgrading_the_SAP_Kernel\" >Upgrading the SAP Kernel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#Understanding_OS_Memory_and_Kernel_Parameters_for_SAP\" >Understanding OS Memory and Kernel Parameters for SAP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#How_to_reload_sysctlconf_variables_in_Linux\" >How to reload sysctl.conf variables in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/adilfahim.com\/myblog\/os-memory-and-kernel\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Optimizing_OS_Memory_and_Kernel_for_SAP_DB_and_Application_Installation\"><\/span>Optimizing OS Memory and Kernel for SAP DB and Application Installation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In the world of SAP applications, the performance of your system is heavily dependent on how well your OS Memory and Kernel are configured. This blog post will delve into the intricacies of OS Memory and Kernel parameters for SAP DB and Application Installation.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Understanding_the_SAP_Kernel\"><\/span>Understanding the SAP Kernel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The SAP Kernel can be defined as a set of executable that run the SAP system. It&#8217;s crucial to ensure that the desired SAP Kernel version is compatible with the existing OS Kernel version and SAP product versions. This compatibility can be checked with the help of the Product Availability Matrix (PAM)\u00b9.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Upgrading_the_SAP_Kernel\"><\/span>Upgrading the SAP Kernel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The procedure to upgrade the kernel is as follows\u00b9:<\/p>\n<p>1. Decide the Target Kernel Version: After checking the compatibility, decide the target kernel version.<br \/>\n2. Download the Files: Download the DB independent, DB dependent files.<br \/>\n3. Create a Directory: Create a directory in the server.<br \/>\n4. Copy the Files: Copy the DB dependent and DB independent files into the newly created directory.<br \/>\n5. Extract the Files: Extract the files using SAPCAR executable.<br \/>\n6. Assign Authorization and Permissions: Once the files are extracted, assign the suitable authorization and permissions for the executable.<br \/>\n7. Stop the Application Services: Now stop the application services and make sure that there are no processes running.<br \/>\n8. Take a Backup: Take a consistent backup from the global directory.<br \/>\n9. Copy the New Kernel: Copy the newly extracted kernel to the global directory from the extracted path.<br \/>\n10. Check the Kernel Version: Once the kernel is copied, check the kernel version using the executable \u201cdisp+work\u201d.<br \/>\n11. Run the Command: Run the command .\/saproot.sh <SID> with root user from the global directory.<br \/>\n12. Start the SAP Instance: Once the checks are done we can start the SAP instance.<br \/>\n13. Validate the Kernel Version: Once the instance is up and running, validate the kernel version from the application layer as well.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Understanding_OS_Memory_and_Kernel_Parameters_for_SAP\"><\/span>Understanding OS Memory and Kernel Parameters for SAP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The OS memory and kernel parameters play a vital role in the performance of the SAP application. SAP provides specific notes for recommended OS settings for different Linux distributions\u00b3. These notes provide detailed information about the recommended settings for parameters like shared memory, semaphore parameters, file system parameters, network parameters, and others\u00b3.<\/p>\n<p><strong>Important OS Memory Parameters for running SAP Application or SAP DB. If you have multiple SAP instances running on same VM then these parameters are crucial to maintain and values can be calculated as per best standard.<\/strong><\/p>\n<figure id=\"attachment_1575\" aria-describedby=\"caption-attachment-1575\" style=\"width: 936px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/kernel_shmm.png\" alt=\"OS Memory and Kernel\" width=\"936\" height=\"497\" class=\"size-full wp-image-1575\" srcset=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/kernel_shmm.png 936w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/kernel_shmm-300x159.png 300w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/kernel_shmm-768x408.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><figcaption id=\"caption-attachment-1575\" class=\"wp-caption-text\">OS Memory and Kernel Parameters<\/figcaption><\/figure>\n<p><strong>32-bit Linux operating systems<\/strong><br \/>\nSHMMAX is limited to 4 294 967 295 bytes.<\/p>\n<p>Validation of OS parameters &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/ipcs-1.png\" alt=\"OS Memory and Kernel\" width=\"783\" height=\"484\" class=\"alignnone size-full wp-image-1577\" srcset=\"https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/ipcs-1.png 783w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/ipcs-1-300x185.png 300w, https:\/\/adilfahim.com\/myblog\/wp-content\/uploads\/2024\/05\/ipcs-1-768x475.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<p>SHMMAX limit is the maximum size of a shared memory segment on a Linux system.<br \/>\nSHMALL limit is the maximum allocation of shared memory pages on a system.<\/p>\n<p>Recommended value to set the SHMMAX = amount of physical memory on your system. the minimum SHMMAX Value:<\/p>\n<p>x86 systems (32bit) is 268435456 (256 MB)<br \/>\nfor 64-bit systems, it is 1073741824 (1 GB).<\/p>\n<p>Reference <a href=\"https:\/\/help.sap.com\/docs\/SAP_HANA_PLATFORM\/2c1988d620e04368aa4103bf26f17727\/82e4575eec664846a9918e9ed1d90d41.html\" target=\"_blank\" rel=\"noopener\">Link<\/a> for SAP HANA Memory Configuration <\/p>\n<p>Semaphores available to the operating system<br \/>\nSEMMSL: SEMMSL*SEMMNI<br \/>\nSEMMNS<br \/>\nSEMOPM<\/p>\n<p>SEMMNI: must be twice the maximum number of agents expected on the system multiplied by the number of logical partitions on the database server computer plus the number of local application connections on the database server computer<\/p>\n<p>SEMMNS: Messages parameter on the OS level:<br \/>\nMSGMNI:  parameter affects the number of agents that can be started.<br \/>\nMSGMAX : parameter affects the size of the message that can be sent in a queue 64 KB (that is, 65536 bytes),<br \/>\nMSGMNB: parameter affects the size of the queue 65536<\/p>\n<p>Reference <a href=\"https:\/\/adilfahim.com\/myblog\/managing-hana-and-linux-cluster\/\" target=\"_blank\" rel=\"noopener\">Link<\/a> for SUSE HA and Disaster Commands<\/p>\n<p>Linux standard values example from a ECC &#038; Oracle running on SUSE and Oracle on Oracle Linux.<br \/>\nThese values need to be maintained in sysctl.conf file and cane be reloaded without restarting the VM.<\/p>\n<p>node1:root 01> cat \/etc\/sysctl.conf<br \/>\n# Kernel sysctl configuration file for Red Hat Linux<br \/>\n#<br \/>\n# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and<br \/>\n# sysctl.conf(5) for more details.<\/p>\n<p># Controls IP packet forwarding<br \/>\nnet.ipv4.ip_forward = 0<\/p>\n<p># Controls source route verification<br \/>\nnet.ipv4.conf.default.rp_filter = 1<\/p>\n<p># Do not accept source routing<br \/>\nnet.ipv4.conf.default.accept_source_route = 0<\/p>\n<p># Controls the System Request debugging functionality of the kernel<br \/>\nkernel.sysrq = 0<\/p>\n<p># Controls whether core dumps will append the PID to the core filename.<br \/>\n# Useful for debugging multi-threaded applications.<br \/>\nkernel.core_uses_pid = 1<\/p>\n<p># Controls the use of TCP syncookies<br \/>\nnet.ipv4.tcp_syncookies = 1<\/p>\n<p># Disable netfilter on bridges.<br \/>\nnet.bridge.bridge-nf-call-ip6tables = 0<br \/>\nnet.bridge.bridge-nf-call-iptables = 0<br \/>\nnet.bridge.bridge-nf-call-arptables = 0<\/p>\n<p># Controls the default maxmimum size of a mesage queue<br \/>\nkernel.msgmnb = 65536<br \/>\nkernel.msgmni = 1024<br \/>\n# Controls the maximum size of a message, in bytes<br \/>\nkernel.msgmax = 65536<\/p>\n<p># Controls the maximum shared segment size, in bytes<br \/>\nkernel.shmmax = 68719476736<\/p>\n<p># Controls the maximum number of shared memory segments, in pages<br \/>\nkernel.shmall = 41943040<br \/>\nfs.file-max = 6815744<br \/>\nkernel.sem = 1250 1024000 100 1024<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_reload_sysctlconf_variables_in_Linux\"><\/span>How to reload sysctl.conf variables in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Type the following command to reload settings from config files without rebooting the box via root user:<\/p>\n<p><strong>sysctl &#8211;system<\/strong><\/p>\n<p>The settings are read from all of the following system configuration files:<\/p>\n<p>\/run\/sysctl.d\/*.conf<br \/>\n\/etc\/sysctl.d\/*.conf<br \/>\n\/usr\/local\/lib\/sysctl.d\/*.conf<br \/>\n\/usr\/lib\/sysctl.d\/*.conf<br \/>\n\/lib\/sysctl.d\/*.conf<br \/>\n\/etc\/sysctl.conf<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Optimizing the OS Memory and Kernel for SAP DB and Application Installation is a critical task that requires a deep understanding of both the SAP system and the underlying operating system. By following the guidelines and procedures outlined in this post, you can ensure that your SAP system runs smoothly and efficiently.<\/p>\n<p>Remember, the key to a high-performing SAP system lies in the details of its configuration. So, take the time to understand these parameters and how they impact your system. Happy optimizing!<\/p>\n<p><strong>Recommended SAP Notes for OS Memory and Kernel Parameters<\/strong><\/p>\n<p>SAP Note &#8211; 2684254 &#8211; SAP HANA DB: Recommended OS settings for SLES 15 \/ SLES for SAP Application 15<\/p>\n<p>SAP Note &#8211; 2663418 &#8211; Semaphore error -e=28 semget &#8220;No space left on device&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Optimizing OS Memory and Kernel for SAP DB and Application Installation In the world of SAP applications, the performance of your system is heavily dependent on how well your OS Memory and Kernel are configured. This blog post will delve into the intricacies of OS Memory and Kernel parameters for SAP DB and Application Installation. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8],"tags":[1095,1093,1094,1092,1091,1090],"class_list":["post-1574","post","type-post","status-publish","format-standard","hentry","category-sap-updates","tag-kernel-sem","tag-sap-hana-memory-tuning","tag-sap-note-2663418","tag-shmall-small","tag-sysctl-system","tag-sysctl-conf"],"_links":{"self":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/comments?post=1574"}],"version-history":[{"count":3,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1574\/revisions"}],"predecessor-version":[{"id":1580,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/posts\/1574\/revisions\/1580"}],"wp:attachment":[{"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/media?parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/categories?post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adilfahim.com\/myblog\/wp-json\/wp\/v2\/tags?post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}