{"id":1373,"date":"2013-08-12T10:12:52","date_gmt":"2013-08-12T08:12:52","guid":{"rendered":"http:\/\/www.oradba.ch\/?p=1373"},"modified":"2013-09-26T14:02:33","modified_gmt":"2013-09-26T12:02:33","slug":"avdf-linux-kernel-could-not-recognize-whole-ram","status":"publish","type":"post","link":"https:\/\/www.oradba.ch\/wordpress\/2013\/08\/avdf-linux-kernel-could-not-recognize-whole-ram\/","title":{"rendered":"AVDF Linux kernel could not recognize whole RAM"},"content":{"rendered":"<p>After initial setup of an Audit Vault and Database Firewall engineering system, I&#8217;ve started to add several audit vault agents and secure targets. In the beginning it went quite smoothly. But after a certain number of secured targets, there were continuously ORA-04031 errors. Most of the errors were related to large pool and PX Msg buffers issues. The analysis of the trace files has shown interesting stuff. \ud83d\ude09 But more on that in a later blog post. The real problem is the available memory. <\/p>\n<h3>Symptoms<\/h3>\n<p>The Audit Vault and Database Firewall engineering system is running on a <em>HP ProLiant BL465c Gen 8<\/em>. It comes with 32GB Memory. Should actually be sufficient for a system engineering. It turned out that the 32GB are not recognized by operating system. As you can see below the system has just 3GB memory in total.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">[root@melete2 ~]# free\n                     total    used   free shared buffers  cached\nMem:               3048108 2385888 662220      0   10720 1525036\n-\/+ buffers\/cache:  850132 2197976\nSwap:              4194296  453564 3740732<\/pre>\n<p>Reviewing <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">dmesg<\/code> shows that we lose 29 GB of memory.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">Initializing cgroup subsys cpuset\nInitializing cgroup subsys cpu\nLinux version 2.6.32-300.39.5.el5uek (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Wed Mar 13 11:26:53 PDT 2013\nCommand line: ro root=\/dev\/vg_root\/lv_root console=tty9 udevtimeout=10\nKERNEL supported cpus:\n  Intel GenuineIntel\n  AMD AuthenticAMD\n  Centaur CentaurHauls\nBIOS-provided physical RAM map:\n BIOS-e820: 0000000000000000 - 000000000009f000 (usable)\n BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)\n BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)\n BIOS-e820: 0000000000100000 - 00000000bddde000 (usable)\n BIOS-e820: 00000000bddde000 - 00000000bde0e000 (ACPI data)\n BIOS-e820: 00000000bde0e000 - 00000000d0000000 (reserved)\n BIOS-e820: 00000000fec00000 - 00000000fee10000 (reserved)\n BIOS-e820: 00000000ff800000 - 0000000100000000 (reserved)\n BIOS-e820: 0000000100000000 - 000000083efff000 (usable)\nDMI 2.7 present.\nlast_pfn = 0x83efff max_arch_pfn = 0x400000000\nMTRR default type: uncachable\nMTRR fixed ranges enabled:\n  00000-9FFFF write-back\n  A0000-BFFFF uncachable\n  C0000-FFFFF write-back\nMTRR variable ranges enabled:\n  0 base 000000000000 mask FFFF80000000 write-back\n  1 base 000080000000 mask FFFFC0000000 write-back\n  2 disabled\n  3 disabled\n  4 disabled\n  5 disabled\n  6 disabled\n  7 disabled\nx86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106\ne820 update range: 00000000c0000000 - 000000083efff000 (usable) ==&gt; (reserved)\nWARNING: BIOS bug: CPU MTRRs don&#039;t cover all of memory, losing 29679MB of RAM.\n------------[ cut here ]------------\n<\/pre>\n<h3>Cause<\/h3>\n<p>According to an Oracle Metalink Note <em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1448147.1\">1448147.1<\/a><\/em> this problem is related to a BIOS issue. <\/p>\n<h3>Solutions and Workaround<\/h3>\n<p>The solution described in Oracle Metalink Note <em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1448147.1\">1448147.1<\/a><\/em> is to upgrade the BIOS or disable MTRR in kernel. Since BIOS upgrade is not an option for this environment I&#8217;ll try to workaround by disable MTRR.<\/p>\n<h4>Disable MTRR<\/h4>\n<p>Changing the <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">grub.conf<\/code> is basically quite easy if you find the boot files. When I first try it, I&#8217;d realized that there is no grub configuration available. It seems that Oracle decided to not mount <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\/boot<\/code> at startup. So it is mandatory to first mount the boot partition. Afterward you just can add <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">disable_mtrr_trim<\/code> as  additional kernel option. <\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\n[root@melete2 ~]# mount \/boot\n\n[root@melete2 ~]# df -kh \/boot\nFilesystem            Size  Used Avail Use% Mounted on\n\/dev\/sda1             145M   26M  112M  19% \/boot\n\n[root@melete2 ~]# vi \/boot\/grub\/grub.conf \n# grub.conf generated by anaconda\n#\n# Note that you do not have to rerun grub after making changes to this file\n# NOTICE:  You have a \/boot partition.  This means that\n#          all kernel and initrd paths are relative to \/boot\/, eg.\n#          root (hd0,0)\n#          kernel \/vmlinuz-version ro root=\/dev\/vg_root\/lv_root\n#          initrd \/initrd-version.img\n#boot=\/dev\/sda\ndefault=0\ntimeout=5\nsplashimage=(hd0,0)\/grub\/splash.xpm.gz\nhiddenmenu\ntitle Audit Vault Server 12.1.1.0.0\n        root (hd0,0)\n        kernel \/vmlinuz-2.6.32-300.39.5.el5uek ro root=\/dev\/vg_root\/lv_root console=tty9 \nudevtimeout=10 disable_mtrr_trim\n        initrd \/initrd-2.6.32-300.39.5.el5uek.img\ntitle Audit Vault Server 12.1.1.0.0\n        root (hd0,0)\n        kernel \/vmlinuz-2.6.32-300.38.1.el5uek ro root=\/dev\/vg_root\/lv_root console=tty9 \nudevtimeout=10 disable_mtrr_trim\n        initrd \/initrd-2.6.32-300.38.1.el5uek.img\n\n[root@melete2 ~]# reboot\n\nBroadcast message from root (pts\/0) (Thu Jul 11 20:17:56 2013):\n\nThe system is going down for reboot NOW!\n[root@melete2 ~]# Connection to melete2 closed by remote host.\nConnection to melete2 closed.\n<\/pre>\n<p>After reboot we now have 32GB memory available.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">[root@melete2 ~]# free\n                      total     used     free shared buffers  cached\nMem:               33024372  3930724 29093648      0   17868 2640744\n-\/+ buffers\/cache:  1272112 31752260\nSwap:              14680056        0 14680056<\/pre>\n<p>Unfortunately, the configuration of the AVDF appliance is not automatically updated to use the extra memory. We have to do some manual changes.<\/p>\n<h4>Update Kernel Parameters<\/h4>\n<p>The kernel setting have to be changed to allow a bigger SGA. See Metalink Note <em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1529433.1\">1529433.1<\/a><\/em> for more detailed information on how calculate and set the kernel parameters. For the engineering system we will define a SGA with 20GB therefor we set the shmmax and shmall as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">[root@melete2 ~]# vi \/etc\/sysctl.conf\n\u2026\nkernel.shmmax=23622320128\nkernel.shmall=5368709120\n...\n[root@melete2 ~]# sysctl -p\n<\/pre>\n<h4>Increase SWAP<\/h4>\n<p>With 32GB memory, it is also advisable to enlarge the swap space. I&#8217;ve discussed this already in the blog post <a href=\"https:\/\/www.oradba.ch\/wordpress\/2012\/05\/resize-swap-space-on-linux\/\">Resize swap space on linux<\/a>. Since the AVDF appliance does use logical volumes it&#8217;s even a bit easier.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">[root@melete2 ~]# swapoff -v \/dev\/vg_root\/lv_swap\n\n[root@melete2 ~]# lvresize \/dev\/vg_root\/lv_swap -L +8G\n\n[root@melete2 ~]# mkswap \/dev\/vg_root\/lv_swap\n\n[root@melete2 ~]# swapon -v \/dev\/vg_root\/lv_swap\n<\/pre>\n<h4>Increase SGA<\/h4>\n<p>Finally we can increase the SGA.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">\n\nSQL&gt; alter system set sga_max_size=20G scope=spfile;\nSystem altered.\n\nSQL&gt; alter system set sga_target=20G scope=spfile;\nSystem altered.\n\nSQL&gt; startup force\n<\/pre>\n<h3>Conclusion<\/h3>\n<p>Although AVDF is an appliance, it is mandatory to examine the system after installation. Eg. are there errors in the log files in <code class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">\/var\/log<\/code>, memory, storage etc. available. The solution described here makes it possible to use all the memory. Nevertheless, the appliance has been adjusted to an extent where is necessary to consider whether the support is still archive. If you run into a similar issue on your production AVDF setup I would recommend opening an Oracle SR. Looking forward to the next AVDF patchset. I hope this system stays patchable.<\/p>\n<h3>References<\/h3>\n<p>Some links related to this post.<\/p>\n<ul>\n<li>Linux kernel could not recognize whole RAM [<em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1448147.1\">1448147.1<\/a><\/em>]<\/li>\n<li>Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device[<em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=301830.1\">301830.1<\/a><\/em>]<\/li>\n<li>Requirements for Installing Oracle Database 12.1 on RHEL5 or OL5 64-bit (x86-64) [<em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1529433.1\">1529433.1<\/a><\/em>]<\/li>\n<li>Requirements for Installing Oracle 11gR2 RDBMS on RHEL (and OEL) 5 on AMD64\/EM64T [<em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=880989.1\">880989.1<\/a><\/em>]<\/li>\n<li>Master Note of Linux OS Requirements for Database Server [<em><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=851598.1\">851598.1<\/a><\/em>]<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>After initial setup of an Audit Vault and Database Firewall engineering system, I&#8217;ve started to add several audit vault agents and secure targets. In the beginning it went quite smoothly. But after a certain number of secured targets, there were continuously ORA-04031 errors. Most of the errors were related to large pool and PX Msg [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"AVDF Linux kernel could not recognize whole RAM http:\/\/wp.me\/p1aErb-m9 #trivadis","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[85,88,73],"tags":[141,96,56,18,90],"class_list":["post-1373","post","type-post","status-publish","format-standard","hentry","category-audit-vault-and-database-firewall","category-avdf","category-linux-2","tag-avdf","tag-ora-04031","tag-oracle-enterprise-linux","tag-trivadiscontent","tag-troubleshooting"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1aErb-m9","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1862,"url":"https:\/\/www.oradba.ch\/wordpress\/2014\/08\/release-of-audit-vault-and-database-firewall-12-1-2-bundle-patch-2\/","url_meta":{"origin":1373,"position":0},"title":"Release of Audit Vault and Database Firewall 12.1.2 Bundle Patch 2","author":"Stefan","date":"4. August 2014","format":false,"excerpt":"End of last week, Oracle has released the second Bundle Patch for Audit Vault and Database Firewall 12.1.2. I've missed the release due to public holiday here in Switzerland. :-) The patch can be downloaded as usual on Oracle Metalink as Patchset 19190265 for existing installations or on Oracle eDelivery\u2026","rel":"","context":"In &quot;Audit Vault&quot;","block_context":{"text":"Audit Vault","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1690,"url":"https:\/\/www.oradba.ch\/wordpress\/2014\/05\/audit-vault-and-database-firewall-12-1-2\/","url_meta":{"origin":1373,"position":1},"title":"Audit Vault and Database Firewall 12.1.2","author":"Stefan","date":"7. May 2014","format":false,"excerpt":"Oracle has just released a new Release of its Oracle Audit Vault and Database Firewall. The new release is immediately available on Oracle's Software Delivery Cloud. It look's like Oracle added a bunch of Enterprise-Grade Features like iSCSI SAN Disk, NFS Storage as well as SYSLOG integration. Starting with this\u2026","rel":"","context":"In &quot;Audit Vault and Database Firewall&quot;","block_context":{"text":"Audit Vault and Database Firewall","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault-and-database-firewall\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1793,"url":"https:\/\/www.oradba.ch\/wordpress\/2014\/07\/release-of-audit-vault-and-database-firewall-12-1-2-bundle-patch-1\/","url_meta":{"origin":1373,"position":2},"title":"Release of Audit Vault and Database Firewall 12.1.2 Bundle Patch 1","author":"Stefan","date":"2. July 2014","format":false,"excerpt":"Earlier today, Oracle has released the first Bundle Patch for Audit Vault and Database Firewall 12.1.2. The patch can be downloaded on Oracle Metalink as Patchset 18728905 for existing installations or on Oracle eDelivery as full installation image for new installations. The installation image is split in two parts which\u2026","rel":"","context":"In &quot;Audit Vault and Database Firewall&quot;","block_context":{"text":"Audit Vault and Database Firewall","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault-and-database-firewall\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1970,"url":"https:\/\/www.oradba.ch\/wordpress\/2015\/05\/release-of-audit-vault-and-database-firewall-12-1-2-bundle-patch-5\/","url_meta":{"origin":1373,"position":3},"title":"Release of Audit Vault and Database Firewall 12.1.2 Bundle Patch 5","author":"Stefan","date":"15. May 2015","format":false,"excerpt":"Today Oracle released the new Bundle Patch for Audit Vault and Database Firewall 12.1.2. The patch can be downloaded as usual on Oracle Metalink as Patchset 20829881 for existing installations. The full installation image for new installations is not yet available on Oracle eDelivery. I guess this will follow in\u2026","rel":"","context":"In &quot;Audit Vault and Database Firewall&quot;","block_context":{"text":"Audit Vault and Database Firewall","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault-and-database-firewall\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2069,"url":"https:\/\/www.oradba.ch\/wordpress\/2015\/12\/audit-vault-and-database-firewall-12-2\/","url_meta":{"origin":1373,"position":4},"title":"Audit Vault and Database Firewall 12.2","author":"Stefan","date":"22. December 2015","format":false,"excerpt":"Oracle has just released a new major Release of its Oracle Audit Vault and Database Firewall. The new release is immediately available on Oracle's Software Delivery Cloud. But the OTN website have not been updated. Beside the upgrade of the OS and embedded Oracle Database to 12.1.0.2, Oracle added a\u2026","rel":"","context":"In &quot;Audit Vault and Database Firewall&quot;","block_context":{"text":"Audit Vault and Database Firewall","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault-and-database-firewall\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2057,"url":"https:\/\/www.oradba.ch\/wordpress\/2015\/11\/release-of-audit-vault-and-database-firewall-12-1-2-bundle-patch-7\/","url_meta":{"origin":1373,"position":5},"title":"Release of Audit Vault and Database Firewall 12.1.2 Bundle Patch 7","author":"Stefan","date":"9. November 2015","format":false,"excerpt":"Today Oracle released the new Bundle Patch for Audit Vault and Database Firewall 12.1.2. The patch can be downloaded as usual on Oracle Metalink as Patchset 21920205 for existing installations. The full installation image for new installations is not yet available on Oracle eDelivery. I guess this will follow in\u2026","rel":"","context":"In &quot;Audit Vault and Database Firewall&quot;","block_context":{"text":"Audit Vault and Database Firewall","link":"https:\/\/www.oradba.ch\/wordpress\/category\/audit\/audit-vault-and-database-firewall\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/1373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/comments?post=1373"}],"version-history":[{"count":3,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/1373\/revisions"}],"predecessor-version":[{"id":1376,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/1373\/revisions\/1376"}],"wp:attachment":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/media?parent=1373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/categories?post=1373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/tags?post=1373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}