Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Rajneesh.

Asked: March 18, 2020 - 5:10 am UTC

Last updated: May 23, 2023 - 4:54 am UTC

Version: 19 c

Viewed 1000+ times

You Asked

What do we mean by instance caging in context of oracle database? How it works? Kindly elaborate with examples?

and Connor said...

Lets say you have two databases on your server.

Once is called: MY_MOST_IMPORTANT_COMMERCIAL_APPS
The other is called: SOCIAL_ACTIVITIES_APPS

You can get a hint from the name which one is the one that is critical for your business.

But by default, *any* database gets to consume as much CPU resource on the server as it asks for.

So when someone on the social apps database runs a rogue query...then boom...your critical database now is running slowly because the server is max'd out.

Instance caging lets you control how much resource an instance gets.

In the above case, if your server has (say) 8 cpus, you might set the CPU_COUNT parameter on the SOCIAL_ACTIVITIES_APPS database to 2. That means, that no matter how much work is thrown at the SOCIAL_ACTIVITIES_APPS database, it will not consume more than 2 cpus on the server. The other 6 will always be available for the MY_MOST_IMPORTANT_COMMERCIAL_APPS database.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Cpu_count too big

Fernando, May 22, 2023 - 11:39 am UTC

Is there a way to tell if the cpu_count is too big for a running database?

And where to check that too in cloud control?

Thanks
Connor McDonald
May 23, 2023 - 4:54 am UTC

If you check the "average active sessions" metric in your AWR reports, or your V$SYSMETRIC views, then if you are getting sustained peaks above the physical core count for your machine, then perhaps you might want to look at reducing cpu_count.

At the OS level, you can also look at the run queue (the list of processes that *wanted* to use the CPU but could not). If that is non-zero for sustained periods of time, you might be max-ing out your server.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database