处变不惊,处忧不虑,不争一年的兴衰,但看十年的功过。笑中千关过,愁内百事哀,挣胜是祸,繁华似梦,平淡是福。

  IT博客 :: 首页 :: 联系 :: 聚合  :: 管理
  65 Posts :: 1 Stories :: 24 Comments :: 0 Trackbacks

原文摘自http://sqlserverpedia.com/blog/internals-and-architecture/164/
What is the GHOST CLEANUP process and what is it doing?
Q: Last night my SQL Server instance apparently froze – when I could login and sp_who2, I see GHOST CLEANUP as the top process using cpu. It is not killable. What is it doing, and how can I prevent it from running during critical time periods? (NOTE: this was on a virtual machine).

Bryan Oliver says: Here’s a couple of things that you might want to do and/or check to help get past this issue.

1. Have you got auto shrink turn on for any of the databases or have you got a schd task to run a shrink?

2. Are you getting errors in the SQL log? Sounds like if there is a Delete command pending which maybe causing the problem. Do a SQL Profiler at the times when the Ghost Clean up occurs (before if you can).

3. Also it may be worth running a DBCC Checkdb on the database that is causing the Ghost Clean Up process.

4. Check these items on the Microsoft knowledge base as well:
  http://support.microsoft.com/kb/931975
  http://support.microsoft.com/kb/815594

Kevin Kline says: The Ghost Thread is a system activity that monitors other normal & natural internal processes such as the lazywriter, checkpoints, and so forth.  I find it hard to believe that it’s consuming many of the system resources unless there’s a bug at play.  One such bug that comes into play is when you have memory problems associated with MemToLeave or with opening but not closing XML documents.  Make sure you’re up-to-date on the latest service pack for your version of SQL Server (you didn’t say which).

Finally, you can start-up SQL Server without a Ghost Process by using the -T661 startup switch.  I do not recommend this course of action, however, a Microsoft PSS rep may advise you to do so.  Without the Ghost Thread, you won’t see those omnipresent 4 or 5 activities in Current Activities (or via sp_who) since the Ghost Thread is what monitors those internal processes.

只有注册用户登录后才能发表评论。