Running indirect data buffers on windows server 2008


introduction

i’ve been running oracle databases with around 5 gb sga since the days of oracle release 9iR2 and windows server 2003 (enterprise edition) on regular midrange 8 gb machines. although i initially had to pass a long and winding road to come up with a really working configuration, between oracle and windows server 2003, the effort really did pay off in having that extended, past 2 gb ram access in spite of the limitations of the 32 bit addressing range. to scetch the windows 2003 recipe in short, one may follow this approach:

  • add the /3gb and the /PAE to the boot.ini file (and reboot)
  • have the account running the oracle service be a part of the administrators group
  • set several local user rights for the account running the oracle service, for example lock_pages_in_memory
  • do not use the oracle asm-parameters with the spfile, instead apply use_indirect_data_buffers and the pre-asm stuff just as db_block_buffers and buffer_pool_keep
  • optimize the setting of _db_block_lru_latches according to the cpu-count of your machine
  • reexecute oracle.exe, a shutdown/startup-bounce is not sufficient for the change to take effect

although just scetching, i want to emphasize the role of the /3gb-switch mentioned above. using a past 2 gb ram access on 32 bit windows must be a rope trick of some sort in overcoming the limitations of the addressing range. the trick is, here, to define a mapping window between the regular and the extended ram address space. that mapping window can also actually be seen by the applications. some secondary process however, maps memory pages into that window, either from the extended address space, which is a fast ram access, or just from disc, the traditional way. that is, the larger the mapping window within the regular address space is, the higher the hit ratio will grow (see the AWE_WINDOW_MEMORY-parameter to be set in the registry for more information). such a way, it always really pays off to employ /3gb alongside with /PAE.

the windows 2008 recipe

to anticipate the result of the 2008 trial, nothing conceptually changes compared to the 2003 recipe. the exception is the application of bcdedit, with is the new boot configuration command, replacing the need to directly hack the boot.ini file (it is just ignored if done) and the naming and default values of /3gb and /PAE. but let’s follow the trial.

bcdedit

i do not want to discuss bcdedit in detail. concerning the two intended settings one may execute the following command and lookup the osloader section:

 bcdedit /? TYPES osloader 

it is shown, that /3gb does not exist anymore and has been integrated into by increaseuserva. in contrast, /PAE continues to exist, as pae, but however, it is enabled by default. one may verify the current boot loader settings by just entering (an appropriate screenshot follows below):

 bcdedit 

extending the process address space step #1

at first, on a default installation with 2 gb process address space and 8 gb physical ram the memory layout may look as follows:

2 gb address space memory layout

2 gb address space memory layout

running:

 bcdedit /set increaseuserva 3072 

extends the process address space to 3 gb:

current boot loader settings

current boot loader settings

such that now one may configure an oracle instance to run with around 2.5 gb sga size:

setting an oracle instance to run at 2.5 gb sga size

setting an oracle instance to run at 2.5 gb sga size

after having the instance under steam for a moment, all the configured sga gets allocated from virtual to transient memory (remenber the memory allocation concept for nowadays, widely-used operating systems) :

all transient memory being allocated by the instance

all transient memory being allocated by the instance

of course, starting up the instance with anything beyond 3 gb sga size will still fail:

insufficient os memory settings for the configured sga size

insufficient os memory settings for the configured sga size

extending the process address space step #2

to go beyond 3 gb process address space, one must now change the spfile-layout as being specified in the 2003 recipe, most importantly, employing the use_indirect_data_buffers-option. on the windows side, the account running the oracle service must be granted lock_pages_in_memory, which is a local user right:

local user rights setting for use_indirect_data_buffers on the os-side

local user rights setting for use_indirect_data_buffers on the os-side

such a way, running an instance with around 4.5 gb sga size succeeds:

running an instance with around 4.5 gb sga size

running an instance with around 4.5 gb sga size

finally, the steam test shows the memory allocation graphically. however, this time, having the rope trick in the back, all memory gets mapped into the transient space at once:

memory layout with a running 4.5. gb sga instance

memory layout with a running 4.5. gb sga instance

a short hand calculation merely fits the numbers being shown by oracle and the task manager: 4 gb sga buffers (includes 1 gb awe) + 0.5 gb sga pools + 0.5 gb pga + 1 gb windows system + 0.5 gb other stuff ~ 1.5 gb free.

conclusions

some names and methods changed, but conceptually the 2003 recipe may easily be ported to 2008. employing use_indirect_data_buffers was very relyable in 2003, so one may expect the same experience with 2008.

have fun

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s