From the author of SQL Internals Viewer, a new tool to color code server connections in SQL Server Management Studio

Click here for more information...

Allocation Map

Contents:

The Allocation Map shows a graphical representation of the current database file(s).

Each Allocation Map represents a file. Blocks in the allocation map represent an 8-KB page. Extents are shown by the change in gradient from light to dark on the pages.

Opening a page

Clicking on a page in the Allocation Map will open it in the Page Viewer.

New in version 1.0
Subsequent clicks on the Allocation Map will open the page in the same Page Viewer. To open a page in a new window, hold down the Shift key while clicking on the page.

Top

Page Size

The sizes of pages on the Allocation Map are determined by the Page Size drop down.

The dropdown has three options; Small, Medium, and Large. By default when the Allocation Map is in PFS mode (to be described later) the page size is set to Large.

Page Size Dropdown
Top

Initial Display – GAM and SGAM

Initially the Allocation Map displays the GAM (Global Allocation Map) and SGAM (Shared Global Allocation Map) allocation pages. These are used by SQL Server to track global allocation.

There are two other global allocation structures that can be displayed, the BCM (Bulk Changed Map) and the DCM (Differential Changed Map). These and the GAM and SGAM can be togged on or off using the View menu.

Allocation structures
Top

File Details

Clicking View – File Details will display the file details information at the bottom of the Allocation Map.

File Details

File details are sourced from sys.database_files, sys.filegroups, and DBCC showfilestats.

Each file displayed in the Allocation Map will have its own File Details information bar.

Top

All Allocation Units

Allocation Map

All Allocation Units runs a scan and displays full allocation information for a database for every physical object in it.

All Allocation Units is run by clicking the Allocations toolbar button or by clicking View – Show all allocation units.

All Allocation Units operates by loading and displaying the IAMs for each allocation unit. Each object is assigned a colour that can be referenced in the Key.

Once the allocation units have been loaded the status bar can display which allocation unit a page is allocated to by hovering over it.

System Objects in All Allocation Units

By default system objects are grouped together in the Allocation Units scan as (system object). To display them individually uncheck the Group system objects together option on the Settings window (View – Settings).

Top

LSN Map

The LSN Map is run by clicking View – LSN Map.

The LSN map shows the relative ‘age’ of pages by displaying the LSN (Log Sequence Number) in terms of colour. Higher LSNs have a brighter colour, indicating that the page has been altered more recently than a darker coloured page.

Note: To produce the LSN map the application reads the header of every page in a database. It is not advisable to run the LSN Map on a large or production database.

Top

Buffer Pool

The buffer pool is SQL Server’s page memory cache. Pages can be dirty, which means they have been changed and not yet been written to disk.

A graphical representation of the pages in the buffer pool can be displayed by clicking the Buffer Pool toolbar button or by clicking View – Buffer Pool.

The buffer pool layer can be toggled off by clicking the toolbar item or menu again.

If a page is in the buffer pool it is darkened. If the page is dirty is has a red mark in the top left hand corner.

Buffer Pool
Not in buffer pool/in buffer pool/in buffer pool + dirty

Buffer pool information is sourced from sys.dm_os_buffer_descriptors.

Note: The buffer pool is read from sys.dm_os_buffer_descriptors and mapped to the allocation map on an individual page basis. If a large number of pages are in the buffer pool SQL Internals Viewer may become slow.

Top

PFS

The PFS (Page Free Space) is another allocation structure that stores the status of individual pages.

The PFS stores several pieces of information including how much space is free on the page, the allocation status (allocated/unallocated), if the page is an IAM, if the page is part of a mixed extent, and if the page contains Ghost Records.

Clicking PFS on the toolbar or the menu item View – PFS (Page Free Space) will put the Allocation Map into PFS mode.

New in version 1.0
The Key will display the different possible PFS states.

PFS Key

Hovering over a page will display a description of the PFS value for the page in the status bar in the bottom right hand corner of the application.

Top
Back to contents
Next: Key



©Danny Gould 2008