Oracle Shared Server (OSS) Notes

Source: Internet
Author: User
Tags dedicated server

Oracle Shared Server (OSS) Notes (zt)
========================================================== ==============================
Tolywang (http://tolywang.itpub.net)
Posted on: 2007.07.19
Category: Oracle Database Management
Source: http://tolywang.itpub.net/post/48/309884
---------------------------------------------------------------

1. Overview:
Dedicated server: each session is assigned a server process, and most sessions are idle, occupying resources.
Process: User process (client) <---> server process <---> SGA
Put the user session data in PGA.

Shared Server: OSS is similar to connection pool, but it is different from the connection pool in Java.
Process: User process (client) ---> dispatcher process --> Request queue --> Shared Server process --> response queue --> dispatcher process --> User process (client ),
Put user session data in SGA. It is best to set large_pool_size to save session data.
Shared server can also create a dedicated server process to configure tnsnames. ora: SERVER = DECICATED, because some operations must use dedicated connections, such:
1. Submitting batch job
2. DBA job
When to use OSS:
-The load of the system running in Dedicated mode is too large.
-Limit of resources

Configure OSS, initSID. ora:
-DISPATCHER = "(PROTOCOL = TCP) (DISPATCHERS = 3)", Dynamic, default NULL
-SHARED_SERVERS = 3, Dynamic, default 0
Optional parameters:
-MAX_DISPATCHERS, static, default 5
-MAX_SHARED_SERVERS, static, default 20 OR 2 * SHARED_SERVERS
-CIRCUITS, static, default SESSIONS or 0
-SHARED_SERVER_SESSIONS, total number of user sessions, static, default: min (CIRCUITS, SESSIONS-5)
-LARGE_POOL_SIZE
Several related views: v $ circuit, v $ shared_server, v $ queue, v $ dispatcher, v $ shared_server_monitor, v $ session

Tuning:
1. dispatchers contention: dispatchers will not automatically adjust according to the system load, must be monitored and manually adjusted,
-Busy rate, view v $ dispatchers, if> 50%, add dispatchers
-Dispatcher waiting time, view v $ queue, v $ dispatchers. If it rises steadily, add dispatchers
2. shared servers: the system can be dynamically adjusted by PMON, but there are limits (SHARED_SERVERS, MAX_SHARED_SERVERS)
View v $ shared_server, v $ queue
3. Monitor process usage, view v $ circuit
-Server address
-Dispatcher address
-User session address

Troubleshooting
1. The listener is not running.
2. Do not kill user process at the operating system level. Replace it with alter system kill session !!!
3. DBA has no dedicated connection
4. If the parameter (INSTANCE_NAME, SERVICE_NAMES, DB_NAME) is not set, automatic instance registration fails.

Tolywang posted at: 2007.07.19: Category: (Oracle Database Management): Read: (315 times): Comment (1): Reference (0) re: oracle Shared Server (OSS) Note (zt) [reply]
Oracle shared server & dedicated server

Oracle shared server applications are generally form-based and involve submitting small data volumes to the database. Therefore, a small result set is returned to the customer. ORACLE manages connections between dedicated servers and shared servers in different ways. In an oracle shared server environment, the scheduler [Dispatcher] process serves customer requests. In a dedicated server environment, a single client process is processed by a single server process.

ORACLE adds two new structures to SGA: Request queue and response queue. These two structures do not exist in the dedicated server environment. Here is one request queue for all dispatchers, but each dispatcher has its own response queue.

Differences between Shared Server SGA and Dedicated server SGA:

Shared Server SGA has large pool and large pool has UGA (user global area)

The PGA is an area of memory where information about each client session is maintained. this information includes des bind variables, cursor information, and the client's sort area. in an Oracle Shared Server environment, this information is moved from the PGA to an area of the SGA called the User Global Area (UGA)

Advantages and disadvantages of oracle shared server:

Advantage: oracle shared server can reduce the total memory and process requirements on the SERVER. Because the customer is sharing the process, the total number of processes is reduced.

Disadvantage: applications that generate a large amount of network communication information or generate large result sets are not suitable candidates for Oracle shared server connection.

One scalability enhancement option for Oracle Shared Server, not a performance enhancement Option

You shoshould not perform certain administrative tasks using Oracle shared server connections, including bulk loads of data, index and table rebuilds, and table analysis. these types of tasks deal with manipulating large data sets and shocould use dedicated connections

By default, if Oracle shared server is configured, a client is connected to a dispatcher unless the client explicitly requests a dedicated connection.

# Tnsnames. ora network configuration file:
# C: oracleproduct10.1.0db _ 1 etworkadmin nsnames. ora
Orcl =
(Description =
(Address = (Protocol = TCP) (host = m000001) (Port = 1521 ))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
(Srvr = dedicated) # request a dedicated connection for DBA
)

If localnaming is used to specify the connection mode in tnsnames, the client can also connect to the Oracle Shared Server in dedicated mode.

Listerner -- dispatcher -- Request queue -- Shared Server process -- response queue

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.