SlideShare a Scribd company logo
1 of 4
Download to read offline
♨ CPU limitation per database instance
About Creating Cgroups on Linux Systems
Resource management always is a best tools for DBA to control consumption of databases that
live together in same server.
Resource consumption and limiting databases and PDBs can control on i/o, memory, cpu by
traditional or new features in oracle such as applying limit on PGA, SGA using pga aggregate
target and sga_target, sga_min_size and for controlling I/O usage we can use max_iops.
Using dbms_resource_manager package we can apply plan directives to handles cpu utilization.
In this post I demonstrate a another way to specify control CPU usage for databases that live side
by side on the same machine.
Cgroups, or control groups, improve database performance by associating a dedicated set of
CPUs to a database instance. Each database instance can only use the resources in its cgroup.
When consolidating on a large server, you may want to restrict the database to a speci
fi
c subset
of the CPU and memory. This feature makes it easy to enable CPU and memory restrictions for an
Oracle Database instance.
Use the setup_processor_group.sh script to create cgroups.
Download this script from note 1585184.1 on the Oracle
Support website.
Using PROCESSOR_GROUP_NAME to bind a database instance to CPUs or NUMA nodes
on Linux (Doc ID 1585184.1)
PURPOSE
This document provides a step-by-step guide for binding a database instance to a subset of a
server's CPUs and memory, using Linux cgroups. Cgroups provide a way to create a named set
of CPUs and memory.
A database instance that is associated with this cgroup can only use its CPUs and memory.
Using Linux cgroups, a DBA that is consolidating multiple database instances on a single server
can:
-Physically isolate database instances onto di
ff
erent CPUs
-Bind instances to speci
fi
c NUMA nodes to improve performance on NUMA-based systems.
Step 1 - Con
fi
guring the Linux cgroup
Use the available script, setup_processor_group.sh, to create and modify Linux cgroups.
You must run this script as root.
First, check the number of CPUs, the NUMA con
fi
guration, and the existing cgroups (if any) for
your system:
setup_processor_group.sh –show
Next, prepare the system to use cgroups (this command can be repeated):
setup_processor_group.sh –prepare
To check if the system is indeed ready:
setup_processor_group.sh –check
To create a new cgroup "mycg" for user "oracle" in group "dba" with CPUs 0 and 1, use the "-
create" option. With the "-cpu" option, you can provide either a comma-separated list or a range,
e.g. "–cpus 0-7,16-23".
setup_processor_group.sh –create –name mycg –cpus 0,1 -u:g
oracle:dba
Or, create a new cgroup "mycg" for user "oracle" in group "dba" with NUMA nodes 1 and 2, using
the "-numa_nodes" option.
You cannot use the "-create" option with both "–cpus" and "–numa_nodes".
$setup_processor_group.sh –create –name mycg –
numa_nodes 1,2 -u:g oracle:dba
To update an existing cgroup "mycg" with new values:
$setup_processor_group.sh –update -name mycg –cpus 2,3
-u:g oracle:dba
To delete the cgroup "mycg":
$setup_processor_group.sh –delete –name mycg
Step 2 - Con
fi
guring the Database
To bind a database instance to a cgroup, set the Oracle initialization parameter,
PROCESSOR_GROUP_NAME, to the name of the cgroup.
The cgroup was named through the "setup_processor_group.sh -name" option.
PROCESSOR_GROUP_NAME is a static parameter.
Therefore, the database instance must be restarted in order for the parameter to take e
ff
ect.
To verify that the database instance has successfully bound itself to the cgroup, check for this
message in the alert log:
"Instance started in processor group mycg"
When a database instance is successfully running in a cgroup, the default value of the Oracle
initialization parameter, CPU_COUNT, is set to the number of CPUs in the cgroup.
show parameter cpu_count
If you have explicitly set CPU_COUNT, you should consider clearing it so that CPU_COUNT is set
to the cgroup's value:
alter system set cpu_count = 0;
Use this Linux command to verify that a particular database process is running in the cgroup
(substitute <pid> with the process id).
In the output, you should see the cgroup name after the string "cpuset:/".
cat /proc/<pid>/cgroup
Use this Linux command to see all processes that are running in the cgroup (substitute <mycg>
with your cgroup name).
cat /mnt/cgroup/<mycg>/tasks
Best Practices
(1) Note that Linux cgroups allow databases and applications that are not associated with the
cgroup to use its CPU and memory.
(2) For processors with hyper-threading (e.g. x-86), con
fi
gure cgroups out of CPU threads, using
the "-cpus" option, from the minimum number of CPU cores and sockets. Do not assign the CPU
threads on a core to more than one cgroup.
These best practices enable much better isolation and performance since CPUs on a core share
many common resources, such as parts of the execution pipeline, caches, and TLBs.
For a list of the CPU threads, cores, and sockets, use the following commands:
cat /proc/cpuinfo | grep processor
(lists CPU threads)
cat /proc/cpuinfo | grep "physical id" | sort | uniq
(lists the CPU sockets)
cat /proc/cpuinfo | egrep "core id|physical id" (lists CPU cores
and sockets)
- Create cgroups with at least 2 CPU cores.
- For NUMA systems (e.g. Exadata X4-8),
con
fi
gure the cgroup from NUMA nodes, using the "-numa_nodes" option.
The "-numa_nodes" option will ensure that the database instance allocates local memory for both
SGA and PGA, resulting in improved database performance.
-When consolidating a large number of databases, consider creating a few cgroups and binding
multiple database instances to each cgroup.
For example:
◦Create one cgroup per NUMA node. Bind multiple database instances to each NUMA node's
cgroup.
◦Create 2 cgroups, one for test databases and one for standby databases.
Linux Cgroups vs Virtualization
Linux cgroups and virtual machines (VMs) are both e
ff
ective tools for consolidating multiple
databases on a server.
Both tools provide resource isolation by dedicating CPU and memory to a database instance.
Database instances on VMs are isolated in a similar way as database instances on separate
physical servers. While this isolation o
ff
ers many obvious advantages, it also has the following
disadvantages:
◦Oracle Clusterware must be installed for each virtual machine. Databases in cgroups can share
one instance of the Oracle Clusterware.
◦Exadata does not currently support virtualization.
Using Linux cgroups does not reduce Oracle database licensing costs. The license is based on
the number of CPUs on the server, not the database's cgroup size.
Regarding,
Alireza Kamrani
Senior RDBMS Consultant

