Shared Memory ASE Internal Threads
Transcription
Shared Memory ASE Internal Threads
Interfaces File model Template database ASTC Handler(s) sybsystemdb Two-phase Commit D D Separate data and log devices Log Data sybsecurity ASE Audit C LRU HK GC tempdbs, on separate data & log devices. On file systems with dsync false Log Data Additional tempdbs 4K Disk Hot local or remote compressed backups. Password protected. Crossplatform dump and load capability Backup Server Tape Checks and synchronizes licensing information with License Server License Heartbeat License Server User 1 User 1 thread initiates “group commit” and flushes the Log Cache In Asynchronous log service it flushes the Log Cache to disk Log Writer * In Asynchronous log service, it flushes the User Log Cache to the Log Cache PLC Flusher * picks up replicated data Rep Agent * * indicates optional setup To another ASE Checks periodically for deadlocks Deadlock Tune Transportable databases Disk mirroring. Handles ASE specific mirroring Mirror Handler Log User databases are built on separate data and log devices. Databases can share multiple devices and a device can have fragments from multiple databases syslogs Data1 Data1 Performs periodic checkpoints User Databases Main ASE checkpoint process. Shutdown Checkpoint Worker(s) Data Cache Overhead ASE Static Overhead Spare Capacity Standby Engine(s) Standby Engines Offline Engines Mich Talebzadeh [email protected] Version 3, Jan 2006 Free Memory User N Log Cache User 1 Log Cache CPUs Checkpoint Sleep Pending I/O Log LogCache Cache Ol d tra est ns op ac en tio n Syslogshold table (Dynamic) C Spinlock Housekeeper job. Garbage collector, example deleted rows Data tempdb Temporary Work Data1 Area Log HK Wash Housekeeper job. Washes dirty buffers. Runs at CPU idle time Flushes table and account statistics. Handles timeout of detached transactions sybsystemprocs device Lock Chains 4K buffer pool * 16K buffer pool * dbccdb Cache * Named Cache * tempdb Cache * D D Wash Marker MRU (fetch-anddiscard) strategy C Buffer ageing default data cache LRU Strategy C Hash Table MRU Partitioned cache Running Task Shared Memory ASE Executable Engine N Registers File Descriptors/channels Data Cache (with default 2K page example) - Process Waiting for I/O - Process Waiting for lock - Process sent to sleep Sleep Queue Task queue cycle 1- Sleep queue 2- Runnable task queue 3- Running (on any Engine) 4- Sleep queue Task Network affinity migration to the least loaded engine 2 Running HK Chores sybsystemprocs System stored procedures System Databases Intra-server cross database two-phase commit ASE recommends raw devices. tempdbs can be on file systems, tmpfs or ramdisks master System Catalogue & MDA Tables There are as many network handler threads as there are ‘master' entries in the interfaces file Enables Dynamically to start and stop listeners on any given port on a per-engine basis Master Device Others - Object Permissions - Column Stats Hash Values ASE Internal Threads Statement Cache Short term memory needs Triggers Cursors Execution Plans - Procedures - Views Procedure Cache Stored procedures Network Handler(s) ASE Config File Runnable Task Queue Fork ASE Executable 3 Operating System Engine 1 Registers File Descriptors/channels 1 Application Server Initial Network Handshake by any engine ASE Internal threads can run on any engine Fork Running Task CPUs Port Manager XP Server ASE Job Scheduler ASE Error log File ASE Run Server File ASE Executable Engine 0 Registers File Descriptors/channels Client PC ULC, One Logical Page each ™ Total Physical Memory (read-only) Sybase Open Client Maximum Memory (Dynamic) Sybase Open Client gy. ty strate rite of dir er /LRU W ark MRU hronous Wash M c e Asyn after th rs buffe