Connection mode: A shortcut to improve database performance

Source: Internet
Author: User
Tags connection pooling memory usage requires dedicated server server memory oracle database

One, shared server mode.

Shared server mode, also known as multithreaded server mode. In this mode, the Oracle database allows multiple user processes to share very few server processes. As a result, the number of concurrent visits that can be implemented simultaneously is greatly increased. If you are using a dedicated server mode, each user process requires his own dedicated server process when the database is connected. In other words, the client process is one by one corresponding to the server-side process.

If the shared server mode is used, then multiple users can share a server process, that is, the client process and the server process are more than one. This is done mainly through the scheduler. The scheduler directs multiple join database access session requests to a common queue. One of the idle shared server processes in the server process share pool obtains a request from the queue in turn. In other words, a very small server process sharing pool can serve a large number of clients.

The pros and cons of a shared server can be summed up in two words. The advantage is that the client process is many-to-many, increasing the number of users the database can support. The disadvantage is that each user shares a process that has an impact on the user's ability to access the database.

Specifically, in the following application scenarios, you can choose to adopt a shared server model.

1, the number of front-end clients more.

When a large number of users need to connect to the database and need to effectively use the available system resources, you need to consider a shared server model. Specifically, some of the client/server-side network applications, such as ERP systems, are being used. On the one hand because the number of users is more, on the other hand, the enterprise because of limited funds, so the acquisition of a general server. These servers are limited by hardware, such as the use of a unified server between the database system and the foreground application server. Therefore, the database is often required to make full use of hardware resources to reduce the conflict between the two.

In this case, the shared server model is often used, which is more appropriate.

2, the server memory limit is relatively large.

In shared server mode, when connected users increase, their memory usage does not increase much. Because they share a server process. So, from this point of view, shared server mode can reduce the use of memory. However, in dedicated server mode, the use of memory is almost proportional to the number of users.

Therefore, if users deploy Oracle databases on some old servers, because their motherboards have limited memory upgrades, the shared server model is often used in order to get a good database performance. In this way, there is an increase in the number of users accessing the database at the same time, and their memory will not be much affected. Can greatly reduce the pressure of memory.

3. Some specific functions require the use of Shared server mode.

Although the shared server model and the dedicated server model are common in most cases, they support most of the functionality of Oracle database systems. However, some specific functionality still requires the database administrator to be enabled in Shared server mode. Typically, such as connection Sharing, connection pooling, and load balancing techniques for Oracle database servers, and more. They must be in shared mode before they can run.

Load balancing is used to implement multiple-machine shared databases in a clustered environment to ensure high availability of applications. At the same time, parallel processing and load sharing can be realized automatically, and the fault tolerant and no breakpoint recovery can be realized in the database. Therefore, in some applications where performance and stability requirements are high, such as in banks, load balancing techniques are often used. At this point, the database administrator needs to consider a shared server model when configuring the database.

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.