DB server limits (process/sessions) Carlos Fernando Gamboa, BNL Andrew Wong, TRIUMF WLCG Collaboration Workshop, CERN Geneva, April 2008.

Slides:



Advertisements
Similar presentations
Database Tuning. Objectives Describe the roles associated with database tuning. Describe the dependency between tuning in different development phases.
Advertisements

The Architecture of Oracle
Introduction to Oracle
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Oracle Database Instance Management Oracle 10g. Ebtisam Alabdulqader Outline Management Framework. Managing Oracle instance through the Enterprise Manager.
Introduction History The principles of the relational model were first outlined by Dr. E.F Codd in a June 1970 paper is called “A Relational Model of Data.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
IS 4510 – Database Administration Module – 1 Database Architecture 9/14/20141Compiled by: Zafar Iqbal Khan.
BNL Oracle database services status and future plans Carlos Fernando Gamboa RACF Facility Brookhaven National Laboratory, US Distributed Database Operations.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Database Workshop 1 Presented to IBRI CAS 27-Nov-2011 By Abdullah Alkalbani.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
7202ICT – Database Administration
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Anton TopurovIT-DB 23 April 2013 Introduction to Oracle2.
RAC parameter tuning for remote access Carlos Fernando Gamboa, Brookhaven National Lab, US Frederick Luehring, Indiana University, US Distributed Database.
IT Database Administration SECTION 01. Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available.
Atlas LCG 3D Oracle cluster migration strategy at BNL Carlos Fernando Gamboa On behalf of database group Grid Group, RACF Facility, Brookhaven National.
DB Questions and Answers open session Carlos Fernando Gamboa, BNL WLCG Collaboration Workshop, CERN Geneva, April 2008.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
CERN Database Services for the LHC Computing Grid Maria Girone, CERN.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Database CNAF Barbara Martelli Rome, April 4 st 2006.
REMINDER Check in on the COLLABORATE mobile app Best Practices for Oracle on VMware - Deep Dive Darryl Smith Chief Database Architect Distinguished Engineer.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
DB Questions and Answers open session (comments during session) WLCG Collaboration Workshop, CERN Geneva, 24 of April 2008.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Instance and Media Recovery Structures
Introduction of Week 3 Assignment Discussion
Introduction To Oracle 10g
Microsoft SQL Server 2014 for Oracle DBAs Module 2
Introduction.
Oracle Memory Internals
Oracle Architectural Components
Index Index.
Database administration
Presentation transcript:

DB server limits (process/sessions) Carlos Fernando Gamboa, BNL Andrew Wong, TRIUMF WLCG Collaboration Workshop, CERN Geneva, April 2008.

DB server limits (process/sessions) -table of contents- - Overview database resource limits - Overview database profiles - Implementation BNL and TRIUMF - Conclusion

DB server limits (process/sessions) - Dedicated server general process database diagram- SGA Application Code Application Code Oracle Server code Oracle Server Code User A process User B process Dedicated Server process Program Interface Background Processes

DB server limits (process/sessions) -relevant definitions- Some definitions. Process: Is a mechanism in an operating system that can run a series of instructions and has a private memory area in which it runs (Program Global Area). Session: Is a specific connection of a user to an Oracle Database instance through a user process. Connection: Is a communication pathway between a user process and an Oracle Database instance.

DB server limits (process/sessions) -relevant server parameters- Server parameter on oracle Processes parameter: Defines the maximum process an oracle instance can use at the same time. (No dynamic parameter) pga_aggregate_target parameter: Specifies the target aggregate PGA memory available to all server processes attached to the instance Sessions parameter: Define number of session the an oracle instance can establish at the same time. When this parameter is not specifically defined in the parameter file, oracle assigns (1.1*process + 8) sessions.

DB server limits (process/sessions) -Resource limits- Resource limits Mechanism implemented by Oracle to prevent uncontrolled use of system resource. Resources can be controlled at session, call or CPU level. This presentation will focus on process and session resources.

DB server limits (process/sessions) -Resource limits- Resources can be limited via different parameters such as: Concurrent sessions per user: Limits the number of sessions a user can establish at the same time. Idle time for a session When the session reaches the maximum idle time limit: 1. The current transaction is rolled back. 2. The session is aborted. Resources are returned to the system. 3. Next call receives an error that indicates the user is no longer connected to the instance. 4. PMON (Process Monitor) background process cleans up after the session is aborted. Until the session is still counted in any session/user resource limit.

