Kevin Kempf's Blog

July 29, 2009

Automatic Memory Management (AMM) … now available in (very) select markets

Filed under: 11g, Oracle — Tags: , — kkempf @ 9:50 am

When I look at memory advisors against an 11g database in EM 10.2.0.5, I always see this message saying I’m not using Automatic Memory Management (AMM). I do have Automatic Shared Memory Management (ASMM) enabled, and it works fine as far as I can tell. I was curious about the difference (AMM is a new 11g feature) so I did a little digging. Effectively, AMM is just ASMM + PGA management as well. So set the pga_aggregate_target=0, sga_target=0, and a new parameter called memory_target=24G, or whatever you want the maximum Oracle footprint to be for the given instance.

As an brief aside, there is also a memory_max_target which is akin to sga_max_size; it defines the upper boundary of the instance’s memory allowable. If not specifically defined, this defaults to the memory_target value. Just as with sga_max_size, I don’t get it (enlighten me!). Why would you ever allocate the memory up front with memory_max_target, or sga_max_size, and not use all of it (meaning sga_target is less than sga_max_size or memory_target is less than memory_max_target)? It sounds great; room to grow up to your max if required… but with all of the memory management taking place, I fail to understand why you would reserve memory you’re not using. Regardless, I digress, that’s not what this topic is about.

Fiddling with a non-production system, I changed the init parameters and started the instance:

ORA-00845: MEMORY_TARGET not supported on this system

What? A quick search on Metalink (doc id 749851.1) told me “The use of AMM is absolutely incompatible with HugePages.”

Alright, so in our case (and probably the case of anyone running 11i with a large SGA) we use HugePages. Our Intel x86 chip default “small page” is 4k, and Red Hat 5 makes huge pages 2M by default. We haven’t tried running a “large” SGA with “small pages” as would be required for AMM, because traditionally the CPU overhead to map 4k pages vs. 2mb pages was noticeable (512x as many pages to track, by my math, so for a 16GB SGA and 4k “small pages”, we’re talking about 8,192 huge pages, versus 4,194,304 “small pages”). If I have to choose between huge pages and AMM, it feels like huge pages is a priority.

My only complaint here is that I don’t think we’re doing anything that unusual. Red Hat Linux 5 64-bit OS with 64-bit Oracle, high concurrency, and a large(ish?) SGA of 24GB. Seems like that has to be one of the more common platforms Oracle is installed on these days. Conversely, who can benefit from AMM? Data warehouses? Tiny databases running on Windows?

Advertisements

Blog at WordPress.com.