timeout setting in SQL Server

What is the concurrency of the database, I see the definition is: multiple users are using a database at the same time, we can say that the database supports concurrency.

So can I understand that? A Sina application has 200 million concurrent users, which means that Sina's database concurrent volume is 200 million?

 

The concurrency is 200 million. If sort_buffer_size is set to 1M, and read_buffer_size and join_buffer_size are also set to 1M, isn’t that 200 million*3, at least 600 million/1024/=58593.7500(G), then the database is not a total of It needs about 6W of memory, God, even if you use a cluster, a node has 64 G, 68593.75/64=915.52734375, a total of 916 nodes, and nearly a thousand PC servers need to be installed.

How big of a computer room does it need to store so many database servers?

 

There are a few more applications like this, and how much money does it cost to purchase and maintain a PC server machine? No wonder there is a popular saying in the IT world that high performance is all piled up by money!

I myself feel that my understanding is relatively shallow, everyone is welcome to give pointers!

 

The number of concurrent databases we do is different from the number of people online.

For example, if a user performs a database operation every 100 seconds on average, then if you call 200 million people online, the database concurrency is 200W per second. This obviously requires a distributed system to achieve.

In fact, you asked a good question about how many concurrent operations the database can handle per second. It is estimated that there are not many people who have actually tested it.

I measured more than 400 write operations last year. Of course, it depends on your server performance. It is said in the industry that it can achieve 500-1000.

 

timeout setting in SQL Server

In the last article, we summarized the timeout-related settings in SharePoint. In the article, we said that the options on the SQL side will not have any effect. Why do you say that?

This part of the author was also dizzy. So I went to consult Peter, a senior senior technical support engineer of SQL, and got the following answer.

1. The timeouts related to SQL are all initiated by the client.

For example, we wrote a C# applet ourselves, which used the SqlCommand.CommandTimeout property and specified its value as 20 seconds. Then, when the query is executed on the SQL side for twenty seconds, our C# applet will give SQL Server sends a TDS Tension packet, telling SQL Server that my side has timed out, and you don't have to do the query on your side. So SQL responds to the client's request and disconnects the connection. The client side reports an exception, saying that the SQL Server side is running It took too long, beyond our original time limit.

 

2. Then there are two options about Timeout in SQL Server Management Studio, what do they do?

  • a. Tools->Options->Query Exection->Execution time-out.

              image

  • b. Right click SQL Server Node->Properties->Connections->Remote Query Timeout.

              image

 

If we regard Management Studio as a C# program written by ourselves, in this program we only write down the statement to be executed, what about the timeout setting? The value specified by the a option here is SqlCommand.CommandTimeout. It’s easy to understand. ^_ ^

 

Suppose our C# applet connects to SQL Server 1 to run a stored procedure to fetch data. In this stored procedure, SQL Server 1 needs to fetch the original data from SQL Server 2. Then, if the query on SQL Server 2 takes 600 seconds to execute After that (default value), then SQL Server 1 will send to SQL Server 2, telling it I think this query is too long, you don't do it. So SQL Server 1 sends SQL Server 2 a packet, telling it to stop. Then Server 2 disconnects the connection between them.

 

It can be seen that, in general, option b is not very relevant to us.

 

When I was researching these two options, I found that netizens on StackOverFlow.com asked related questions, and the people who answered the questions often gave these two options. In fact, this is wrong. After adjustment, it will not affect the SQL side. The problem of running timeout has been improved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326506087&siteId=291194637