DB server limits (process/sessions) -Resource limits- Session limit When a user exceeds resource limit: –The current statement is terminated (roll back). –Three operations allowed (commit, rollback, disconnect). –A message indicating that the session limit has been reached is sent. CPU resource Time Limits the CPU time for each call and the total amount of CPU time used for Oracle calls during a session.

USER PROFILE 1 DB server limits (process/sessions) -database profiles- Database profiles: The goal is to limit the amount of database resources a user can get access to. Reads/Session Concurrent Sessions Idle time CPU/ session Max CPU profile 1 profile 2 Composite limit User C, D User A, B Connect time CPU/CALL Private SGA

DB server limits (process/sessions) -profiles implementation- BNL 3D Cluster 2 nodes RAC Node description: - 2 dual core 3GHz, 64 bits Architecture (recently upgraded). - 2GB SGA, 16GB RAM (recently upgraded). - Storage : SAS storage array Hardware RAID controller. 24 disks to ASM. Served over FC connections. TRIUMF 3D 2 nodes RAC Node description: -1 dual-core CPU, 1.6 GHz. -4 GB RAM, 2GB SGA --> memory will be upgrade to 10GB. -64-bit architecture. Storage: SATA storage array. 9 disks to ASM. Served over FC connections.

DB server limits (process/sessions) -profiles implementation- Default profile: is used when a user is not explicitly assigned a profile or when a limit of any profile is unspecified. Create the profile. EXAMPLE CERN_APP_PROFILE (3D Conditions database) Application profile-- To be given to application reader and writer accounts CREATE PROFILE cern_app_profile LIMIT FAILED_LOGIN_ATTEMPTS 10 PASSWORD_LOCK_TIME 1/1440 PASSWORD_LIFE_TIME UNLIMITED SESSIONS_PER_USER 7000 IDLE_TIME 240;

DB server limits (process/sessions) -profiles implementation- 2. Enforce limits through pfile parameter resource_limit = TRUE 3. Tune up the limits based on cluster database resources, user/application access pattern. Every resource limit enforced needs to be setup carefully. Concurrent session per user: Depends on initialization server parameter session. S ession parameter : - In a dedicated server each session connects to a specific database process. - Make sure this parameter is smaller than the session server parameter. Leave enough slots for database process and sys operations. Example: BNLTRIUMF Concurrent sessions per user=3500 Concurrent sessions per user=600 SESSIONS=6605 SESSION= 885 PROCESS=6000 PROCESS=800 pga_aggregate_target=3.23GB pga_aggregate_target=1GB

DB server limits (process/sessions) -profiles implementation- MAX IDLE TIME: -Like the other parameters depends on the application access pattern to the database. Example: BNLTRIUMF Max idle time = 4 hours Max idle time = 30 minutes Sniped sessions: Sessions that timed out but were not cleaned properly. To clean up the OS system it was necessary to implement a script to find sessions marked as sniped and then kill the OS processes associated with them.

DB server limits (process/sessions) -snipe sessions- Example BNL and TRIUMF implemented the scrip every hour. Instructions to implement the clean up script can be found in: Thanks to Dawid Wocjik for providing this script.

DB server limits (process/sessions) On M5 recent reconstruction test at BNL conditions database demonstrated that could sustain 1900 sessions concurrently without affecting the normal operation of database and stream replication process.

DB server limits (process/sessions) - Conclusion - - Overview to resource limits and profiles was presented. -Appropriate user profile benefits the overall database performance.

Bibliography Oracle Database 10g Real Application Clusters Handbook, McGraw Hill Osborne Media; 1 edition (November 22, 2006) Online documentation Oracle database concepts D Twiki documentation

Acknowledgements Many thanks to: –CERN IT PSS GROUP –Atlas DBAs PH/ATP-CO Group

BACKUP SLIDES

Server Monitor (SMON) Oracle single instance manager DATAFILES Control Files Redo log Files Redo log Files Checkpoint (CKPT) Process Monitor (PMON) Database Writer (DBWn) LogWriter (LGWR) Archiver (ARCn) Archive log Files Shared pool Java pool Streams pool Database buffer cache Redo log buffer Large pool SYSTEM GLOBAL AREA (SGA) SERVER PROCESS PGA

Oracle cluster architecture SGA Redo log Files Redo log Files Database Writer (DBWn) LogWriter (LGWR) Database Writer (DBWn) LogWriter (LGWR) Redo log Files Redo log Files DATAFILES High Speed Interconnect GLOBAL CACHE SERVICE (GCS) GLOBAL CACHE SERVICE (GCS) Node1 Node 2 Cluster Manager