More Related Content

Similar to ♨️CPU limitation per Oracle database instance

Q2.12: Existing Linux Mechanisms to Support big.LITTLE
Q2.12: Existing Linux Mechanisms to Support big.LITTLEQ2.12: Existing Linux Mechanisms to Support big.LITTLE
Q2.12: Existing Linux Mechanisms to Support big.LITTLELinaro
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in productionParis Data Engineers !
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engineBhuvaneshwaran R
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionSearce Inc
 
Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1상욱 송
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
 
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSMariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSJelastic Multi-Cloud PaaS
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档YUCHENG HU
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control GroupsMarian Marinov
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
 
Tuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsTuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsSamir Bessalah
 
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...Amazon Web Services
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingMarian Marinov
 
DevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on KubernetesDevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on KubernetesDinakar Guniguntala
 
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Kohei KaiGai
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCoburn Watson
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
Deep learning with kafka
Deep learning with kafkaDeep learning with kafka
Deep learning with kafkaNitin Kumar
 

Similar to ♨️CPU limitation per Oracle database instance (20)

Q2.12: Existing Linux Mechanisms to Support big.LITTLE
Q2.12: Existing Linux Mechanisms to Support big.LITTLEQ2.12: Existing Linux Mechanisms to Support big.LITTLE
Q2.12: Existing Linux Mechanisms to Support big.LITTLE
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engine
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in Production
 
Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaSMariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
MariaDB Auto-Clustering, Vertical and Horizontal Scaling within Jelastic PaaS
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control Groups
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
Deep Dive on Amazon EC2
Deep Dive on Amazon EC2Deep Dive on Amazon EC2
Deep Dive on Amazon EC2
 
Tuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsTuning tips for Apache Spark Jobs
Tuning tips for Apache Spark Jobs
 
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
 
DevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on KubernetesDevoxxUK: Optimizating Application Performance on Kubernetes
DevoxxUK: Optimizating Application Performance on Kubernetes
 
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
Deep learning with kafka
Deep learning with kafkaDeep learning with kafka
Deep learning with kafka
 

More from Alireza Kamrani

Oracle database maximum performance on Exadata
Oracle database maximum performance on ExadataOracle database maximum performance on Exadata
Oracle database maximum performance on ExadataAlireza Kamrani
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfAlireza Kamrani
 
Flashback time travel vs Flash back Data Archive.pdf
Flashback time travel  vs Flash back Data Archive.pdfFlashback time travel  vs Flash back Data Archive.pdf
Flashback time travel vs Flash back Data Archive.pdfAlireza Kamrani
 
Import option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfImport option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfAlireza Kamrani
 
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdfAlireza Kamrani
 
Recovering a Oracle datafile without backup.pdf
Recovering a Oracle datafile without backup.pdfRecovering a Oracle datafile without backup.pdf
Recovering a Oracle datafile without backup.pdfAlireza Kamrani
 
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdfAlireza Kamrani
 
