SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Oracle 12c: Multi Process Multi Threaded
A closer look at the multi-process multi-threaded model for Oracle
on Linux/Unix
Markus Flechtner
Senior Consultant
Flechtner_Oracle_12c_multi_process_multi_t
hreaded.pptx
Our company.
Oracle 12c: Multi Process Multi Threaded3 12/24/16
Trivadis is a market leader in IT consulting, system integration, solution engineering
and the provision of IT services focusing on and technologies
in Switzerland, Germany, Austria and Denmark. We offer our services in the following
strategic business fields:
Trivadis Services takes over the interactive operation of your IT systems.
O P E R A T I O N
COPENHAGEN
MUNICH
LAUSANNE
BERN
ZURICH
BRUGG
GENEVA
HAMBURG
DÜSSELDORF
FRANKFURT
STUTTGART
FREIBURG
BASLE
VIENNA
With over 600 specialists and IT experts in your region.
Oracle 12c: Multi Process Multi Threaded4 12/24/16
14 Trivadis branches and more than
600 employees
200 Service Level Agreements
Over 4,000 training participants
Research and development budget:
CHF 5.0 / EUR 4 million
Financially self-supporting and
sustainably profitable
Experience from more than 1,900
projects per year at over 800
customers
About Markus Flechtner
Senior Consultant, Trivadis, Duesseldorf/Germany, since April 2008
Discipline Infrastructure Database @Trivadis
Working with Oracle since the 1990’s
– Development (Forms, Reports, PL/SQL)
– Support
– Database Administration
Focus
– Oracle Real Application Clusters
– Database Migration Projects
Teacher
– O-RAC – Oracle Real Application Clusters
– O-NF12CDBA – Oracle 12c New Features for the DBA
Blog:
http://markusdba.de/
@markusdba
Oracle 12c: Multi Process Multi Threaded5 12/24/16
Agenda
Oracle 12c: Multi Process Multi Threaded6 12/24/16
1. The problem & existing solutions
2. New in Oracle Database 12c: THREADED_EXECUTION
3. Architecture
4. Performance
5. Threaded Execution in the daily DBA business
6. Pros & Cons
Oracle 12c: Multi Process Multi Threaded7 12/24/16
The problem & existing solutions
The problem & existing solutions (1)
Oracle 12c: Multi Process Multi Threaded8 12/24/16
In the dedicated server achitecture on Unix/Linux:
– every client session has got its own server process
– these processes need memory and processor time
– there are many context switches
Many applications
– Keep database sessions open and rarely execute SQL statements
Result
– Overhead on the database server
– Waste of system resources
The problem & existing solutions (2)
Oracle 12c: Multi Process Multi Threaded9 12/24/16
Existing solutions
– Shared Server (Multithreaded Server)
– Database Resident Connection Pooling (DRCP)
è not for all applications
– Universal Connection Pool (UCP)
– Connection Pools in general (Application Server)
All these solutions affect client sessions only
The problem & existing solutions (3)
Oracle 12c: Multi Process Multi Threaded10 12/24/16
Overview on existing solutions
• From Oracle Database 12c Administrators Guide © Oracle Corporation
The problem & existing solutions (4)
Oracle 12c: Multi Process Multi Threaded11 12/24/16
The “Multithreaded Oracle Process Model” does not replace
these solutions but is a new method to reduce the resource
consumption of a database instance on a Linux/Unix
database server.
Oracle 12c: Multi Process Multi Threaded12 12/24/16
New in Oracle Database 12c:
THREADED_EXECUTION
"Multithreaded Oracle Process Model"
Processes vs. Threads
Oracle 12c: Multi Process Multi Threaded13 12/24/16
Process
– A process is an instance of a computer program that is being
executed. It contains the program code and its current activity.
Depending on the operating system (OS), a process may be
made up of multiple threads of execution that execute
instructions concurrently
Threads
– A thread of execution is the smallest sequence of
programmed instructions that can be managed independently
by a scheduler ..
Source: Wikipedia (http://en.wikipedia.org)
Process
Thread 1
Thread 2
Multithreaded Oracle Process Model (1)
Oracle 12c: Multi Process Multi Threaded14 12/24/16
The “Multithreaded Oracle Process Model” on Unix/Linux enables the database instance
to run instance processes as operating system threads
– Similar to Oracle on Windows
– No additional license costs; works on SE1, SE2, SE and EE
Configuration:
– Restart the instance
– Result: (most) background processes and local connections run as OS threads
ALTER SYSTEM SET threaded_execution=TRUE SCOPE=spfile SID='*'
Multithreaded Oracle Process Model (2)
Oracle 12c: Multi Process Multi Threaded15 12/24/16
For remote clients which connect via Oracle Net a parameter for the listener must be set
in the listener.ora file:
– Restart the listener afterwards
If you want to run remote clients in threaded and non-threaded mode, a second listener is
required
– Different port and/or host name resp. IP address
– DEDICATED_THROUGH_BROKER_<new_listener>=OFF (default)
DEDICATED_THROUGH_BROKER_<listener_name>=ON
Multithreaded Oracle Process Model (3) – DB Connect
Oracle 12c: Multi Process Multi Threaded16 12/24/16
Conn.Broker
(Thread)
SGA
LISTENER
➊
➍
➎
➋
➌
Thread for
DB Session
Oracle 12c: Multi Process Multi Threaded17 12/24/16
Architecture
Architecture (1) - Processes
Oracle 12c: Multi Process Multi Threaded18 12/24/16
Process list of an Oracle instance with THREADED_EXECUTION
“Threaded Sessions” are “hidden” in the "ora_u<nnn>_<SID>“-processes
oracle@te:~/ [TEST] ps –ef |grep $ORACLE_SID
oracle 6593 1 0 10:02 ? 00:00:00 ora_pmon_TEST
oracle 6595 1 0 10:02 ? 00:00:00 ora_psp0_TEST
oracle 6597 1 14 10:02 ? 00:00:03 ora_vktm_TEST
oracle 6601 1 23 10:02 ? 00:00:05 ora_u004_TEST
oracle 6607 1 99 10:02 ? 00:00:22 ora_u005_TEST
oracle 6613 1 0 10:02 ? 00:00:00 ora_dbw0_TEST
Architecture (2) - Processes
Oracle 12c: Multi Process Multi Threaded19 12/24/16
oracle@te:~/ [TEST] ps –ef |grep ora_u00
oracle 31220 1 2 21:18 ? 00:00:03 ora_u004_TEST
oracle 31226 1 11 21:18 ? 00:00:13 ora_u005_TEST
oracle@te:~/ [TEST] pidstat -t -p 31220
Linux 3.8.13-26.2.1.el6uek.x86_64 (te.markusflechtner.vm) 03/22/2014 _x86_64_ (4 CPU)
09:20:45 PM TGID TID %usr %system %guest %CPU CPU Command
09:20:45 PM 31220 - 0.01 0.01 0.00 0.02 3 ora_scmn_test
09:20:45 PM - 31220 0.00 0.00 0.00 0.00 3 |__ora_scmn_test
09:20:45 PM - 31221 0.00 0.00 0.00 0.00 1 |__oracle
09:20:45 PM - 31222 0.00 0.00 0.00 0.00 0 |__ora_gen0_test
09:20:45 PM - 31223 0.00 0.00 0.00 0.00 2 |__ora_mman_test
09:20:45 PM - 31229 0.00 0.00 0.00 0.00 3 |__ora_dbrm_test
09:20:45 PM - 31233 0.00 0.00 0.00 0.00 1 |__ora_lgwr_test
09:20:45 PM - 31234 0.00 0.00 0.00 0.00 0 |__ora_ckpt_test
09:20:45 PM - 31235 0.00 0.00 0.00 0.00 3 |__ora_lg00_test
09:20:45 PM - 31236 0.00 0.00 0.00 0.00 3 |__ora_smon_test
09:20:45 PM - 31237 0.00 0.00 0.00 0.00 2 |__ora_lg01_test
09:20:45 PM - 31239 0.00 0.00 0.00 0.00 3 |__ora_lreg_test
Architecture (3) – V$PROCESS
Oracle 12c: Multi Process Multi Threaded20 12/24/16
SQL> select spid,stid,execution_type,pname from v$process
2 where spid is not null and (execution_type=‘PROCESS’ or pname in
3 ('PMON','SMON','DBW0','PSP0','VKTM','MMON','RECO','LGWR',’SCMN’));
SPID STID EXECUTION_ PNAME
------------------------ ------------------------ ---------- -----
6593 6593 PROCESS PMON
6595 6595 PROCESS PSP0
6597 6597 PROCESS VKTM
6601 6614 THREAD LGWR
6601 6601 THREAD SCMN
6601 6618 THREAD SMON
6607 6621 THREAD MMON
6607 6607 THREAD SCMN
6607 6619 THREAD RECO
6613 6613 PROCESS DBW0
Architecture (4)
Oracle 12c: Multi Process Multi Threaded21 12/24/16
The “SCMN”-Thread is the “thread listener” or “thread coordinator” within the process
The threaded sessions remain “dedicated server” sessions:
PGA is allocated from the shared pool (like with “Shared Server")
SQL> select p.execution_type,s.server,count(*)
2 from v$process p,v$session s
3 where s.paddr=p.addr
4 group by p.execution_type,s.server;
EXECUTION_ SERVER COUNT(*)
---------- --------- ----------
THREAD DEDICATED 38
PROCESS DEDICATED 4
Architecture (5)
Oracle 12c: Multi Process Multi Threaded22 12/24/16
Ora_uNNN processes are terminated after beeing idle for 30 seconds
Every threaded session needs a processes slot (=> Parameter PROCESSES)
(è TNS-12602 “Connection pooling limit reached.”)
Architecture (6) – Memory Consumption
Oracle 12c: Multi Process Multi Threaded23 12/24/16
In average:
18% less memory
consumption with
„THREADED_EXECUTION“
Architecture (7) – Connection Broker
Oracle 12c: Multi Process Multi Threaded24 12/24/16
Threaded Execution requires a Connection Broker
The new parameter CONNECTION_BROKERS is set automatically when
THREADED_EXECUTION=TRUE
SQL> show parameter connection_brokers
NAME TYPE VALUE
------------------ ------- ----------------------------------------
connection_brokers string ((TYPE=DEDICATED)(BROKERS=1)),
((TYPE=EMON)(BROKERS=1))
Architecture (8) – Connection Broker & Listener
Oracle 12c: Multi Process Multi Threaded25 12/24/16
lsnrctl services
[..]
Service "TEST.markusflechtner.vm" has 1 instance(s).
Instance "TEST", status READY, has 2 handler(s) for this service...
Handler(s):
"N000" established:1 refused:0 state:ready
CMON <machine: te.markusflechtner.vm, pid: 1649_1668>
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=34848))
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
[..]
Architecture (9) – Connection Broker & Listener
Oracle 12c: Multi Process Multi Threaded26 12/24/16
oracle@te:~/ [TEST] ps –ef |grep 1649
oracle 1649 1 9 19:24 ? 00:05:12 ora_u005_TEST
SQL> select spid,stid,pname,execution_type from v$process
2 where spid=1649 and stid=1668;
SPID STID PNAME EXECUTION_TYPE
---------------- ---------------- ----- --------------
1649 1668 N000 THREAD
Architecture (10) - Miscellaneous
Oracle 12c: Multi Process Multi Threaded27 12/24/16
Threaded Execution & CPU usage
– No essential difference to "Non-Threaded-Execution"
Threaded Execution & Connect Time
– No essential difference to "Non-Threaded-Execution"
Threaded Execution on Windows
– The parameter has no effect
Multitenant Databases
– An OS process can contain sessions of multiple PDBs
Oracle 12c: Multi Process Multi Threaded28 12/24/16
Performance
Performance (1) – Test Environment
Oracle 12c: Multi Process Multi Threaded29 12/24/16
Host
– Notebook Lenovo W510 / 32 GB RAM / SSD
– Oracle Linux 6.5
Virtual Server (VirtualBox)
– 16 GB RAM
Oracle Database
– Oracle 12.1.0.1
– 6000M SGA / 2000M PGA
– Non-CDB-Architecture
Performance (2) – Test with Swingbench
Oracle 12c: Multi Process Multi Threaded30 12/24/16
Test Software
– Swingbench 2.5.0.99
(www.dominicgiles.com)
– 3 tests with
50 - 900 sessions,
average of transactions
per second
Performance (3) - Results
Oracle 12c: Multi Process Multi Threaded31 12/24/16
Performance (4) – Other tests
Oracle 12c: Multi Process Multi Threaded32 12/24/16
Oracle presentation on „Real Application Testing":
– 5% better performance with THREADED_EXECUTION
Thomas Bordeau: http://blog.arkzoyd.com/2014/01/17/oracle-multithreaded-does-it-worth-
a-try/
– Another test with SwingbenchJ
Overall result:
èBetter performance
èBetter scalability
Oracle 12c: Multi Process Multi Threaded33 12/24/16
Threaded Execution
in the daily DBA business
OS Authentication (1)
Oracle 12c: Multi Process Multi Threaded34 12/24/16
OS authentication is not supported with threaded execution
– è ORA-1017 invalid username ..
– Password File required
– è Startup/Shutdown scripts have to be changed
Some Oracle tools require "Non-Threaded Execution"
– dbca
– dbua
– datapatch
OS Authentication (2) - Workaround
Oracle 12c: Multi Process Multi Threaded35 12/24/16
Store the password in a wallet
In short (see MOS-Note 340559.1 for details)
# create wallet
mkstore -wrl <wallet_location> -create
# add db authentication information
mkstore -wrl <wallet_location> -createCredential <db_connect_string>
<username> <password>
# add the following lines to sqlnet.ora
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA = (DIRECTORY = <wallet_location_directory>)))
SQLNET.WALLET_OVERRIDE = TRUE
Connect to the DB using sqlplus sys/@<DB_Connect_String>
OS Authentication (3) – Other workarounds
Oracle 12c: Multi Process Multi Threaded36 12/24/16
sqlplus
/@"(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGS='(ADDRESS=(PROTOCOL=BEQ))'
))" AS SYSDBA
# the way the clusterware agent connects to the instance
sqlplus
/@"(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u00/app/oracle/product/12
.1.0.2/bin/oracle)(ARGV0=oracleGG03)(ENVS='ORACLE_HOME=/u00/app/oracle/pro
duct/12.1.0.2,ORACLE_SID=TEST,LD_LIBRARY_PATH=,ORACLE_BASE=')(ARGS='(DESCR
IPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(CONNECT_DATA=(SID=TEST))))"
AS SYSDBA
SQL Tracing
Oracle 12c: Multi Process Multi Threaded37 12/24/16
What‘s the name of the trace file?
è The filename contains SPID and STID
SQL> select spid,stid,execution_type,tracefile from v$process;
SPID STID E_TYPE TRACEFILE
----- ----- ------- ------------------------------------------------------------------
NONE /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_ora_0.trc
6961 6961 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_pmon_6961.trc
6963 6963 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_psp0_6963.trc
6965 6965 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_vktm_6965.trc
6969 6971 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_gen0_6969_6971.trc
6969 6969 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_scmn_6969_6969.trc
6969 6972 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_mman_6969_6972.trc
6975 7000 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_ora_6975_7000.trc
..
How to kill database sessions?
Oracle 12c: Multi Process Multi Threaded38 12/24/16
As usual, sessions are identified via SID and SERIAL# in V$SESSION
Kill on database/instance level works fine:
But „kill -9 <spid>“ on OS level is not a good idea L
A thread cannot be killled from without the corresponding OS process
„kill -6 <stid>“ (SIGABRT) can help
– è find out the thread id via V$PROCESS or „pidstat“
– è execute „kill -6 <stid>“
ALTER SYSTEM KILL SESSION ‘<sid>,<serial#>‘;
Oracle 12c: Multi Process Multi Threaded39 12/24/16
Pros & Cons
Pros & Cons - Pro
Oracle 12c: Multi Process Multi Threaded40 12/24/16
Easy setup
Reduced memory consumption
Reduced number of processes on OS level
– è less context switches
Performance
– Equal or better than "non-threaded execution“
Scalability
– Equal or better than „non-threaded execution“
Statements regarding
performance and scalability
have to be verified in each
individual case!
Test Threaded Execution with
your application before you use
it!
Pros & Cons - Con
Oracle 12c: Multi Process Multi Threaded41 12/24/16
Missing OS authentication
– Scripts have to be changed
„kill -9“ does not work
srvctl (RAC) does not work
– Unpublished bug
Summary
Oracle 12c: Multi Process Multi Threaded42 12/24/16
There‘s not much information from Oracle on this feature
It is not really clear, why Oracle introduced this feature
There is no experience from customer projects so far, but if you accept the disadvantages
(missing OS authentication, killing sessions on OS level), the „Multithreaded Multi
Threaded“-model can make sense, if
– Your application does not support connection pools
– Your database is low on memory
But „Threaded execution“ cannot replace connection pools
Oracle 12c: Multi Process Multi Threaded43 12/24/16
§MOS-Note 1639445.1: 12c: Threaded_execution=true Prevents OS Login As Sysdba
§MOS-Note 1958348.1: Multi-Threaded Oracle Model
§MOS-Note 340559.1: „Using The Secure External Password Store“
§Oracle Presentation „Maximizing Database Performance Using Database Replay“
§http://blog.arkzoyd.com/2014/01/17/oracle-multithreaded-does-it-worth-a-try/
§http://dbwhisperer.wordpress.com/2013/10/04/multi-threaded-oracle-12c-Architektur-on-linux-2/
Further Information
Questions and Answers
Markus Flechtner
Senior Consultant
Phone +49 211 5866 6470
Markus.Flechtner@Trivadis.com
@markusdba http://markusdba.de
Download the slides from http://www.slideshare.net/markusdba
Please don‘t forget the session evaluation – Thank you!
12/24/16 Oracle 12c: Multi Process Multi Threaded44

