Use connection pool
Let's take a look at the sqlconnection string parameters of ado.net.
We have set the maximum and minimum pools. How can we see the differences between Windows app and web appp?
We can create a web application or Windows app. After the app is enabled, you can use sp_who2 in the SQL analyzer to view the connected client, obviously, if a web application or Windows app starts n connections each time a client starts, it is much larger
Pool technology can significantly optimize the performance of server applications, improve program execution efficiency and reduce system resource overhead. The pool described here is a generalized pool, such as database connection pool, thread pool, memory
, yes, it's really good in a program that doesn't have many threads, and if there's a lot of places in the program that require a lot of threading to handle tasks, then if you're going to create threading in the same way , then the performance of the system will be very bad, let alone in memory-constrained mobile devices, the main impact is as follows:1、线程的创建和销毁都需要时间,当有大量的线程创建和销毁时,那么这些时间的消耗则比较明显,将导致性能上的缺失2、大量的线程创建、执行和销毁是非常耗cpu和内存的,这样将直接影响系统的吞吐量,导致性能急剧下降,如果内存资源占用的比较多,还很可能造成OOM3、大量的线程的创建和销毁很容易导致GC
I went to the interview today and met a question about the database connection pool, which is clearly something that is often used. But after I shut down my computer and book, I found many things I still cannot tell clearly, I have specially reproduced this article to supplement it.
Basic working principle of Connection Pool
1. Basic Concepts and Principles
From the above analysis, we can see that the root
Java Multithreading Series--"Juc thread pool" 04 thread pool principle (iii)This chapter describes the life cycle of the thread pool. In the Java Multithreading Series-Basic concepts of 01, we've introduced threads in 5 states: New state, ready state, running state, blocking state, dead state. The thread pool also has
Implementation of simple thread pool in Linux
Technical Background of Thread Pool
In object-oriented programming, it takes a lot of time to create and destroy objects, because creating an object requires obtaining memory resources or other resources. Even more so in Java, virtual machines will try to track every object so that garbage collection can be performed after the object is destroyed. Therefore, one
Basic use of Java Thread Pool
Threads play an important role in both Java Development and Android development. Today we will talk about the thread pool.
I. Thread Pool Overview
In Android development, we often put a time-consuming task in a thread for execution to avoid ANR exceptions. However, if we enable multithreading on a page and the thread finishes execu
Java self-made Thread Pool
Personal blog: www.zarezone.cn
No comments for java self-made Thread Pool
1. Introduction
1. Thread Pool
. Thread Pool Function
1. 3. Advantages of Thread Pool
1.4.JDK built-in Thread Pool
Abstract This article introduces the working principle of the JDBC-based database connection pool, describes the transaction processing and multi-database servers of the connection pool technology.
Various key technologies propose an efficient connection pool management policy. At last, the specific implementation process of the database connection
1. For the ASP. NET database connection pool, you can use a group of name-value pairs to configure the connection pool as a link string. For example, you can configure whether the pool is valid (which is valid by default). The maximum and minimum capacity of the pool is used for the time when the queued requests that o
without consideration. For example, too many connections may also cause memory leakage and server crash.
How database connection pool works
1. Basic Concepts and Principles
From the above analysis, we can see that the root cause of the problem is the inefficient management of database connection resources. We know that,
There is a well-known design pattern for shared resources: Resource Pool ). This mode i
Definition
What is a thread pool? To put it simply, the thread pool is a bunch of threads that have already been created. Initially, they are all in the idle waiting state. When a new task needs to be processed, take an idle waiting thread from this pool to process the task. When the processing is complete, the thread is put back into the
I 've been watching nginx over the past few days and found that pool exists in all the places where I have memory application. Let's take a closer look. The original pool type is ngx_pool_t, which is used by nginx for memory management, so I decided to look at his implementation.
1 nginx memory pool-related struct
Ngx_pool_t is defined in core/ngx_palloc.h ngx_pa
1. Introduction to shared pool:The location, parts, and functions of the Shared Pool;Ii. Set and view the shared pool size:In 9i, we use the Shared_pool_size parameter to set the size of the Shared Pool. Let's talk about the setting in 10 Gb. In 9i or 10g, the value of Shared_pool_size does not necessarily represent the true size of the Shared
In Java development, sometimes encountered multi-threading development, directly using the thread operation, the performance and maintenance of the program is a problem, using the Java provided by the thread pool to operate can be a good solution to the problem.The disadvantage of new threadPerform an asynchronous task are you still just following the new thread?New Thread (New Runnable () { @Override public void Run () { //todo auto-ge
Transferred from: http://blog.csdn.net/lmh12506/article/details/7753952Some time ago on GitHub opened a library, ready to implement their own thread pool, because the change of work, has not been achieved, refer to this article is ready to start to achieve.When do I need to create a thread pool? Simply put, if an application needs to create and destroy threads frequently, and the task executes in a very sho
1. Why does it take a lot of time to create and initialize new objects using the object pool technology. In the initialization of such objects, if you rely on rpc Remote calls to create objects, such as connecting to remote service resources through socket or http, the most typical is the database service and RemoteQueue ), establish a connection
1. Why does it take a lot of time to create and initialize new objects using the object
Tags: des blog http os using IO strong file forTransferred from: http://blog.csdn.net/wyzxg/article/details/7700394MySQL official website configuration description Address: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.htmlOther references:"High performance MySQL"-8.4.5 innodb buffer poolMySQL Technology insider InnoDB Storage Engine (second edition content updated)-2.3 InnoDB Architecture##############################################The book is to explain the background thread first,
Label:InnoDB maintains a cache of data and index information to the memory of the storage area called buffer pool, which caches the most recently accessed data. By configuring the parameters of each buffer pool, we can significantly improve the performance of MySQL. InnoDB buffer pool is based on the LRU algorithm, we can easily understand the following LRU algor
Introducing the drawbacks of new thread and the use of Java four thread pools are also applicable to Android. This article is a basic article and will share some of the advanced features of the thread pool later.1. The disadvantage of new threadPerform an asynchronous task are you still just following the new thread?New Thread (New Runnable () {@Overridepublic void Run () {//TODO auto-generated Method stub}}). Start ();Then you are out too much, and t
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.