Out-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesOut-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesAlireza Kamrani
 
IO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceIO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceAlireza Kamrani
 
The Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsThe Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsAlireza Kamrani
 
What is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseWhat is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseAlireza Kamrani
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...Alireza Kamrani
 
Oracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresOracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresAlireza Kamrani
 
Store non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONStore non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONAlireza Kamrani
 
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseEnhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseAlireza Kamrani
 
PostgreSQL vs Oracle a brief comparison
PostgreSQL vs Oracle a brief  comparisonPostgreSQL vs Oracle a brief  comparison
PostgreSQL vs Oracle a brief comparisonAlireza Kamrani
 
How to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLHow to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLAlireza Kamrani
 

More from Alireza Kamrani (17)

Oracle database maximum performance on Exadata
Oracle database maximum performance on ExadataOracle database maximum performance on Exadata
Oracle database maximum performance on Exadata
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
 
Flashback time travel vs Flash back Data Archive.pdf
Flashback time travel  vs Flash back Data Archive.pdfFlashback time travel  vs Flash back Data Archive.pdf
Flashback time travel vs Flash back Data Archive.pdf
 
Import option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdfImport option in Oracle Database : tip & trick🧶.pdf
Import option in Oracle Database : tip & trick🧶.pdf
 
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
🔴Oracle ASM Filter Driver & ASMLIB & UDEV🔴.pdf
 
Recovering a Oracle datafile without backup.pdf
Recovering a Oracle datafile without backup.pdfRecovering a Oracle datafile without backup.pdf
Recovering a Oracle datafile without backup.pdf
 
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
♨️How To Use DataPump (EXPDP) To Export From Physical Standby….pdf
 
Out-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden ImagesOut-of-Place Oracle Database Patching and Provisioning Golden Images
Out-of-Place Oracle Database Patching and Provisioning Golden Images
 
IO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performanceIO Schedulers (Elevater) concept and its affection on database performance
IO Schedulers (Elevater) concept and its affection on database performance
 
The Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAsThe Fundamental Characteristics of Storage concepts for DBAs
The Fundamental Characteristics of Storage concepts for DBAs
 
What is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of databaseWhat is Scalability and How can affect on overall system performance of database
What is Scalability and How can affect on overall system performance of database
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...
 
Oracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking featuresOracle Database 23c–Fine Grained locking features
Oracle Database 23c–Fine Grained locking features
 
Store non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSONStore non-structured data in JSON column types and enhancements of JSON
Store non-structured data in JSON column types and enhancements of JSON
 
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning ClauseEnhancements in Oracle 23c Introducing the NewOld Returning Clause
Enhancements in Oracle 23c Introducing the NewOld Returning Clause
 
PostgreSQL vs Oracle a brief comparison
PostgreSQL vs Oracle a brief  comparisonPostgreSQL vs Oracle a brief  comparison
PostgreSQL vs Oracle a brief comparison
 
How to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQLHow to take a dump from a Wal file PostgreSQL
How to take a dump from a Wal file PostgreSQL
 

Recently uploaded

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationBoston Institute of Analytics
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 

Recently uploaded (20)

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project Presentation
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 

