{"id":361,"date":"2015-04-21T09:16:12","date_gmt":"2015-04-21T09:16:12","guid":{"rendered":"http:\/\/www.dbafox.com\/?p=361"},"modified":"2018-01-08T09:31:54","modified_gmt":"2018-01-08T09:31:54","slug":"free-m","status":"publish","type":"post","link":"https:\/\/dbafox.com\/?p=361","title":{"rendered":"free -m"},"content":{"rendered":"<p><a href=\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-363 alignleft\" src=\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png\" alt=\"free-memory-linux\" width=\"495\" height=\"277\" srcset=\"https:\/\/dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png 300w, https:\/\/dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux.png 960w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/a><em><strong>Real Memory Consumption = Total &#8211; (free + buffers + cached)<br \/>\n<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<pre class=\"\"># free -m\r\n\r\n\r\n             total       used       free     shared    buffers     cached\r\nMem:         15943      15678        265          6        511       3706\r\n-\/+ buffers\/cache:      11460       4483\r\nSwap:         8159          0       8159\r\n\r\n\r\n# cat \/proc\/meminfo|grep -i huge\r\n\r\nAnonHugePages:         0 kB\r\nHugePages_Total:    4916\r\nHugePages_Free:     3413\r\nHugePages_Rsvd:       35\r\nHugePages_Surp:        0\r\nHugepagesize:       2048 kB\r\n\r\n\r\nThe total memory reserved for huge pages is approximately 10 G ((4916 * 2048) \/1024\/1024)\r\nThis is approximately equal to 'used' on the second line of the 'free -m' command 11460\/1024 = 11G\r\n\r\nOn an Oracle database server, the Huge Pages should be about 70-80% of the physical RAM  - varies with size, not a hard rule.\r\n\r\nOn an Oracle database server, the ulimits for the oracle user should be set accordingly - this means that the Oracle user\r\nhard and soft limits for memory should be set high enough\r\n\r\nFollowing files are modified to enable Huge Pages and disable transparent huge pages\r\n\r\n\/etc\/grub.conf\t\r\nkernel \u2026\u2026 transparent_hugepage=never\r\n--&gt; reboot\r\n\r\nExample:\r\n8G RAM --&gt; set 70% for Huge Pages = 5.6G --&gt; set vm.nr_hugepages=2688 in \/etc\/sysctl.conf --&gt; 5.55G HugePages\r\n\r\n--&gt; 2 databases with SGA_TARGET set to 2.6G or 1 database with SGA_TARGET set to 5.5G\r\n\r\nMEMORY_TARGET set to 0 (AMM should be disabled when Huge Pages are configured)\r\n\r\n\/etc\/sysctl.conf\t\r\nvm.nr_hugepages=2688\r\n(a number representing the number of pages \u2013 no unit)\r\nMultiply by 2048 (K) and divide by 1024*1024 to get the number of GB of memory --&gt; 5.55 G in this case\r\n\r\nvm.hugetlb_shm_group=3000\r\n\r\n\/etc\/security\/limits.conf\t\r\ne.g set 7G = 7*1024*1024 = 7340032          --&gt; for a server with 8G of memory\r\n\r\nAnother example for memlock ulimits:\r\nSet the value (in KB) slightly smaller than installed RAM. e.g. If you have 64GB RAM installed, you may set \r\nsoft memlock 60397977\r\nhard memlock 60397977\r\n(works out to 57G)\r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Real Memory Consumption = Total &#8211; (free + buffers + cached) &nbsp; # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -\/+ buffers\/cache: 11460 4483 Swap: 8159 0 8159 # cat \/proc\/meminfo|grep -i &hellip; <a href=\"https:\/\/dbafox.com\/?p=361\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","_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":""},"categories":[19,24,28,29,1],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","hentry","category-linux","category-ms-sql-server","category-oracle-technical","category-powershell","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>free -m - dbafox<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbafox.com\/?p=361\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"free -m - dbafox\" \/>\n<meta property=\"og:description\" content=\"Real Memory Consumption = Total &#8211; (free + buffers + cached) &nbsp; # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -\/+ buffers\/cache: 11460 4483 Swap: 8159 0 8159 # cat \/proc\/meminfo|grep -i &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbafox.com\/?p=361\" \/>\n<meta property=\"og:site_name\" content=\"dbafox\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-21T09:16:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-08T09:31:54+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png\" \/>\n<meta name=\"author\" content=\"Ray Fox\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ray Fox\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbafox.com\/?p=361\",\"url\":\"https:\/\/dbafox.com\/?p=361\",\"name\":\"free -m - dbafox\",\"isPartOf\":{\"@id\":\"https:\/\/dbafox.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbafox.com\/?p=361#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbafox.com\/?p=361#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png\",\"datePublished\":\"2015-04-21T09:16:12+00:00\",\"dateModified\":\"2018-01-08T09:31:54+00:00\",\"author\":{\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\"},\"breadcrumb\":{\"@id\":\"https:\/\/dbafox.com\/?p=361#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbafox.com\/?p=361\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/dbafox.com\/?p=361#primaryimage\",\"url\":\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png\",\"contentUrl\":\"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbafox.com\/?p=361#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbafox.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"free -m\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbafox.com\/#website\",\"url\":\"https:\/\/dbafox.com\/\",\"name\":\"dbafox\",\"description\":\"DBA Technical Information\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbafox.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\",\"name\":\"Ray Fox\",\"sameAs\":[\"http:\/\/www.dbafox.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"free -m - dbafox","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbafox.com\/?p=361","og_locale":"en_GB","og_type":"article","og_title":"free -m - dbafox","og_description":"Real Memory Consumption = Total &#8211; (free + buffers + cached) &nbsp; # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -\/+ buffers\/cache: 11460 4483 Swap: 8159 0 8159 # cat \/proc\/meminfo|grep -i &hellip; Continue reading &rarr;","og_url":"https:\/\/dbafox.com\/?p=361","og_site_name":"dbafox","article_published_time":"2015-04-21T09:16:12+00:00","article_modified_time":"2018-01-08T09:31:54+00:00","og_image":[{"url":"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png","type":"","width":"","height":""}],"author":"Ray Fox","twitter_misc":{"Written by":"Ray Fox","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dbafox.com\/?p=361","url":"https:\/\/dbafox.com\/?p=361","name":"free -m - dbafox","isPartOf":{"@id":"https:\/\/dbafox.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbafox.com\/?p=361#primaryimage"},"image":{"@id":"https:\/\/dbafox.com\/?p=361#primaryimage"},"thumbnailUrl":"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png","datePublished":"2015-04-21T09:16:12+00:00","dateModified":"2018-01-08T09:31:54+00:00","author":{"@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb"},"breadcrumb":{"@id":"https:\/\/dbafox.com\/?p=361#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbafox.com\/?p=361"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/dbafox.com\/?p=361#primaryimage","url":"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png","contentUrl":"http:\/\/www.dbafox.com\/wp-content\/uploads\/2015\/04\/free-memory-linux-300x168.png"},{"@type":"BreadcrumbList","@id":"https:\/\/dbafox.com\/?p=361#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbafox.com\/"},{"@type":"ListItem","position":2,"name":"free -m"}]},{"@type":"WebSite","@id":"https:\/\/dbafox.com\/#website","url":"https:\/\/dbafox.com\/","name":"dbafox","description":"DBA Technical Information","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbafox.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb","name":"Ray Fox","sameAs":["http:\/\/www.dbafox.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3ecMb-5P","_links":{"self":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=361"}],"version-history":[{"count":10,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/361\/revisions"}],"predecessor-version":[{"id":1050,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/361\/revisions\/1050"}],"wp:attachment":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}