恒定的SQL Server 80%CPU使用率 [英] Constant SQL Server 80% CPU Utilization

查看:207
本文介绍了恒定的SQL Server 80%CPU使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在专用VPS上有一个小型(暂时)Asp.Net MVC 5网站。当我转到服务器和启动任务管理器时,看到 SQL Server Windows NT-64 bit。 IIS使用大约80%的CPU和170MB的内存,而IIS使用6%的CPU和400MB的RAM。服务器规格为:

We have a small (for now) Asp.Net MVC 5 website on a dedicated VPS. When I go to the server and fire-up task manager, I see that "SQL Server Windows NT - 64 bit" is using around 80% of CPU and 170MB of RAM and IIS is using 6% CPU and 400MB of RAM. Server Specs are:


  • CPU 1.90Ghz双核

  • 内存2GB

  • Windows Server 2012

  • SQL Server Express 2012

  • 磁盘空间:25GB,2.35可用。

  • CPU 1.90Ghz dual core
  • Memory 2GB
  • Windows Server 2012
  • SQL Server Express 2012
  • Disk Space: 25GB, 2.35 Free.

数据库不是很大。它的备份空间不到10MB。

The database is not very big. Its backup is less than 10MB.

我已经尽力优化了网站。我向许多控制器添加了缓存,并为许多控制器实现了甜甜圈缓存。但是今天,即使只有5个在线用户,我们的搜索也无法正常进行。我重新启动了服务器上的Windows,它开始运行,但是服务器启动一分钟我的CPU使用率很高。有趣的是,当我打开SQL Server Management Studio并尝试获取最消耗CPU的查询的报告时,它说当前没有查询消耗任何CPU!但是同时我可以看到SQL Server正在消耗大量CPU。如何检查占用所有CPU的内存?下面是来自服务器的图片:

I have tried to optimize the website as much as I could. I added caching to a lot of controllers and implemented donut caching for quite a lot of controllers. But today, even though there were only 5 users online, our search wouldn't work. I restarted the Windows on the server and it started working but I got the high CPU usage the minute server started. Interestingly when I open the SQL Server Management Studio and try to get the report for top CPU-consuming queries it says that there are no queries currently consuming any CPU!!! But at the same time I can see that SQL server is consuming a lot of CPU. How can I examine what is taking all the CPU? Below is a picture from the server:

我/我在设计和实施网站时非常谨慎。所有数据库访问都是通过Entity Framework的最新版本进行的。我只是想知道服务器的规格是否低。任何帮助将不胜感激。

I was/am very careful with designing and implementing the website. All the database access is through latest version of Entity Framework. I just wonder if the server's specs are low. Any help would be very much appreciated.

这是 sp_who2 存储过程。

推荐答案

我同意运行SQL事件探查器以发现较大的查询持续时间和较大的写操作。尝试运行perfmon并发现任何潜在的连接泄漏(回收的连接)。

I would agree running SQL Profiler to spot large query durations and large write operations. Try running perfmon and spotting any potential connection leaks (reclaimed connections).

这篇关于恒定的SQL Server 80%CPU使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