♨️CPU limitation per Oracle database instance

  • 1. ♨ CPU limitation per database instance About Creating Cgroups on Linux Systems Resource management always is a best tools for DBA to control consumption of databases that live together in same server. Resource consumption and limiting databases and PDBs can control on i/o, memory, cpu by traditional or new features in oracle such as applying limit on PGA, SGA using pga aggregate target and sga_target, sga_min_size and for controlling I/O usage we can use max_iops. Using dbms_resource_manager package we can apply plan directives to handles cpu utilization. In this post I demonstrate a another way to specify control CPU usage for databases that live side by side on the same machine. Cgroups, or control groups, improve database performance by associating a dedicated set of CPUs to a database instance. Each database instance can only use the resources in its cgroup. When consolidating on a large server, you may want to restrict the database to a speci fi c subset of the CPU and memory. This feature makes it easy to enable CPU and memory restrictions for an Oracle Database instance. Use the setup_processor_group.sh script to create cgroups. Download this script from note 1585184.1 on the Oracle Support website. Using PROCESSOR_GROUP_NAME to bind a database instance to CPUs or NUMA nodes on Linux (Doc ID 1585184.1) PURPOSE This document provides a step-by-step guide for binding a database instance to a subset of a server's CPUs and memory, using Linux cgroups. Cgroups provide a way to create a named set of CPUs and memory. A database instance that is associated with this cgroup can only use its CPUs and memory. Using Linux cgroups, a DBA that is consolidating multiple database instances on a single server can: -Physically isolate database instances onto di ff erent CPUs -Bind instances to speci fi c NUMA nodes to improve performance on NUMA-based systems. Step 1 - Con fi guring the Linux cgroup Use the available script, setup_processor_group.sh, to create and modify Linux cgroups. You must run this script as root. First, check the number of CPUs, the NUMA con fi guration, and the existing cgroups (if any) for your system: setup_processor_group.sh –show Next, prepare the system to use cgroups (this command can be repeated):
  • 2. setup_processor_group.sh –prepare To check if the system is indeed ready: setup_processor_group.sh –check To create a new cgroup "mycg" for user "oracle" in group "dba" with CPUs 0 and 1, use the "- create" option. With the "-cpu" option, you can provide either a comma-separated list or a range, e.g. "–cpus 0-7,16-23". setup_processor_group.sh –create –name mycg –cpus 0,1 -u:g oracle:dba Or, create a new cgroup "mycg" for user "oracle" in group "dba" with NUMA nodes 1 and 2, using the "-numa_nodes" option. You cannot use the "-create" option with both "–cpus" and "–numa_nodes". $setup_processor_group.sh –create –name mycg – numa_nodes 1,2 -u:g oracle:dba To update an existing cgroup "mycg" with new values: $setup_processor_group.sh –update -name mycg –cpus 2,3 -u:g oracle:dba To delete the cgroup "mycg": $setup_processor_group.sh –delete –name mycg Step 2 - Con fi guring the Database To bind a database instance to a cgroup, set the Oracle initialization parameter, PROCESSOR_GROUP_NAME, to the name of the cgroup. The cgroup was named through the "setup_processor_group.sh -name" option. PROCESSOR_GROUP_NAME is a static parameter. Therefore, the database instance must be restarted in order for the parameter to take e ff ect. To verify that the database instance has successfully bound itself to the cgroup, check for this message in the alert log: "Instance started in processor group mycg" When a database instance is successfully running in a cgroup, the default value of the Oracle initialization parameter, CPU_COUNT, is set to the number of CPUs in the cgroup. show parameter cpu_count If you have explicitly set CPU_COUNT, you should consider clearing it so that CPU_COUNT is set to the cgroup's value: alter system set cpu_count = 0;
  • 3. Use this Linux command to verify that a particular database process is running in the cgroup (substitute <pid> with the process id). In the output, you should see the cgroup name after the string "cpuset:/". cat /proc/<pid>/cgroup Use this Linux command to see all processes that are running in the cgroup (substitute <mycg> with your cgroup name). cat /mnt/cgroup/<mycg>/tasks Best Practices (1) Note that Linux cgroups allow databases and applications that are not associated with the cgroup to use its CPU and memory. (2) For processors with hyper-threading (e.g. x-86), con fi gure cgroups out of CPU threads, using the "-cpus" option, from the minimum number of CPU cores and sockets. Do not assign the CPU threads on a core to more than one cgroup. These best practices enable much better isolation and performance since CPUs on a core share many common resources, such as parts of the execution pipeline, caches, and TLBs. For a list of the CPU threads, cores, and sockets, use the following commands: cat /proc/cpuinfo | grep processor (lists CPU threads) cat /proc/cpuinfo | grep "physical id" | sort | uniq (lists the CPU sockets) cat /proc/cpuinfo | egrep "core id|physical id" (lists CPU cores and sockets) - Create cgroups with at least 2 CPU cores. - For NUMA systems (e.g. Exadata X4-8), con fi gure the cgroup from NUMA nodes, using the "-numa_nodes" option. The "-numa_nodes" option will ensure that the database instance allocates local memory for both SGA and PGA, resulting in improved database performance. -When consolidating a large number of databases, consider creating a few cgroups and binding multiple database instances to each cgroup. For example: ◦Create one cgroup per NUMA node. Bind multiple database instances to each NUMA node's cgroup. ◦Create 2 cgroups, one for test databases and one for standby databases.
  • 4. Linux Cgroups vs Virtualization Linux cgroups and virtual machines (VMs) are both e ff ective tools for consolidating multiple databases on a server. Both tools provide resource isolation by dedicating CPU and memory to a database instance. Database instances on VMs are isolated in a similar way as database instances on separate physical servers. While this isolation o ff ers many obvious advantages, it also has the following disadvantages: ◦Oracle Clusterware must be installed for each virtual machine. Databases in cgroups can share one instance of the Oracle Clusterware. ◦Exadata does not currently support virtualization. Using Linux cgroups does not reduce Oracle database licensing costs. The license is based on the number of CPUs on the server, not the database's cgroup size. Regarding, Alireza Kamrani Senior RDBMS Consultant