db server limits process sessions db server limits
play

DB server limits (process/sessions) DB server limits - PowerPoint PPT Presentation

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


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

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

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

  4. DB server limits (process/sessions) 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 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 Session : Is a specific connection of a user to an Oracle Database instance through a user process. C Connection : Is a communication pathway between a user I i i h b process and an Oracle Database instance.

  5. DB server limits (process/sessions) DB server limits (process/sessions) -relevant server parameters- Server parameter on oracle Processes parameter: 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.

  6. DB server limits (process/sessions) DB server limits (process/sessions) - Resource limits- Resource limits Mechanism implemented by Oracle to prevent uncontrolled 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.

  7. DB server limits (process/sessions) 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: Wh th i h th i idl ti li it 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 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 y session/user resource limit.

  8. DB server limits (process/sessions) DB server limits (process/sessions) - Resource limits- • Session limit When a user exceeds resource limit: – The current statement is terminated (roll back) 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 Limits the CPU time for each call and the total amount of CPU time used for Oracle calls during a session.

  9. DB server limits (process/sessions) 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. profile 1 Idle time Concurrent Reads/Session Sessions Sessions User A, B Private USER PROFILE SGA SGA Connect time Connect time 1 CPU/CALL profile 2 CPU/ session Composite Composite U User C, D C D M Max CPU CPU limit

  10. DB server limits (process/sessions) 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. 4 GB RAM 2GB SGA > ill b d t 10GB -64-bit architecture. Storage: SATA storage array. 9 disks to ASM. Served over FC connections Served over FC connections.

  11. DB server limits (process/sessions) 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; 2 0

  12. DB server limits (process/sessions) 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. p , pp p Every resource limit enforced needs to be setup carefully. Concurrent session per user: Depends on initialization server parameter session. p p 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 enough slots for database process and sys operations. Example: BNL TRIUMF Concurrent sessions per user=3500 Concurrent sessions per user=600 SESSIONS=6605 SESSIONS 6605 SESSION= 885 SESSION 885 PROCESS=6000 PROCESS=800 pga_aggregate_target=3.23GB pga_aggregate_target=1GB

  13. DB server limits (process/sessions) DB server limits (process/sessions) -profiles implementation- MAX IDLE TIME: -Like the other parameters depends on the application access pattern to the database. Example: BNL TRIUMF Max idle time = 4 hours Max idle time = 30 minutes Sniped sessions: Sessions that timed out but were not cleaned properly. p p y 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.

  14. DB server limits (process/sessions) 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: https://twiki.cern.ch/twiki/bin/view/PSSGroup/KillingSnipedSession htt //t iki h/t iki/bi / i /PSSG /Killi S i dS i Thanks to Dawid Wocjik for providing this script.

  15. 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 sessions concurrently without affecting the normal operation of database and stream replication process.

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

  17. Bibliography Oracle Database 1 0 g Real Application Clusters Handbook, McGraw Hill Osborne Media; 1 edition (November 22, 2006) Online documentation Oracle database concepts 10. 2 http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm htt //d l d l /d / d/B19306 01/ 102/b14220/t ht 3D Twiki documentation https://twiki.cern.ch/twiki/bin/view/PSSGroupStreamsConfigurationChecklist p p g

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

  19. BACKUP SLIDES

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

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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend