简体   繁体   English

SQL Server CPU与存储瓶颈

[英]SQL Server CPU vs. Storage Bottlenecking

I've read quite a bit about SQL Servers using SSDs performing much better than traditional hard drives. 我已经阅读了很多关于使用SSD比传统硬盘运行得更好的SQL Server的信息。 In load tests with my app in a test environment, though, I'm able to keep my test DB server (SQL 2005) pegged between 75% and 100% CPU usage without much of a strain on disk access (as far as I can tell). 但是,在测试环境中使用我的应用程序进行负载测试时,我能够保持我的测试数据库服务器(SQL 2005)在CPU使用率达到75%到100%之间,而不会对磁盘​​访问造成太大压力(尽我所能)告诉)。 My data set is still pretty small; 我的数据集仍然很小; database backups are under 100 MB. 数据库备份小于100 MB。 The test server I'm using is not new, but is also no slouch. 我正在使用的测试服务器不是新的,但也没有懈怠。

So, my questions: 所以,我的问题:

  1. Is the CPU the bottleneck (as opposed to the storage) because the dataset is small and therefore fits in memory? CPU是否是瓶颈(而不是存储),因为数据集很小,因此适合内存?

  2. Will this change once the dataset grows so paging is necessary? 一旦数据集增长,这会发生变化,因此需要进行分页吗?

  3. Approximately how big (as a percentage of system memory) does the dataset have to get before SQL Server starts paging? 在SQL Server开始分页之前,数据集必须达到多大(占系统内存的百分比)? Or does that depend on a lot of other factors? 或者这取决于很多其他因素?

  4. As the app and its dataset grows, are there other bottlenecks that will tend to crop up besides CPU, storage, and lack of proper indexes? 随着应用程序及其数据集的增长,除了CPU,存储和缺少适当的索引之外,是否还会出现其他瓶颈?

  1. Yes

  2. Yes

  3. If you have SQL Server configured to use as much memory as it can get, probably when it exceeds the max system memory. 如果您将SQL Server配置为使用尽可能多的内存,可能是在超出最大系统内存时。 But it's very setup dependant on what causes paging (the query that is being executed is the most prevalent cause). 但它的设置取决于导致分页的原因(正在执行的查询是最常见的原因)。

  4. I/O between the request machine and server is the only one that I can think of, and that only matters if you are retrieving large datasets. 请求机器和服务器之间的I / O是我能想到的唯一一个,只有在检索大型数据集时才有意义。 I also would not group a lack of indexes as a bottleneck, rather indexes enable better performance with regard to searching. 我也不会将缺乏索引作为瓶颈,而是索引可以在搜索方面实现更好的性能。

As long as the CPU is the bottleneck on your dedicated SQL-Server machine, you don't have to worry about disk speed (assuming nothing's wrong with the machine). 只要CPU是专用SQL-Server计算机的瓶颈,您就不必担心磁盘速度(假设机器没有任何问题)。 SQL-Server WILL use heavy memory caching. SQL-Server将使用大量内存缓存。 SQL-Server has built-in strategies to perform best under a given load and available resources. SQL-Server具有内置策略,可在给定负载和可用资源下最佳地执行。 Just don't worry about it! 只是不要担心!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM