Management shared server

zhaozj2021-02-16  57

Why use a shared server?

For shared servers (MTS), the biggest advantage is that there is no need to create a corresponding private server process for each connection, so the shared server architecture maintains the minimum number of processes required to run instances.

In the Shared Server (MTS), we can also use the network service name configured as a private server (ie, the value of the network service name should include a dedicated server connection in the connection descriptor.

Of course, for the following two cases, the requirements must be connected to the instance using a private server:

1. When using RMAN, you must use a private server to connect to the database.

2. During batch work

Influenced parameters affecting the configuration of the shared server

Dispatcher

This is the parameters that configure the shared server, which indicates the description of the scheduling process that starts running at the time of the system. If you want to use multiple scheduling processes, you need to continuously set multiple Dispatches, for example:

SQL> SELECT NAME, NETWORK AU DISPATCHER;

Name Network

-------------------------------------------------- ------------------------------

SQL> ALTER SESTEM SET Dispatchers = "(ADDRESS = (Protocol = TCP)) (Dispatchers = 3)"

SYSTEM altered

SQL> SELECT NAME, NETWORK AU DISPATCHER;

Name Network

-------------------------------------------------- ------------------------------

D000 (Address = (Protocol = TCP) (Host = 127.0.0.1) (port = 1094))

D001 (Protocol = TCP) (Host = 127.0.0.1) (port = 1095))

D002 (Protocol = TCP) (Host = 127.0.0.1) (port = 1096))

SQL>

Use this parameter setting that will start three scheduling processes, which will be listened to this IP address. Note The IP specified in the Host option must be a valid IP that actually exists.

This parameter can use the ALTER SYSTEM SET Dispatcher command dynamic modification, which can be added by the number of DISPATCHERSs by the parameter Max_Dispatchers. E.g:

Alter System Set Dispatcher

= '(Protocol = tcp) (Dispatchers = 5) (INDEX = 1)';

In this example, the first setting tells the database to modify the settings of the 2nd DispatChers in the parameter file, so that the TCP / IP protocol uses 5 DispatChers, if the current scheduling process is less than 5, then the system will increase the schedule process to 5, if the current scheduling process is greater than 5, then the system cannot immediately delete the extra mobilization process, and Oracle can only reduce the number of DispatChers to 5 after the user is disconnected.

The number of DISPATCHERS is too high or too low. It is not conducive to the performance of the system. By querying V $ Queue, V $ Dispatcher, and V $ Dispatcher_Rate, we can determine if you need to increase the schedule process, or need to reduce the schedule process. Usually if the dispatch process is high, adding a new scheduling process may increase performance; if the load is low, the reduction schedule process will improve performance. For most applications, all of 1000 connections are allocated a Dispatcher. Max_dispatcher

Specifies the maximum number of scheduling processes in the system, this parameter is a static parameter, the default is 5.

Shared_servers number

Specifies the number of shared server processes that need to be created when the instance is started. Oracle will dynamically adjust the number of shared server processes based on the length of the request queue, and the number of shared shared servers can be determined by the parameter max_shared_servers.

Shared_servers default is 1, if you do not want to use a shared server structure, you can set this parameter value to 0. This parameter is a dynamic parameter that can be adjusted by the ALTER System command. In general, all 10 connections are allocated a shared server.

This parameter can use the ALTER System SET Shared_serve command dynamic modification, for example:

Alter system set shared_servers = 0;

The above command will terminate all idle shared server processes.

MAX_ Shared_Servers

The maximum number of shared server processes that can run simultaneously in the system, this parameter is static parameters

Circuits

This is a static parameter. If you use the shared server structure, use this parameter to specify the total number of virtual loops that can be utilized when entering and exiting the network session; if the shared server structure is not used, then this parameter is 0.

Shared_server_ssions

Specifies the total number of user sessions allowed in the shared server structure, setting this parameter to retain user sessions for dedicated servers. This is a static parameter, which ranges from 0 to sessions-5.

Large_pool_size

Since in MTS, the UGA needs to be assigned from the LARGE_POOL_SIZE, so you need to specify the value of this parameter as a large value to meet the needs of the application. The too low or too high of this value will affect the performance of the system.

Sessions

Specifies the maximum number of sessions that the system can create. The default value of this parameter is Process * 1.1 5, for example, Process is 150 (default), then the value of sessions is 150 * 1.1 5 = 170.

Monitor shared server

There are nine trying to use the monitoring shared server.

V $ dispatcher

The information about the scheduling process, including the name of Dispatcher, the URL, process address, and status, etc. of Dispatchers.

Column name

type of data

description

Name

VARCHAR2 (4)

Name of the dispatcher process

NetWork

VARCHAR2 (128)

Network address of the dispatcher

Paddr

RAW (4 | 8)

Process Address

STATUS

VARCHAR2 (16)

Status of the dispatcher:

Wait - idle

Send - sending a message

Receive - Receiving a Message

Connect - ESTABLISHING A Connection

Disconnect - Handling A Disconnect Requestbreak - Handling A Break

Terminate - in The Process of Terminating

Accept - Accepting Connections (No Further Information Available)

Refuse - Rejecting Connections (No Further Information Available)

ACCEPT

Varchar2 (3)

Indicates WHETHER THIS DISPATCHER IS Accepting New Connections (YES) OR NOT (NO)

Messages

Number

Number of Messages Processed by the dispatcher

BYTES

Number

Size (in Bytes) of Messages Processed by the dispatcher

Breaks

Number

Number of Breaks Occurring in The Connection

OWNED

Number

Number of circuits OWNED by the dispatcher

Created

Number

Number of circuits created by the dispatcher

Idle

Number

Total IDLE Time for the dispatcher (in hundredths of a second)

Busy

Number

Total Busy Time for the dispatcher (in hundredths of a second)

Listener

Number

MOST RECENT ORACLE Error Number The dispatcher receive from the listner

Conf_indx

Number

Zero-based index of the dispatcher configuration use by the dispatcher

V $ dispatcher_rate

Contains the rate of statistics of the scheduling process.

V $ queue

Contains information about the shared server message queue.

Column name

type of data

description

Paddr

RAW (4 | 8)

Address of The Process That OWNS The Queue

Type

Varchar2 (10)

TYPE OF Queue:

Common - Processed by Servers

Dispatcher

Queued

Number

Number of items in the queue

Wait

Number

Total Time That All Items in this Queue Have Waited (in hundredths of a second). Divide by Totalq for Average Wait Per iTeM.

Totalq

Number

Total Number of Items That Have Ever Been in The Queue

V $ Shared_Server

Contains information about the shared server process.

Column name

type of data

description

Name

VARCHAR2 (4)

Name of the server

Paddr

RAW (4 | 8)

Server's Process ADDRESS

STATUS

VARCHAR2 (16)

Server status:

EXEC - EXECUTING SQL

WAIT (ENQ) - WAITI for a LOCK

Wait (Send) - Waiting to send data to userwait (common) - iDLE; Waiting for a User Request

Wait (Reset) - Waiting for a Circuit To ResetAfter A Break

Quit - Terminating

Messages

Number

Number of Messages Processed

BYTES

Number

Total Number of Bytes in All Messages

Breaks

Number

Number of Breaks

Circuit

RAW (4 | 8)

Address of circuit Currently Being Serviced

Idle

Number

Total IDLE TIME (in Hundredths of A SECOND)

Busy

Number

Total Busy Time (in Hundredths of A Second)

REQUESTS

Number

Total Number of Requests Taken From The Common Queue in this Server's Lifetime

V $ Circuit

Contains information about the virtual loop, which is some user connections that are connected to the database via the scheduler and the server.

Column name

type of data

description

Circuit

RAW (4 | 8)

Circuit Address

Dispatcher

RAW (4 | 8)

Current Dispatcher Process ADDRESS

Server

RAW (4 | 8)

CURRENT Server Process ADDRESS

Waiter

RAW (4 | 8)

Address of Server Process That Is Waiting for The (Currently Busy) Circuit To Become Available

Saddr

RAW (4 | 8)

Address of Session Bound to the Circuit

STATUS

VARCHAR2 (16)

Status of the circuit:

Break - Currently Interrupted

Eof - About to Be Removed

Outbound - An Outward Link to a Remote Database

Normal - Normal Circuit Into The Local Database

Queue

VARCHAR2 (16)

Queue The Circuit Is Currently on:

Common - on the commit queue, waiting to be picked up by a server process

Dispatcher - Waiting for the dispatcher

Server - Currently Being Serviced

None - iDLE Circuit

Message0

Number

SIZE IN BYTES of the Messages in The First Message Buffer

Message1

Number

Size in bytes of the message in the second message buffer

Message2

Number

SIZE IN BYTES of The Messages in The Third Message Buffer

Message3

Number

Size in bytes of the message in the fourth message buffer

Messages

Numbertotal Number of Messages That Have Gone Through this circuit

BYTES

Number

Total Number of Bytes That Have Gone Through this circuit

Breaks

Number

Total Number of Breaks for this circuit

PRESENTATION

VARCHAR2 (16)

The Presentation Protocol Used by the client and server

V $ shared_server_monitor

Contains information for adjusting the shared server process.

Column name

data

Types of

description

MAXIMUM_CONNECTIONS NUMBER Highest number of virtual circuits in use at one time since the instance started. If this value reaches the value set for the CIRCUITS initialization parameter, then consider raising the value of CIRCUITS. MAXIMUM_SESSIONS NUMBER Highest number of shared server sessions in use at one time since the instance started. If this reaches the value set for the SHARED_SERVER_SESSIONS initialization parameter, then consider raising the value of SHARED_SERVER_SESSIONS. SERVERS_STARTED NUMBER Total number of shared servers started since the instance started (but not including those started during startup) SERVERS_TERMINATED NUMBER Total number of shared servers stopped by Oracle since the instance started SERVERS_HIGHWATER NUMBER Highest number of servers running at one time since the instance started. If this value reaches the value set for the MAX_SHARED_SERVERS initialization parameter, then consider raising the value of SHARED_SERVERS.

V $ SGA

Contains statistics of various memory structures in SGA.

Column name

type of data

description

Name

VARCHAR2 (20)

SGA Component Group

Value

Number

Memory size (in Bytes)

V $ SGASTAT

Contains details of various memory structures in the SGA.

Column name

type of data

description

Name

VARCHAR2 (26)

SGA Component Name

BYTES

Number

Memory Size in bytes

Pool

VARCHAR2 (11)

Designates the pool in which the memory in name resides:

Large pool - Memory Is Allocated from the large pool

Shared pool - Memory Is Allocated from the Shared Pooljava Pool - Memory Is Allocated from The Java Pool

V $ shared_pool_reserved

This view uses to adjust the reservoction pool in the shared pool and storage space. This tried information is only available after the initialization parameter sets the shared_pool_reserved_size parameter.

Column name

data

Types of

description

FREE_SPACE NUMBER Total amount of free space on the reserved list AVG_FREE_SIZE NUMBER Average size of the free memory on the reserved list FREE_COUNT NUMBER Number of free pieces of memory on the reserved list MAX_FREE_SIZE NUMBER Size of the largest free piece of memory on the reserved list USED_SPACE NUMBER Total amount of used memory on the reserved list AVG_USED_SIZE NUMBER Average size of the used memory on the reserved list USED_COUNT NUMBER Number of used pieces of memory on the reserved list MAX_USED_SIZE NUMBER size of the largest used piece of memory on the reserved list REQUESTS NUMBER Number of times that the reserved list was searched for a free piece of memory REQUEST_MISSES NUMBER Number of times the reserved list did not have a free piece of memory to satisfy the request, and started flushing objects from the LRU list LAST_MISS_SIZE NUMBER Request size of the Last Request Miss, When The Reserved List Did NOT HAVE A Free Piece of Memory To Satisfy The Request and Starte d flushing objects from the LRU list MAX_MISS_SIZE NUMBER Request size of the largest request miss, when the reserved list did not have a free piece of memory to satisfy the request and started flushing objects from the LRU list The following columns of V $ SHARED_POOL_RESERVED contain values Which Are Valid Even if Shared_Pool_ReServed_size is not set.

REQUEST_FAILURES NUMBER Number of times that no memory was found to satisfy a request (that is, the number of times the error ORA-04031 occurred) LAST_FAILURE_SIZE NUMBER Request size of the last failed request (that is, the request size for the last ORA- 04031 error) ABORTED_REQUEST_THRESHOLD NUMBER Minimum size of a request which signals an ORA-04031 error without flushing objects ABORTED_REQUESTS NUMBER Number of requests that signalled an ORA-04031 error without flushing objects LAST_ABORTED_SIZE NUMBER Last size of the request that returned an ORA-04031 error without FLUSHING Objects from the lru list Close the scheduled process

If you turn off a specified scheduling process, you first need to try to find the dispatch process that you need to close from V $ Dispatcher:

SQL> SELECT NAME, NETWORK AU DISPATCHER;

Name Network

-------------------------------------------------- ------------------------------

D000 (pecol = tcp) (host = lunar) (port = 1040))

SQL>

Then use the alter system command to turn off the scheduling process:

SQL> ALTER SYSTEM Shutdown Immediate 'D000';

SYSTEM altered

SQL> SELECT NAME, NETWORK AU DISPATCHER;

Name Network

-------------------------------------------------- ------------------------------

SQL>

转载请注明原文地址:https://www.9cbs.com/read-17677.html

New Post(0)