Discussion:
cpu_count per instance in a hard partition
Patrice sur GMail
2018-11-23 13:53:34 UTC
Permalink
Hi,

a possibly dumb question:

If you have a hard partition with 2 cores but 8 threads total but are
running five Oracle instances within that hard partition, does the Oracle
software know that five instances are running from the same home? Or is
each instance oblivious to the fact that it is sharing resources with other
instances.

I ask because if we set cpu_count=8 in each of five instances, doesn't that
mean the instances expect the hard partition to provide a total of 40
threads?

If they are aware of their environment then each instance could say "well
obviously they are lying to me, I only really have 8/5 threads available to
me, though we are sharing resources so sometimes I will have more time
slices, other times, not as many."

Overloading may not cause major problems other than each instance not
getting as many time slices as it expects, i.e. each one would end up
running slower than optimal. (reminds me of when I was a student working
on an overloaded mainframe which had more dumb terminals than recommended,
each dumb terminal had to wait for time slices) Meanwhile there would be
nearly no wasted time slices because the CPUs are very busy.

-- Patrice
My profiles: [image: Facebook]
<http://www.facebook.com/home.php?#!/profile.php?id=100000206805521>[image:
LinkedIn] <http://ca.linkedin.com/pub/patrice-boivin/a/933/5a9>[image:
Twitter] <http://www.twitter.com/PatriceBoivin>
Stefan Knecht
2018-11-23 15:55:44 UTC
Permalink
This is documented here and is basically the use case for the resource
manager's instance caging feature:

https://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#CFHBDFAG
Post by Patrice sur GMail
Hi,
If you have a hard partition with 2 cores but 8 threads total but are
running five Oracle instances within that hard partition, does the Oracle
software know that five instances are running from the same home? Or is
each instance oblivious to the fact that it is sharing resources with other
instances.
I ask because if we set cpu_count=8 in each of five instances, doesn't
that mean the instances expect the hard partition to provide a total of 40
threads?
If they are aware of their environment then each instance could say "well
obviously they are lying to me, I only really have 8/5 threads available to
me, though we are sharing resources so sometimes I will have more time
slices, other times, not as many."
Overloading may not cause major problems other than each instance not
getting as many time slices as it expects, i.e. each one would end up
running slower than optimal. (reminds me of when I was a student working
on an overloaded mainframe which had more dumb terminals than recommended,
each dumb terminal had to wait for time slices) Meanwhile there would be
nearly no wasted time slices because the CPUs are very busy.
-- Patrice
My profiles: [image: Facebook]
Twitter] <http://www.twitter.com/PatriceBoivin>
--
//
zztat - The Next-Gen Oracle Performance Monitoring and Reaction Framework!
Visit us at zztat.net | @zztat_oracle | fb.me/zztat | zztat.net/blog/
Jose Rodriguez
2018-11-23 18:38:01 UTC
Permalink
AFAIK, Oracle instances are not aware of other instances running in the
same host and, even though, why would it matter to them?
They see the CPUs as any other software running on the same server, be it
Oracle DBA, WebLogic or the OE itself, they are competing to get the
resources, not only CPU but also memory and IO.
So, you have five instances running and it is up to you to figure out if
they will be struggling to get CPU cycles or they will just come along
fine, each instance will assume that it has as many CPUs available as it
seems and act accordingly.
Bear in mind that Oracle does not charge you for the number of instances
running or the number of different versions, just the cores the server have
so, if the instances won't fight too much for CPU, then you are actually
saving money. On the other side, if they start struggling you may have to
consider adding some additional CPU and licenses.

I hope this helps.
Post by Patrice sur GMail
Hi,
If you have a hard partition with 2 cores but 8 threads total but are
running five Oracle instances within that hard partition, does the Oracle
software know that five instances are running from the same home? Or is
each instance oblivious to the fact that it is sharing resources with other
instances.
I ask because if we set cpu_count=8 in each of five instances, doesn't
that mean the instances expect the hard partition to provide a total of 40
threads?
If they are aware of their environment then each instance could say "well
obviously they are lying to me, I only really have 8/5 threads available to
me, though we are sharing resources so sometimes I will have more time
slices, other times, not as many."
Overloading may not cause major problems other than each instance not
getting as many time slices as it expects, i.e. each one would end up
running slower than optimal. (reminds me of when I was a student working
on an overloaded mainframe which had more dumb terminals than recommended,
each dumb terminal had to wait for time slices) Meanwhile there would be
nearly no wasted time slices because the CPUs are very busy.
-- Patrice
My profiles: [image: Facebook]
Twitter] <http://www.twitter.com/PatriceBoivin>
--
--
Stefan Koehler
2018-11-23 20:47:00 UTC
Permalink
Hello Patrice,
does the Oracle software know that five instances are running from the same home?
Short answer - no. However you can use OS implementations like cgroups (Linux) or WLM (AIX) to control the resources over all Oracle instances. Oracle RDBMS also has an integration into some of these OS features like cgroups.

Best Regards
Stefan Koehler

Independent Oracle performance consultant and researcher
Website: http://www.soocs.de
Hi, 
 
 
If you have a hard partition with 2 cores but 8 threads total but are running five Oracle instances within that hard partition, does the Oracle software know that five instances are running from the same home?  Or is each instance oblivious to the fact that it is sharing resources with other instances.
 
I ask because if we set cpu_count=8 in each of five instances, doesn't that mean the instances expect the hard partition to provide a total of 40 threads?
 
If they are aware of their environment then each instance could say "well obviously they are lying to me, I only really have 8/5 threads available to me, though we are sharing resources so sometimes I will have more time slices, other times, not as many."
 
Overloading may not cause major problems other than each instance not getting as many time slices as it expects, i.e. each one would end up running slower than optimal.   (reminds me of when I was a student working on an overloaded mainframe which had more dumb terminals than recommended, each dumb terminal had to wait for time slices)  Meanwhile there would be nearly no wasted time slices because the CPUs are very busy. 
 
-- Patrice
My profiles: [](http://www.facebook.com/home.php#!/profile.php?id=100000206805521)[](http://ca.linkedin.com/pub/patrice-boivin/a/933/5a9)[](http://www.twitter.com/PatriceBoivin)
--
http://www.freelists.org/webpage/oracle-l
bdtoracleblog
2018-11-23 20:58:07 UTC
Permalink
Hello,

In case you want to compare caging vs binding:

https://bdrouvot.wordpress.com/2015/03/18/binding-with-processor_group_name-versus-caging-facts-observations-and-customer-cases/

Bertrand

Envoyé de mon iPhone
(désolé pour les typos)
Post by Stefan Koehler
Hello Patrice,
does the Oracle software know that five instances are running from the same home?
Short answer - no. However you can use OS implementations like cgroups (Linux) or WLM (AIX) to control the resources over all Oracle instances. Oracle RDBMS also has an integration into some of these OS features like cgroups.
Best Regards
Stefan Koehler
Independent Oracle performance consultant and researcher
Website: http://www.soocs.de
Hi,
If you have a hard partition with 2 cores but 8 threads total but are running five Oracle instances within that hard partition, does the Oracle software know that five instances are running from the same home? Or is each instance oblivious to the fact that it is sharing resources with other instances.
I ask because if we set cpu_count=8 in each of five instances, doesn't that mean the instances expect the hard partition to provide a total of 40 threads?
If they are aware of their environment then each instance could say "well obviously they are lying to me, I only really have 8/5 threads available to me, though we are sharing resources so sometimes I will have more time slices, other times, not as many."
Overloading may not cause major problems other than each instance not getting as many time slices as it expects, i.e. each one would end up running slower than optimal. (reminds me of when I was a student working on an overloaded mainframe which had more dumb terminals than recommended, each dumb terminal had to wait for time slices) Meanwhile there would be nearly no wasted time slices because the CPUs are very busy.
-- Patrice
My profiles: [](http://www.facebook.com/home.php#!/profile.php?id=100000206805521)[](http://ca.linkedin.com/pub/patrice-boivin/a/933/5a9)[](http://www.twitter.com/PatriceBoivin)
--
http://www.freelists.org/webpage/oracle-l
Loading...