Contenu connexe

Tendances

Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov... Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Databricks
 
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
InfluxData
 

Tendances (20)

Time series Analytics - a deep dive into ADX Azure Data Explorer @Data Saturd...
Time series Analytics - a deep dive into ADX Azure Data Explorer @Data Saturd...Time series Analytics - a deep dive into ADX Azure Data Explorer @Data Saturd...
Time series Analytics - a deep dive into ADX Azure Data Explorer @Data Saturd...
 
Streaming SQL with Apache Calcite
Streaming SQL with Apache CalciteStreaming SQL with Apache Calcite
Streaming SQL with Apache Calcite
 
Delta lake and the delta architecture
Delta lake and the delta architectureDelta lake and the delta architecture
Delta lake and the delta architecture
 
Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19
 
Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...
 
Spark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted MalaskaSpark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted Malaska
 
Kafka Summit NYC 2017 - Singe Message Transforms are not the Transformations ...
Kafka Summit NYC 2017 - Singe Message Transforms are not the Transformations ...Kafka Summit NYC 2017 - Singe Message Transforms are not the Transformations ...
Kafka Summit NYC 2017 - Singe Message Transforms are not the Transformations ...
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuing
 
Building an open data platform with apache iceberg
Building an open data platform with apache icebergBuilding an open data platform with apache iceberg
Building an open data platform with apache iceberg
 
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov... Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 
Operating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in ProductionOperating and Supporting Delta Lake in Production
Operating and Supporting Delta Lake in Production
 
One PDB to go, please!
One PDB to go, please!One PDB to go, please!
One PDB to go, please!
 
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
 
ETL in the Cloud With Microsoft Azure
ETL in the Cloud With Microsoft AzureETL in the Cloud With Microsoft Azure
ETL in the Cloud With Microsoft Azure
 
How We Reduced Performance Tuning Time by Orders of Magnitude with Database O...
How We Reduced Performance Tuning Time by Orders of Magnitude with Database O...How We Reduced Performance Tuning Time by Orders of Magnitude with Database O...
How We Reduced Performance Tuning Time by Orders of Magnitude with Database O...
 
The Current State of Table API in 2022
The Current State of Table API in 2022The Current State of Table API in 2022
The Current State of Table API in 2022
 
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified [❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
Lessons for the optimizer from running the TPC-DS benchmark
Lessons for the optimizer from running the TPC-DS benchmarkLessons for the optimizer from running the TPC-DS benchmark
Lessons for the optimizer from running the TPC-DS benchmark
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composer
 

En vedette

Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Yury Velikanov
 
Linux 101 Exploring Linux OS
Linux 101 Exploring Linux OSLinux 101 Exploring Linux OS
Linux 101 Exploring Linux OS
Rodel Barcenas
 
Testingtechniques And Strategy
Testingtechniques And StrategyTestingtechniques And Strategy
Testingtechniques And Strategy
nazeer pasha
 

En vedette (20)

Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
 
Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)
 
Montée en version de 300 bases de données vers Oracle 12c en 300 jours. Quel...
Montée en version de 300 bases de données vers Oracle 12c en 300 jours.  Quel...Montée en version de 300 bases de données vers Oracle 12c en 300 jours.  Quel...
Montée en version de 300 bases de données vers Oracle 12c en 300 jours. Quel...
 
How oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 finalHow oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 final
 
tow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualboxtow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualbox
 
What Linux is what you should also have on your computer.
What Linux is what you should also have on your computer.What Linux is what you should also have on your computer.
What Linux is what you should also have on your computer.
 
Unix day3 v1.3
Unix day3 v1.3Unix day3 v1.3
Unix day3 v1.3
 
Unix day4 v1.3
Unix day4 v1.3Unix day4 v1.3
Unix day4 v1.3
 
Awk Unix Utility Explained
Awk Unix Utility ExplainedAwk Unix Utility Explained
Awk Unix Utility Explained
 
Unix
UnixUnix
Unix
 
Linux 101 Exploring Linux OS
Linux 101 Exploring Linux OSLinux 101 Exploring Linux OS
Linux 101 Exploring Linux OS
 
Testingtechniques And Strategy
Testingtechniques And StrategyTestingtechniques And Strategy
Testingtechniques And Strategy
 
Unix day2 v1.3
Unix day2 v1.3Unix day2 v1.3
Unix day2 v1.3
 
Advanced Shell Scripting
Advanced Shell ScriptingAdvanced Shell Scripting
Advanced Shell Scripting
 
Awk essentials
Awk essentialsAwk essentials
Awk essentials
 
unix crontab basics
unix crontab basicsunix crontab basics
unix crontab basics
 
Presentation of awk
Presentation of awkPresentation of awk
Presentation of awk
 
UNIX - Class6 - sed - Detail
UNIX - Class6 - sed - DetailUNIX - Class6 - sed - Detail
UNIX - Class6 - sed - Detail
 

Similaire à Oracle 12c Multi Process Multi Threaded

Similaire à Oracle 12c Multi Process Multi Threaded (20)

Oracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodOracle Client Failover - Under The Hood
Oracle Client Failover - Under The Hood
 
