Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the impact of CPU resources and available memory size on database performance

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail about the impact of CPU resources and available memory size on database performance. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Introduce

When the hot data exceeds the available memory, the cache layer of the MemCache storage engine is easy to fail (when a large number of caches fail, it is easy to generate a large number of network transmission), thus affecting the performance of the server.

When there are bottlenecks in this kind of Istroke O system, we need to upgrade the Imax O subsystem to increase more memory. Network and Iamp O resources are the second hardware factor that affects the performance of our database.

CPU selection

Purchasing staff will often ask us for advice on what parameters to buy CPU hardware and so on.

I'll buy the best of everything I want! But the cost can only give you a choice.

So, do we want frequency or quantity of CPU?

First of all, we should know if our application is CPU-intensive?

In fact, most of the time we have to choose better rather than more.

For the current version of MYSQL, concurrent processing of the same SQL by multiple CPU is not supported.

Of course, we also need to see what the concurrency of the system is. (concurrency is nanosecond)

QPS, a measure of database processing capacity: the number of SQL processed at the same time (here per second)

At present, MYSQL is widely used in Web applications, and the concurrency of such applications is also very large, so the number of CPU cores is more important than frequency.

Also consider the version of MYSQL used (the higher version supports multicore CPU better, at least you can rest assured to use 16-core or 32-core CPU)

Of course, if you want to use multicore CPU, you also need to use the latest version of MYSQL to achieve the best performance.

About memory

MYSQL itself is single-threaded

The size of memory directly affects the performance of MYSQL.

Storing data in cache can greatly improve the performance of data.

Commonly used MYSQL storage engine

MyISAM stores the index in memory and the data in the operating system

On the other hand, InnoDB stores indexes and data in memory at the same time, thus improving the efficiency of database operation.

Tips for memory configuration

1. Although the more memory, the better, but the impact on performance is limited, and can not increase performance indefinitely

2. Of course, extra memory can increase the performance of other services such as the operating system.

Caching is good for reading as well as writing

CPU-"memory -" disk

Caching can delay writes, turning multiple writes into a single write (Eg: pageview counter

This is the end of this article on "what is the impact of CPU resources and available memory size on database performance". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report