Select the product you need help with
วิธีการใช้คำสั่ง MEMORYSTATUS DBCC เพื่อตรวจสอบการใช้หน่วยความจำใน SQL Server 2005หมายเลขบทความ (Article ID): 907877 - ผลิตภัณฑ์ที่เกี่ยวข้องในบทความนี้ เนื้อหาบนหน้านี้สรุปบทความนี้อธิบายผลลัพธ์ของคำสั่ง DBCC MEMORYSTATUS คำสั่งนี้ถูกใช้บ่อยครั้งการแก้ไขปัญหาตามปริมาณการใช้หน่วยความจำของ Microsoft SQL Server บทความนี้อธิบายองค์ประกอบของผลลัพธ์สำหรับตัว จัดการหน่วยความจำ สำหรับสรุปการใช้หน่วยความจำ ข้อมูลหน่วยความจำรวม ข้อมูลการกระจายบัฟเฟอร์ สำหรับข้อมูลที่เก็บบัฟเฟอร์ และ สำหรับกระบวนการทำแคชข้อมูล ดังกล่าวยังอธิบายผลลัพธ์ เกี่ยวกับวัตถุหน่วยความจำทั้งหมด เกี่ยวกับวัตถุหน่วยความจำแบบสอบถาม เกี่ยวกับการปรับให้เหมาะสม และ เกี่ยวกับ brokers หน่วยความจำ บทนำคำสั่ง MEMORYSTATUS DBCC แสดง snapshot ของสถานะปัจจุบันของหน่วยความจำของ Microsoft SQL Server คุณสามารถใช้คำสั่งนี้ได้จาก การแก้ไขปัญหาเกี่ยวกับการใช้หน่วยความจำใน SQL Server หรือ การแก้ไขปัญหาข้อผิดพลาดของหน่วยความออกแบบของจำเฉพาะ (ข้อผิดพลาดของหน่วยความออกแบบของจำจำนวนมากโดยอัตโนมัติพิมพ์ผลลัพธ์นี้ในการล็อกข้อผิดพลาด) บริการการสนับสนุนลูกค้าของ Microsoft อาจจะขอให้ คุณเรียกใช้คำสั่งนี้ในระหว่างการเกิดปัญหาในการสนับสนุนเฉพาะถ้าคุณกำลังประสบกับข้อความแสดงข้อผิดพลาดที่อาจเกี่ยวข้องกับเงื่อนไขที่มีหน่วยความจำต่ำ หมายเหตุ:การตรวจสอบประสิทธิภาพการทำงาน (PerfMon) และตัวจัดการงานไม่บัญชีสำหรับหน่วยความจำอย่างถูกต้องถ้ามีการเปิดใช้งานการสนับสนุน Extentions Windowing อยู่ (AWE) บทความนี้อธิบายข้อมูลที่คุณสามารถดูจากเอาพุตของคำสั่ง MEMORYSTATUS DBCC บางส่วน ส่วนต่าง ๆ ของบทความนี้รวมรายละเอียดลกรรมสิทธิ์การใช้งานที่จะไม่อธิบายต่อไปนี้ ฝ่ายบริการสนับสนุนลูกค้าของ Microsoft จะไม่ตอบคำถามใด ๆ หรือให้ข้อมูลเพิ่มเติมเกี่ยวกับความหมายของตัวนับที่ระบุเกินกว่าข้อมูลที่ระบุในบทความนี้ ข้อมูลเพิ่มเติมสิ่งสำคัญคำสั่ง MEMORYSTATUS DBCC มีไว้เพื่อให้เครื่องมือการวินิจฉัยสำหรับบริการสนับสนุนลูกค้าของ Microsoft รูปแบบของผลลัพธ์และระดับของรายละเอียดที่ให้ไว้จะต้องเปลี่ยนแปลงระหว่าง service pack และรุ่นผลิตภัณฑ์ ฟังก์ชันการทำงานที่มีคำสั่ง MEMORYSTATUS DBCC อาจถูกแทนที่ โดยกลไกที่แตกต่างกันในผลิตภัณฑ์เวอร์ชันที่ใหม่กว่า ดังนั้น ในรุ่นผลิตภัณฑ์หลัง คำสั่งนี้อาจไม่ทำงาน ไม่มีคำเตือนเพิ่มเติมจะถูกทำก่อนที่การเปลี่ยนแปลง หรือเอาคำสั่งนี้ ดังนั้น โปรแกรมประยุกต์ที่ใช้คำสั่งนี้อาจหยุด โดยไม่มีการแจ้งเตือน มีการเปลี่ยนแปลงการแสดงผลของคำสั่ง MEMORYSTATUS DBCC จากรุ่นก่อนหน้าของ SQL Server ผลผลิตในขณะนี้ประกอบด้วยส่วนต่าง ๆ ที่พร้อมใช้งานในผลิตภัณฑ์เวอร์ชันก่อนหน้านี้ ตัวจัดการหน่วยความจำส่วนแรกของผลลัพธ์เป็นตัวจัดการ หน่วยความจำ ส่วนนี้แสดงโดยรวมการใช้หน่วยความจำ โดย SQL ServerMemory Manager KB ------------------------------ -------------------- VM Reserved 1761400 VM Committed 1663556 AWE Allocated 0 Reserved Memory 1024 Reserved Memory In Use 0 (5 row(s) affected)
สรุปการใช้หน่วยความจำส่วนตัวจัดการหน่วยความจำเป็นแล้วตาม ด้วยการสรุปการใช้หน่วยความจำสำหรับแต่ละโหนหน่วยความจำ ในระบบการเข้าถึง (NUMA) เปิดใช้งานหน่วยความจำ uniform ไม่ใช่ จะมีรายการโหนหน่วยความจำที่สอดคล้องกันสำหรับแต่ละโหน NUMA ของฮาร์ดแวร์ ในระบบการ SMP จะมีรายการโหนของหน่วยความจำเดียวกันหมายเหตุ:รหัสโหนดหน่วยความจำอาจไม่ตรงกับรหัสโหนดของฮาร์ดแวร์ Memory node Id = 0 KB ------------------------------ -------------------- VM Reserved 1757304 VM Committed 1659612 AWE Allocated 0 MultiPage Allocator 10760 SinglePage Allocator 73832 (5 row(s) affected) องค์ประกอบในส่วนนี้มีข้อมูลต่อไปนี้:
Aggregate memoryThe next section contains aggregate memory information for each clerk type and for each NUMA node. For a NUMA-enabled system, you may see output that is similar to the following.หมายเหตุ:The following table contains only part of the output. MEMORYCLERK_SQLGENERAL (node 0) KB ---------------------------------------------------------------- -------------------- VM Reserved 0 VM Committed 0 AWE Allocated 0 SM Reserved 0 SM Commited 0 SinglePage Allocator 592 MultiPage Allocator 2160 (7 row(s) affected) MEMORYCLERK_SQLGENERAL (node 1) KB ---------------------------------------------------------------- -------------------- VM Reserved 0 VM Committed 0 AWE Allocated 0 SM Reserved 0 SM Commited 0 SinglePage Allocator 136 MultiPage Allocator 0 (7 row(s) affected) MEMORYCLERK_SQLGENERAL (Total) KB ---------------------------------------------------------------- -------------------- VM Reserved 0 VM Committed 0 AWE Allocated 0 SM Reserved 0 SM Commited 0 SinglePage Allocator 728 MultiPage Allocator 2160 (7 row(s) affected) For an SMP system, you will see only one section for each clerk type. This section is similar to the following. MEMORYCLERK_SQLGENERAL (Total) KB ---------------------------------------------------------------- -------------------- VM Reserved 0 VM Committed 0 AWE Allocated 0 SM Reserved 0 SM Commited 0 SinglePage Allocator 768 MultiPage Allocator 2160 (7 row(s) affected)
Buffer distributionThe next section shows the distribution of 8-kilobyte (KB) buffers in the buffer pool.Buffer Distribution Buffers ------------------------------ ----------- Stolen 553 Free 103 Cached 161 Database (clean) 1353 Database (dirty) 38 I/O 0 Latched 0 (7 row(s) affected)
Buffer pool detailsYou can obtain detailed information about buffer pool buffers for database pages by using thesys.dm_os_buffer_descriptorsDMV. And you can obtain detailed information about buffer pool pages that are being used for miscellaneous server purposes by using thesys.dm_os_memory_clerksDMV.The next section lists details about the buffer pool plus additional information. Buffer Counts Buffers ------------------------------ -------------------- Committed 1064 Target 17551 Hashed 345 Stolen Potential 121857 External Reservation 645 Min Free 64 Visible 17551 Available Paging File 451997 (8 row(s) affected)
ขั้นตอนการแคชส่วนถัดไปอธิบาย makeup ของกระบวนการแคชProcedure Cache Value ------------------------------ ----------- TotalProcs 4 TotalPages 25 InUsePages 0 (3 row(s) affected)
หน่วยความจำที่ส่วนกลางวัตถุส่วนถัดไปประกอบด้วยรายละเอียดเกี่ยวกับวัตถุหน่วยความจำทั้งหมดที่แตกต่างกัน ส่วนนี้ประกอบด้วยข้อมูลเกี่ยวกับจำนวนหน่วยความจำหน่วยความจำส่วนกลางวัตถุใช้ด้วยGlobal Memory Objects Buffers ------------------------------ -------------------- Resource 126 Locks 85 XDES 10 SETLS 2 SE Dataset Allocators 4 SubpDesc Allocators 2 SE SchemaManager 44 SQLCache 41 Replication 2 ServerGlobal 25 XP Global 2 SortTables 2 (12 row(s) affected)
แบบสอบถามวัตถุหน่วยความจำส่วนถัดไปอธิบายข้อมูล grant หน่วยความจำแบบสอบถาม ส่วนนี้ประกอบด้วย snapshot ของการใช้งานหน่วยความจำแบบสอบถาม มีหน่วยความจำแบบสอบถามหรือที่เรียกว่าหน่วยความจำของพื้นที่ทำงาน.Query Memory Objects Value ------------------------------ ----------- Grants 0 Waiting 0 Available (Buffers) 14820 Maximum (Buffers) 14820 Limit 10880 Next Request 0 Waiting For 0 Cost 0 Timeout 0 Wait Time 0 Last Target 11520 (11 row(s) affected) Small Query Memory Objects Value ------------------------------ ----------- Grants 0 Waiting 0 Available (Buffers) 640 Maximum (Buffers) 640 Limit 640 (5 row(s) affected) องค์ประกอบในส่วนนี้มีข้อมูลต่อไปนี้:
OptimizationThe next section is a summary of the users who are trying to optimize queries at the same time.Optimization Queue Value ------------------------------ -------------------- Overall Memory 156672000 Last Notification 1 Timeout 6 Early Termination Factor 5 (4 row(s) affected) Small Gateway Value ------------------------------ -------------------- Configured Units 8 Available Units 8 Acquires 0 Waiters 0 Threshold Factor 250000 Threshold 250000 (6 row(s) affected) Medium Gateway Value ------------------------------ -------------------- Configured Units 2 Available Units 2 Acquires 0 Waiters 0 Threshold Factor 12 (5 row(s) affected) Big Gateway Value ------------------------------ -------------------- Configured Units 1 Available Units 1 Acquires 0 Waiters 0 Threshold Factor 8 (5 row(s) affected) หมายเหตุ:This amount does not include the memory that is required to run the query. When a query starts, there is no limit on how many queries can be compiled. As the memory consumption increases and reaches a threshold, the query must pass a gateway to continue. There is a progressively decreasing limit of simultaneously compiled queries after each gateway. The size of each gateway depends on the platform and the load. Gateway sizes are chosen to maximize scalability and throughput. If the query cannot pass a gateway, the query will wait until memory is available. Or, the query will return a time-out error (Error 8628). Additionally, the query may not acquire a gateway if the user cancels the query or if a deadlock is detected. If a query passes several gateways, the query does not release the smaller gateways until the compilation process has completed. This behavior lets only a few memory-intensive compilations occur at the same time. Additionally, this behavior maximizes throughput for smaller queries. หน่วยความจำ brokersในส่วนที่สามขั้นตอนถัดไปแสดงข้อมูลเกี่ยวกับ brokers หน่วยความจำที่ควบคุมแคหน่วยความจำ หน่วยความจำถูกโจรกรรม และหน่วยความจำที่สงวนไว้ ข้อมูลที่ให้ส่วนต่าง ๆ เหล่านี้สามารถใช้ได้สำหรับการวิเคราะห์ภายในเท่านั้น ดังนั้น ข้อมูลนี้ไม่มีรายละเอียดต่อไปนี้MEMORYBROKER_FOR_CACHE Value -------------------------------- -------------------- Allocations 1843 Rate 0 Target Allocations 1843 Future Allocations 0 Last Notification 1 (4 row(s) affected) MEMORYBROKER_FOR_STEAL Value -------------------------------- -------------------- Allocations 380 Rate 0 Target Allocations 1195 Future Allocations 0 Last Notification 1 (4 row(s) affected) MEMORYBROKER_FOR_RESERVE Value -------------------------------- -------------------- Allocations 0 Rate 0 Target Allocations 1195 Future Allocations 0 Last Notification 1 (4 row(s) affected) คุณสมบัติหมายเลขบทความ (Article ID): 907877 - รีวิวครั้งสุดท้าย: 16 มกราคม 2554 - Revision: 3.0 ใช้กับ
แปลโดยคอมพิวเตอร์ ข้อมูลสำคัญ: บทความนี้แปลโดยซอฟต์แวร์การแปลด้วยคอมพิวเตอร์ของ Microsoft แทนที่จะเป็นนักแปลที่เป็นบุคคล Microsoft มีบทความที่แปลโดยนักแปลและบทความที่แปลด้วยคอมพิวเตอร์ เพื่อให้คุณสามารถเข้าถึงบทความทั้งหมดในฐานความรู้ของเรา ในภาษาของคุณเอง อย่างไรก็ตาม บทความที่แปลด้วยคอมพิวเตอร์นั้นอาจมีข้อบกพร่อง โดยอาจมีข้อผิดพลาดในคำศัพท์ รูปแบบการใช้ภาษาและไวยากรณ์ เช่นเดียวกับกรณีที่ชาวต่างชาติพูดผิดเมื่อพูดภาษาของคุณ Microsoft ไม่มีส่วนรับผิดชอบต่อความคลาดเคลื่อน ความผิดพลาดหรือความเสียหายที่เกิดจากการแปลเนื้อหาผิดพลาด หรือการใช้บทแปลของลูกค้า และ Microsoft มีการปรับปรุงซอฟต์แวร์การแปลด้วยคอมพิวเตอร์อยู่เป็นประจำ ต่อไปนี้เป็นฉบับภาษาอังกฤษของบทความนี้:907877
(http://support.microsoft.com/kb/907877/en-us/
)
| การแปลบทความ |




กลับไปด้านบน