0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial0396 oracle-goldengate-12c-tutorial
0396 oracle-goldengate-12c-tutorial
 
What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014
What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014
What we unlearned_and_learned_by_moving_from_m9000_to_ssc_ukoug2014
 
Oracle to MySQL DatabaseLink
Oracle to MySQL DatabaseLinkOracle to MySQL DatabaseLink
Oracle to MySQL DatabaseLink
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection Issues
 
Tools, not only for Oracle RAC
Tools, not only for Oracle RACTools, not only for Oracle RAC
Tools, not only for Oracle RAC
 
Speeding up Programs with OpenACC in GCC
Speeding up Programs with OpenACC in GCCSpeeding up Programs with OpenACC in GCC
Speeding up Programs with OpenACC in GCC
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
 
Oracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and Administer
Oracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and AdministerOracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and Administer
Oracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and Administer
 
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert BialekTrivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
 
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
 
Enterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle CloudEnterprise manager 13c -let's connect to the Oracle Cloud
Enterprise manager 13c -let's connect to the Oracle Cloud
 
PoC Oracle Exadata - Retour d'expérience
PoC Oracle Exadata - Retour d'expériencePoC Oracle Exadata - Retour d'expérience
PoC Oracle Exadata - Retour d'expérience
 
Managing troubleshooting cluster_360dgrees
Managing troubleshooting cluster_360dgreesManaging troubleshooting cluster_360dgrees
Managing troubleshooting cluster_360dgrees
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c Presentation
 
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
 
Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15
 
Exascale Capabl
Exascale CapablExascale Capabl
Exascale Capabl
 
Golden Gate - How to start such a project?
Golden Gate  - How to start such a project?Golden Gate  - How to start such a project?
Golden Gate - How to start such a project?
 

Plus de Markus Flechtner

Plus de Markus Flechtner (20)

My SYSAUX tablespace is full, please
My SYSAUX tablespace is full, pleaseMy SYSAUX tablespace is full, please
My SYSAUX tablespace is full, please
 
Rolle Rückwärts - Backported Features in Oracle Database 19c
Rolle Rückwärts - Backported Features in Oracle Database 19cRolle Rückwärts - Backported Features in Oracle Database 19c
Rolle Rückwärts - Backported Features in Oracle Database 19c
 
Oracle vs. PostgreSQL - Unterschiede in 45 Minuten
Oracle vs. PostgreSQL - Unterschiede in 45 MinutenOracle vs. PostgreSQL - Unterschiede in 45 Minuten
Oracle vs. PostgreSQL - Unterschiede in 45 Minuten
 
Container Only - Neue Features für Multitenant in Oracle 21c
Container Only - Neue Features für Multitenant in Oracle 21cContainer Only - Neue Features für Multitenant in Oracle 21c
Container Only - Neue Features für Multitenant in Oracle 21c
 
Oracle Datenbank-Architektur
Oracle Datenbank-ArchitekturOracle Datenbank-Architektur
Oracle Datenbank-Architektur
 
Wie kommt der Client zur Datenbank?
Wie kommt der Client zur Datenbank?Wie kommt der Client zur Datenbank?
Wie kommt der Client zur Datenbank?
 
OraChk
OraChkOraChk
OraChk
 
TFA - Trace File Analyzer Collector
TFA - Trace File Analyzer CollectorTFA - Trace File Analyzer Collector
TFA - Trace File Analyzer Collector
 
High Availability for Oracle SE2
High Availability for Oracle SE2High Availability for Oracle SE2
High Availability for Oracle SE2
 
My SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMy SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please help
 
Datenbank-Hausputz für Einsteiger
Datenbank-Hausputz für EinsteigerDatenbank-Hausputz für Einsteiger
Datenbank-Hausputz für Einsteiger
 
Should I stay or should I go?
Should I stay or should I go?Should I stay or should I go?
Should I stay or should I go?
 
Privilege Analysis with the Oracle Database
Privilege Analysis with the Oracle DatabasePrivilege Analysis with the Oracle Database
Privilege Analysis with the Oracle Database
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21c
 
Oracle - Checklist for performance issues
Oracle - Checklist for performance issuesOracle - Checklist for performance issues
Oracle - Checklist for performance issues
 
Einführung in den SQL-Developer
Einführung in den SQL-DeveloperEinführung in den SQL-Developer
Einführung in den SQL-Developer
 
Checklist for Upgrades and Migrations
Checklist for Upgrades and MigrationsChecklist for Upgrades and Migrations
Checklist for Upgrades and Migrations
 
Codd & ACID - ein Ausflug in die Datenbank-Theorie und Geschichte
Codd & ACID - ein Ausflug in die Datenbank-Theorie und GeschichteCodd & ACID - ein Ausflug in die Datenbank-Theorie und Geschichte
Codd & ACID - ein Ausflug in die Datenbank-Theorie und Geschichte
 
Datenbank-Selbstverwaltung - Das Oracle-Data-Dictionary
Datenbank-Selbstverwaltung - Das Oracle-Data-DictionaryDatenbank-Selbstverwaltung - Das Oracle-Data-Dictionary
Datenbank-Selbstverwaltung - Das Oracle-Data-Dictionary
 
Die Datenbank ist nicht immer Schuld - Gründe warum Datenbank-Migration schei...
Die Datenbank ist nicht immer Schuld - Gründe warum Datenbank-Migration schei...Die Datenbank ist nicht immer Schuld - Gründe warum Datenbank-Migration schei...
Die Datenbank ist nicht immer Schuld - Gründe warum Datenbank-Migration schei...
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Oracle 12c Multi Process Multi Threaded

  • 1. BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Oracle 12c: Multi Process Multi Threaded A closer look at the multi-process multi-threaded model for Oracle on Linux/Unix Markus Flechtner Senior Consultant Flechtner_Oracle_12c_multi_process_multi_t hreaded.pptx
  • 2. Our company. Oracle 12c: Multi Process Multi Threaded3 12/24/16 Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: Trivadis Services takes over the interactive operation of your IT systems. O P E R A T I O N
  • 3. COPENHAGEN MUNICH LAUSANNE BERN ZURICH BRUGG GENEVA HAMBURG DÜSSELDORF FRANKFURT STUTTGART FREIBURG BASLE VIENNA With over 600 specialists and IT experts in your region. Oracle 12c: Multi Process Multi Threaded4 12/24/16 14 Trivadis branches and more than 600 employees 200 Service Level Agreements Over 4,000 training participants Research and development budget: CHF 5.0 / EUR 4 million Financially self-supporting and sustainably profitable Experience from more than 1,900 projects per year at over 800 customers
  • 4. About Markus Flechtner Senior Consultant, Trivadis, Duesseldorf/Germany, since April 2008 Discipline Infrastructure Database @Trivadis Working with Oracle since the 1990’s – Development (Forms, Reports, PL/SQL) – Support – Database Administration Focus – Oracle Real Application Clusters – Database Migration Projects Teacher – O-RAC – Oracle Real Application Clusters – O-NF12CDBA – Oracle 12c New Features for the DBA Blog: http://markusdba.de/ @markusdba Oracle 12c: Multi Process Multi Threaded5 12/24/16
  • 5. Agenda Oracle 12c: Multi Process Multi Threaded6 12/24/16 1. The problem & existing solutions 2. New in Oracle Database 12c: THREADED_EXECUTION 3. Architecture 4. Performance 5. Threaded Execution in the daily DBA business 6. Pros & Cons
  • 6. Oracle 12c: Multi Process Multi Threaded7 12/24/16 The problem & existing solutions
  • 7. The problem & existing solutions (1) Oracle 12c: Multi Process Multi Threaded8 12/24/16 In the dedicated server achitecture on Unix/Linux: – every client session has got its own server process – these processes need memory and processor time – there are many context switches Many applications – Keep database sessions open and rarely execute SQL statements Result – Overhead on the database server – Waste of system resources
  • 8. The problem & existing solutions (2) Oracle 12c: Multi Process Multi Threaded9 12/24/16 Existing solutions – Shared Server (Multithreaded Server) – Database Resident Connection Pooling (DRCP) è not for all applications – Universal Connection Pool (UCP) – Connection Pools in general (Application Server) All these solutions affect client sessions only
  • 9. The problem & existing solutions (3) Oracle 12c: Multi Process Multi Threaded10 12/24/16 Overview on existing solutions • From Oracle Database 12c Administrators Guide © Oracle Corporation
  • 10. The problem & existing solutions (4) Oracle 12c: Multi Process Multi Threaded11 12/24/16 The “Multithreaded Oracle Process Model” does not replace these solutions but is a new method to reduce the resource consumption of a database instance on a Linux/Unix database server.
  • 11. Oracle 12c: Multi Process Multi Threaded12 12/24/16 New in Oracle Database 12c: THREADED_EXECUTION "Multithreaded Oracle Process Model"
  • 12. Processes vs. Threads Oracle 12c: Multi Process Multi Threaded13 12/24/16 Process – A process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently Threads – A thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler .. Source: Wikipedia (http://en.wikipedia.org) Process Thread 1 Thread 2
  • 13. Multithreaded Oracle Process Model (1) Oracle 12c: Multi Process Multi Threaded14 12/24/16 The “Multithreaded Oracle Process Model” on Unix/Linux enables the database instance to run instance processes as operating system threads – Similar to Oracle on Windows – No additional license costs; works on SE1, SE2, SE and EE Configuration: – Restart the instance – Result: (most) background processes and local connections run as OS threads ALTER SYSTEM SET threaded_execution=TRUE SCOPE=spfile SID='*'
  • 14. Multithreaded Oracle Process Model (2) Oracle 12c: Multi Process Multi Threaded15 12/24/16 For remote clients which connect via Oracle Net a parameter for the listener must be set in the listener.ora file: – Restart the listener afterwards If you want to run remote clients in threaded and non-threaded mode, a second listener is required – Different port and/or host name resp. IP address – DEDICATED_THROUGH_BROKER_<new_listener>=OFF (default) DEDICATED_THROUGH_BROKER_<listener_name>=ON
  • 15. Multithreaded Oracle Process Model (3) – DB Connect Oracle 12c: Multi Process Multi Threaded16 12/24/16 Conn.Broker (Thread) SGA LISTENER ➊ ➍ ➎ ➋ ➌ Thread for DB Session
  • 16. Oracle 12c: Multi Process Multi Threaded17 12/24/16 Architecture
  • 17. Architecture (1) - Processes Oracle 12c: Multi Process Multi Threaded18 12/24/16 Process list of an Oracle instance with THREADED_EXECUTION “Threaded Sessions” are “hidden” in the "ora_u<nnn>_<SID>“-processes oracle@te:~/ [TEST] ps –ef |grep $ORACLE_SID oracle 6593 1 0 10:02 ? 00:00:00 ora_pmon_TEST oracle 6595 1 0 10:02 ? 00:00:00 ora_psp0_TEST oracle 6597 1 14 10:02 ? 00:00:03 ora_vktm_TEST oracle 6601 1 23 10:02 ? 00:00:05 ora_u004_TEST oracle 6607 1 99 10:02 ? 00:00:22 ora_u005_TEST oracle 6613 1 0 10:02 ? 00:00:00 ora_dbw0_TEST
  • 18. Architecture (2) - Processes Oracle 12c: Multi Process Multi Threaded19 12/24/16 oracle@te:~/ [TEST] ps –ef |grep ora_u00 oracle 31220 1 2 21:18 ? 00:00:03 ora_u004_TEST oracle 31226 1 11 21:18 ? 00:00:13 ora_u005_TEST oracle@te:~/ [TEST] pidstat -t -p 31220 Linux 3.8.13-26.2.1.el6uek.x86_64 (te.markusflechtner.vm) 03/22/2014 _x86_64_ (4 CPU) 09:20:45 PM TGID TID %usr %system %guest %CPU CPU Command 09:20:45 PM 31220 - 0.01 0.01 0.00 0.02 3 ora_scmn_test 09:20:45 PM - 31220 0.00 0.00 0.00 0.00 3 |__ora_scmn_test 09:20:45 PM - 31221 0.00 0.00 0.00 0.00 1 |__oracle 09:20:45 PM - 31222 0.00 0.00 0.00 0.00 0 |__ora_gen0_test 09:20:45 PM - 31223 0.00 0.00 0.00 0.00 2 |__ora_mman_test 09:20:45 PM - 31229 0.00 0.00 0.00 0.00 3 |__ora_dbrm_test 09:20:45 PM - 31233 0.00 0.00 0.00 0.00 1 |__ora_lgwr_test 09:20:45 PM - 31234 0.00 0.00 0.00 0.00 0 |__ora_ckpt_test 09:20:45 PM - 31235 0.00 0.00 0.00 0.00 3 |__ora_lg00_test 09:20:45 PM - 31236 0.00 0.00 0.00 0.00 3 |__ora_smon_test 09:20:45 PM - 31237 0.00 0.00 0.00 0.00 2 |__ora_lg01_test 09:20:45 PM - 31239 0.00 0.00 0.00 0.00 3 |__ora_lreg_test
  • 19. Architecture (3) – V$PROCESS Oracle 12c: Multi Process Multi Threaded20 12/24/16 SQL> select spid,stid,execution_type,pname from v$process 2 where spid is not null and (execution_type=‘PROCESS’ or pname in 3 ('PMON','SMON','DBW0','PSP0','VKTM','MMON','RECO','LGWR',’SCMN’)); SPID STID EXECUTION_ PNAME ------------------------ ------------------------ ---------- ----- 6593 6593 PROCESS PMON 6595 6595 PROCESS PSP0 6597 6597 PROCESS VKTM 6601 6614 THREAD LGWR 6601 6601 THREAD SCMN 6601 6618 THREAD SMON 6607 6621 THREAD MMON 6607 6607 THREAD SCMN 6607 6619 THREAD RECO 6613 6613 PROCESS DBW0
  • 20. Architecture (4) Oracle 12c: Multi Process Multi Threaded21 12/24/16 The “SCMN”-Thread is the “thread listener” or “thread coordinator” within the process The threaded sessions remain “dedicated server” sessions: PGA is allocated from the shared pool (like with “Shared Server") SQL> select p.execution_type,s.server,count(*) 2 from v$process p,v$session s 3 where s.paddr=p.addr 4 group by p.execution_type,s.server; EXECUTION_ SERVER COUNT(*) ---------- --------- ---------- THREAD DEDICATED 38 PROCESS DEDICATED 4
  • 21. Architecture (5) Oracle 12c: Multi Process Multi Threaded22 12/24/16 Ora_uNNN processes are terminated after beeing idle for 30 seconds Every threaded session needs a processes slot (=> Parameter PROCESSES) (è TNS-12602 “Connection pooling limit reached.”)
  • 22. Architecture (6) – Memory Consumption Oracle 12c: Multi Process Multi Threaded23 12/24/16 In average: 18% less memory consumption with „THREADED_EXECUTION“
  • 23. Architecture (7) – Connection Broker Oracle 12c: Multi Process Multi Threaded24 12/24/16 Threaded Execution requires a Connection Broker The new parameter CONNECTION_BROKERS is set automatically when THREADED_EXECUTION=TRUE SQL> show parameter connection_brokers NAME TYPE VALUE ------------------ ------- ---------------------------------------- connection_brokers string ((TYPE=DEDICATED)(BROKERS=1)), ((TYPE=EMON)(BROKERS=1))
  • 24. Architecture (8) – Connection Broker & Listener Oracle 12c: Multi Process Multi Threaded25 12/24/16 lsnrctl services [..] Service "TEST.markusflechtner.vm" has 1 instance(s). Instance "TEST", status READY, has 2 handler(s) for this service... Handler(s): "N000" established:1 refused:0 state:ready CMON <machine: te.markusflechtner.vm, pid: 1649_1668> (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=34848)) "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER [..]
  • 25. Architecture (9) – Connection Broker & Listener Oracle 12c: Multi Process Multi Threaded26 12/24/16 oracle@te:~/ [TEST] ps –ef |grep 1649 oracle 1649 1 9 19:24 ? 00:05:12 ora_u005_TEST SQL> select spid,stid,pname,execution_type from v$process 2 where spid=1649 and stid=1668; SPID STID PNAME EXECUTION_TYPE ---------------- ---------------- ----- -------------- 1649 1668 N000 THREAD
  • 26. Architecture (10) - Miscellaneous Oracle 12c: Multi Process Multi Threaded27 12/24/16 Threaded Execution & CPU usage – No essential difference to "Non-Threaded-Execution" Threaded Execution & Connect Time – No essential difference to "Non-Threaded-Execution" Threaded Execution on Windows – The parameter has no effect Multitenant Databases – An OS process can contain sessions of multiple PDBs
  • 27. Oracle 12c: Multi Process Multi Threaded28 12/24/16 Performance
  • 28. Performance (1) – Test Environment Oracle 12c: Multi Process Multi Threaded29 12/24/16 Host – Notebook Lenovo W510 / 32 GB RAM / SSD – Oracle Linux 6.5 Virtual Server (VirtualBox) – 16 GB RAM Oracle Database – Oracle 12.1.0.1 – 6000M SGA / 2000M PGA – Non-CDB-Architecture
  • 29. Performance (2) – Test with Swingbench Oracle 12c: Multi Process Multi Threaded30 12/24/16 Test Software – Swingbench 2.5.0.99 (www.dominicgiles.com) – 3 tests with 50 - 900 sessions, average of transactions per second
  • 30. Performance (3) - Results Oracle 12c: Multi Process Multi Threaded31 12/24/16
  • 31. Performance (4) – Other tests Oracle 12c: Multi Process Multi Threaded32 12/24/16 Oracle presentation on „Real Application Testing": – 5% better performance with THREADED_EXECUTION Thomas Bordeau: http://blog.arkzoyd.com/2014/01/17/oracle-multithreaded-does-it-worth- a-try/ – Another test with SwingbenchJ Overall result: èBetter performance èBetter scalability
  • 32. Oracle 12c: Multi Process Multi Threaded33 12/24/16 Threaded Execution in the daily DBA business
  • 33. OS Authentication (1) Oracle 12c: Multi Process Multi Threaded34 12/24/16 OS authentication is not supported with threaded execution – è ORA-1017 invalid username .. – Password File required – è Startup/Shutdown scripts have to be changed Some Oracle tools require "Non-Threaded Execution" – dbca – dbua – datapatch
  • 34. OS Authentication (2) - Workaround Oracle 12c: Multi Process Multi Threaded35 12/24/16 Store the password in a wallet In short (see MOS-Note 340559.1 for details) # create wallet mkstore -wrl <wallet_location> -create # add db authentication information mkstore -wrl <wallet_location> -createCredential <db_connect_string> <username> <password> # add the following lines to sqlnet.ora WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = <wallet_location_directory>))) SQLNET.WALLET_OVERRIDE = TRUE Connect to the DB using sqlplus sys/@<DB_Connect_String>
  • 35. OS Authentication (3) – Other workarounds Oracle 12c: Multi Process Multi Threaded36 12/24/16 sqlplus /@"(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGS='(ADDRESS=(PROTOCOL=BEQ))' ))" AS SYSDBA # the way the clusterware agent connects to the instance sqlplus /@"(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u00/app/oracle/product/12 .1.0.2/bin/oracle)(ARGV0=oracleGG03)(ENVS='ORACLE_HOME=/u00/app/oracle/pro duct/12.1.0.2,ORACLE_SID=TEST,LD_LIBRARY_PATH=,ORACLE_BASE=')(ARGS='(DESCR IPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(CONNECT_DATA=(SID=TEST))))" AS SYSDBA
  • 36. SQL Tracing Oracle 12c: Multi Process Multi Threaded37 12/24/16 What‘s the name of the trace file? è The filename contains SPID and STID SQL> select spid,stid,execution_type,tracefile from v$process; SPID STID E_TYPE TRACEFILE ----- ----- ------- ------------------------------------------------------------------ NONE /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_ora_0.trc 6961 6961 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_pmon_6961.trc 6963 6963 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_psp0_6963.trc 6965 6965 PROCESS /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_vktm_6965.trc 6969 6971 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_gen0_6969_6971.trc 6969 6969 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_scmn_6969_6969.trc 6969 6972 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_mman_6969_6972.trc 6975 7000 THREAD /u00/app/oracle/diag/rdbms/test/TEST/trace/TEST_ora_6975_7000.trc ..
  • 37. How to kill database sessions? Oracle 12c: Multi Process Multi Threaded38 12/24/16 As usual, sessions are identified via SID and SERIAL# in V$SESSION Kill on database/instance level works fine: But „kill -9 <spid>“ on OS level is not a good idea L A thread cannot be killled from without the corresponding OS process „kill -6 <stid>“ (SIGABRT) can help – è find out the thread id via V$PROCESS or „pidstat“ – è execute „kill -6 <stid>“ ALTER SYSTEM KILL SESSION ‘<sid>,<serial#>‘;
  • 38. Oracle 12c: Multi Process Multi Threaded39 12/24/16 Pros & Cons
  • 39. Pros & Cons - Pro Oracle 12c: Multi Process Multi Threaded40 12/24/16 Easy setup Reduced memory consumption Reduced number of processes on OS level – è less context switches Performance – Equal or better than "non-threaded execution“ Scalability – Equal or better than „non-threaded execution“ Statements regarding performance and scalability have to be verified in each individual case! Test Threaded Execution with your application before you use it!
  • 40. Pros & Cons - Con Oracle 12c: Multi Process Multi Threaded41 12/24/16 Missing OS authentication – Scripts have to be changed „kill -9“ does not work srvctl (RAC) does not work – Unpublished bug
  • 41. Summary Oracle 12c: Multi Process Multi Threaded42 12/24/16 There‘s not much information from Oracle on this feature It is not really clear, why Oracle introduced this feature There is no experience from customer projects so far, but if you accept the disadvantages (missing OS authentication, killing sessions on OS level), the „Multithreaded Multi Threaded“-model can make sense, if – Your application does not support connection pools – Your database is low on memory But „Threaded execution“ cannot replace connection pools
  • 42. Oracle 12c: Multi Process Multi Threaded43 12/24/16 §MOS-Note 1639445.1: 12c: Threaded_execution=true Prevents OS Login As Sysdba §MOS-Note 1958348.1: Multi-Threaded Oracle Model §MOS-Note 340559.1: „Using The Secure External Password Store“ §Oracle Presentation „Maximizing Database Performance Using Database Replay“ §http://blog.arkzoyd.com/2014/01/17/oracle-multithreaded-does-it-worth-a-try/ §http://dbwhisperer.wordpress.com/2013/10/04/multi-threaded-oracle-12c-Architektur-on-linux-2/ Further Information
  • 43. Questions and Answers Markus Flechtner Senior Consultant Phone +49 211 5866 6470 Markus.Flechtner@Trivadis.com @markusdba http://markusdba.de Download the slides from http://www.slideshare.net/markusdba Please don‘t forget the session evaluation – Thank you! 12/24/16 Oracle 12c: Multi Process Multi Threaded44