Understanding Windows 7's 'GodMode'

Windows 7's so-called GodMode is actually a shortcut to accessing the operating system's various control settings.

(Credit: CNET News)

Although it's name suggests perhaps even grander capabilities, Windows enthusiasts are excited over the discovery of a hidden "GodMode" feature that lets users access all of the operating system's control panels from within a single folder.

By creating a new folder in Windows 7 and renaming it with a certain text string at the end, users are able to have a single place to do everything from changing the look of the mouse pointer to making a new hard-drive partition.

The trick is also said to work in Windows Vista, although some are warning that although it works fine in 32-bit versions of Vista, it can cause 64-bit versions of that operating system to crash.

To enter "GodMode," one need only create a new folder and then rename the folder to the following:

GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

Once that is done, the folder's icon will change to resemble a control panel and will contain dozens of control options. I'm not sure it's my idea of playing God, but it is a handy way to get to all kinds of controls.

I've asked Microsoft for more details on the feature and how it came to be. But so far, Redmond is silent on the topic.

10 Alternatives To Mininova

After nearly five years of loyal service, Mininova disabled access to over a million torrent files when it partly shut down its website. Starting today, only approved publishers are able to upload files to the site, but luckily there are plenty of alternatives and potential replacements BitTorrent users can flock to.

With an impressive 175,820,430 visits and close to a billion page views in the last 30 days, Mininova set a record that they will be unable to break in the near future. Last August a Dutch court ruled that Mininova had to remove all links to ‘infringing’ torrent files, with disastrous consequences.

Since it is technically unfeasible to pre-approve or filter every potentially infringing torrent file, the Mininova team decided to throw in the towel and only allow torrents to be submitted by approved uploaders. This move resulted in the deletion of more than a million torrents, many of which were not infringing any copyrights at all.

Thankfully, there are still plenty of alternatives for those BitTorrent users who are looking for the latest Ubuntu, OpenSUSE or Fedora release.

Below we provide a random list of public torrent sites that are still open, but there are of course hundreds more sites we could have included. If your personal favorite is missing, feel free to post it in the comments below – preferably with your reasons why it should be included in any upcoming lists.

hydra1. Vertor

2. Torrentzap

3. Fenopy

4. ExtraTorrent

5. KickassTorrents

6. BTjunkie

7. isoHunt

8. yourBitTorrent

9. The Pirate Bay

10. ShareReactor

Update: The owner of another torrent site, Monova, told TorrentFreak that he has reserved all Mininova usernames for people who want to make the switch to his site. The account names can be claimed here. Also, we replaced some sites in the original top 10 because they went down or started to serve trojans.

Best Hand Painting Art Ever

Body painting is a type of art in which paint is applied to a part of skin. It is considered one of the ancient types of art. Unlike tattoos, body painting is temporary. Lasting for just few hours or ion some cases a few weeks. Hand painting art is the application of make-up or paint on to the hands to look like any object or mostly to depict animals.

Following art is created by Mario Mariotti (1936-1997), an Italian artist from Florence, famous for his amazing hand painting art.

Artist Guido Daniele who has specialized in body artwork. His hand painting which he dubs as ‘Handimals‘ is appreciated around the world.

For your enjoyment, we have a collection of Guido’s hand painting art, check out his amazing creations which look like real animals.


Source: guidodaniele

How to Fry a Perfect Egg

By Jason Fitzpatrick, 8:00 AM on Sat Aug 29 2009, 49,221 views (Edit, to draft, Slurp)

Have you not yet mastered the art of the perfect fried egg? If you're impressed with the fried eggs you order in restaurants, but underwhelmed by the burnt-edged monsters you make at home, you'll want to read this guide.

Frying an egg is one of those things that seems like it should be so very simple, but the wrong combination of heat, time, and oil can make your potential perfect egg turn into a burnt and unappetizing mess.

Culinary-minded blog The Kitchn put together a step-by-step guide to making sure you're using the right kind of skillet, the right amount of heat, and the right amount of butter or oil in the pan.

Once you've nailed those three important elements, there's nothing standing between you and consistently perfect eggs. Check out the link below for more information.

SQL 2008 and Performance Tuning Material

Our Premier Field Engineering team has provided us with some detailed technical information related to SQL Server Upgrades and SQL 2008 Performance Tuning

Attached are several scripts, intended for SQL 2005/2008, all have been renamed to have a .txt extension

Upgrade related information:

SQL 2008 Upgrade Technical Reference

http://www.microsoft.com/downloads/details.aspx?familyid=66D3E6F5-6902-4FDD-AF75-9975AEA5BEA7&displaylang=en

SQL Server 2005 Upgrade Technical Reference Guide

http://www.microsoft.com/downloads/details.aspx?FamilyID=3d5e96d9-0074-46c4-bd4f-c3eb2abf4b66&DisplayLang=en

SQL 2008 Technet Virtual Labs

http://technet.microsoft.com/en-us/cc164207.aspx

All Technet Virtual Labs

http://technet.microsoft.com/en-us/bb467605.aspx

SQL 2008 Failover Clustering White Paper.

http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008FailoverCluster.docx

SQL Server 2005 Failover Clustering White Paper

http://www.microsoft.com/downloads/details.aspx?FamilyID=818234dc-a17b-4f09-b282-c6830fead499&DisplayLang=en

SQL 2008 Demos

http://www.microsoft.com/sqlserver/2008/en/us/demos.aspx

 

SQL 2005 Demos

http://www.microsoft.com/sqlserver/2005/en/us/demos.aspx

SQL 2005 Hosted trial (free time to play with SQL 2005)

http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032293449&EventCategory=3&culture=en-US&CountryCode=US

Performance tools and related information:

SQL Server 2005 Performance Dashboard Reports ( http://www.microsoft.com/downloads/details.aspx?familyid=1d3a4a0d-7e0c-4730-8204-e419218c1efc&displaylang=en).   A quick synopsis of the Performance Dashboard can be found here: (http://blogs.msdn.com/psssql/archive/2007/03/30/sql-server-2005-performance-dashboard-reports.aspx).

A SQL Server 2005 Dynamic Management View Performance Data Warehouse - SQL DMVStats (http://www.codeplex.com/sqldmvstats)

SQLNexus - SQL trace analysis tool.  The tool has been officially moved to our CodePlex site as well ( http://www.codeplex.com/sqlnexus).

SQL Server 2005 Performance Statistics Script ( http://blogs.msdn.com/psssql/archive/2007/02/21/sql-server-2005-performance-statistics-script.aspx)

PAL (Performance Analysis of Logs) – Analyze perfmon logs captured with system monitor (perfmon)

http://www.codeplex.com/PAL

RML Utilities for Microsoft SQL Server information RML Utilities for SQL Server

(x86) -  http://www.microsoft.com/downloads/details.aspx?FamilyId=7EDFA95A-A32F-440F-A3A8-5160C8DBE926&displaylang=en

 (x64) -  http://www.microsoft.com/downloads/details.aspx?FamilyId=B60CDFA3-732E-4347-9C06-2D1F1F84C342&displaylang=en

Troubleshooting Performance Problems in SQL Server 2005 (http://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspx)

SQL Server 2005 Script Repository (http://www.microsoft.com/technet/scriptcenter/scripts/sql/sql2005/default.mspx)

Performance Tuning Using Waits and Queues ( http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/Performance_Tuning_Waits_Queues.doc).

I would also highly recommend that you check out the following book:  SQL Server 2005 Practical Troubleshooting: The Database Engine (http://www.amazon.com/SQL-Server-2005-Practical-Troubleshooting/dp/0321447743/ref=sr_1_1/102-6286043-0154537?ie=UTF8&s=books&qid=1185328220&sr=8-1).

TEMPDB information:

TEMPDB Capacity Planning and Concurrency Considerations for Index Create and Rebuild (http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/tempdb_capacity_planning_index.mspx)

Working with Tempdb in SQL Server 2005 ( http://www.microsoft.com/technet/prodtechnol/sql/2005/workingwithtempdb.mspx)

Statistics and Query Compilation:

Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005 (http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx)

Statistics Used by the Query Optimizer in Microsoft SQL Server 2005 (http://www.microsoft.com/technet/prodtechnol/sql/2005/qrystats.mspx)

Query Recompilation in SQL Server 2000 (http://msdn2.microsoft.com/en-us/library/aa902682.aspx)

Statistics Used by the Query Optimizer in Microsoft SQL Server 2000 (http://msdn2.microsoft.com/en-us/library/aa902688(SQL.80).aspx)

Miscellaneous information and Blogs:

 

SQL Server 2005 SP2 will introduce new messages to the error log related to timing activities (http://blogs.msdn.com/psssql/archive/2006/11/27/sql-server-2005-sp2-will-introduce-new-messages-to-the-error-log-related-to-timing-activities.aspx). 

SQL and the Working Set Blog regarding OS memory trimming ( http://blogs.technet.com/askperf/archive/2007/05/18/sql-and-the-working-set.aspx)

Fragmentation Station Series (http://chadhoc.net/?tag=/fragmentation)

SQL Server 2005 Partitioned Tables and Indexes

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5partition.asp

Online Indexing Operations in SQL Server 2005

http://www.microsoft.com/technet/prodtechnol/sql/2005/onlineindex.mspx

SQL Server 2005 NUMA Basics (http://blogs.msdn.com/psssql/archive/2008/01/24/how-it-works-sql-server-2005-numa-basics.aspx)

Below are some "rules of thumb" Performance Monitor counters that I typically use to troubleshoot issues from a Windows and SQL Server perspective.  These numbers are general best practice numbers and should not be construed as official thresholds from Microsoft.  There is also a link below to a webcast that you may find useful in determining which counters to pay attention, what those counters actually mean, and what values should be considered acceptable.

TechNet Webcast: SQL Server Performance Counter Guidance (Level 300) ( http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032357639&EventCategory=4&culture=en-US&CountryCode=US)

Memory\Available Mbytes <= rule of thumb is > 100 MB

Memory\Free Page Table Entries <= rule of thumb is > 5000

Memory\Pages Input/Sec <= rule of thumb is > 10

Paging File\%Usage <= rule of thumb < 70%

Paging File\%Usage Peak <= rule of thumb < 70%

Processor\%Privileged Time <= rule of thumb < 30% of Total %Processor Time

Processor\%Processor Time <= rule of thumb < 80%

System\Context Switches\Sec <= rule of thumb 1500 - 3000 is excellent, 3001- 5,999 good, > 6000 poor.  You may have to divide this number by the number of CPU's in the system.

System\Processor Queue Length <= rule of thumb < 4 per CPU excellent, 5 -11 good, > 12 poor

*Physical Disk\ Avg. Disk Queue Length

*Physical Disk\Avg. Disk sec\Read

*Physical Disk\Avg. Disk sec\Write

*Physical Disk\% Idle Time

SQLServer:Access Methods\Forwarded Records/sec <= rule of thumb < 10 for every 100 batches (or batch requests/sec)

SQLServer:Access Methods\Full Scans/sec <= rule of thumb (Index Searches/sec)/(Full Scans/sec) > 1000

SQLServer:Access Methods\Page Splits/sec <= rule of thumb < 20 for every 100 batches (or batch requests/sec)

SQLServer:Buffer Manager\Buffer cache hit ratio <= rule of thumb > 97%

SQLServer:Buffer Manager\Page life expectancy <= rule of thumb >= 300

SQLServer:Buffer Manager\Page reads/sec <= rule of thumb  < 90

SQLServer:Buffer Manager\Page writes/sec <= rule of thumb  < 90

SQLServer:Memory Manager\Memory Grants Pending <= rule of thumb 0

SQLServer:SQL Statistics\Batch Requests/sec

SQLServer:SQL Statistics\SQL Compilations/sec <= rule of thumb 10 - 20% of the number of batch requests\sec is a good number (or 0)

SQLServer:SQL Statistics\SQL Re-compilations/sec <= rule of thumb 10 - 20% of the number of batch requests\sec is a good number (or 0)

************************************

Logical Disk/Physical Disk

Both are to be captured and monitored due to virtualized disk environments.

\%idle Time

*             100% idle to 50% idle = Healthy

*             49% idle to 20% idle = Monitor

*             19% idle to 0% idle = Out of Spec

Note:  %idle Time can be a reasonable indicator of disk interface pressure.

On very large SAN's offering a LUN totaling (100's of drives) this counter can be 0% and still be okay, but if we see normal levels and then 0% at the precise time of reported problems, then treat it as a valid issue.  It is important to understand how many disks back up a particular array and how many of those are "bundled together" and presented as a LUN to Windows to make this counter more meaningful.

\%Avg. Disk Sec Read or Write

*             .001ms to .012ms  = Healthy

*             .013ms to .025 = Monitor

*             .026ms or greater = Out of Spec

\Avg. Disk Queue Length

*             2.5 per spindle with infrequent spikes up to around 20 (but please keep in mind that this value can become unreliable because of various SAN virtualization techniques).

Note:  If %idle is low and Avg Disk/Second Read or Write is in the "Healthy Range" => Suggestive of Interface or Infrastructure issues such as Queue Depth, Fiber switch oversubscription, etc. Something may be gating I/O in the fiber path, but the JBOD is responsive once the I/O request reaches it JBOD.

If %idle is high and Avg Disk/Second Read or Write is in the "Monitor or Out of Spec Range" =>  Suggestive of JBOD issues.  The storage I/O requests are quickly getting to the JBOD, but LUN/Cache performance or configuration is the most likely culprit.

\Disk Transfers/sec

Note:  It is necessary to know the disk speed and the type of I/O in order to determine the maximum throughput.  As a Rule of thumb measurement for database I/O, you can use something like 80 Transfers/sec (per 10,000 of RPM).  Using this as a baseline, a SAN LUN offering (for example) 800 disk Transfers\sec, could be said to be the rough performance equivalent of having ten 10,000 RPM hard drives of direct attached storage ... relatively speaking.  Caching on the SAN controllers effectively nullifies this for writes and can yield a significant performance gain in write transfers; but only as long as the cache is not overrun.

The above listed limits are per spindle, not an overall limit for a RAID set. Due to RAID set design, the limit or RAID set throughput difficult to extrapolate.  Below is a summary of the Disk I/O per second generated for each type of RAID configuration based on a given number of reads and writes per second.

  RAID 0: READS + WRITES = I/Os / sec

  RAID 1: READS + (2*WRITES) = I/Os / sec

  RAID 5: READS + (4*WRITES) = I/Os / sec

  RAID 0+1: READS + (2*WRITES) = I/Os per second.

Also please check out the following article NT Server and Disk Subsystem Performance (http://www.microsoft.com/technet/archive/winntas/maintain/ntserv.mspx?mfr=true).  The above information regarding disk counters has its basis in the information found in that article (the Detecting Disk I/O Bottlenecks section).  The article is slightly dated, but the concepts still apply for the most part today.

Another whitepaper that was used reference to the above information Disk Subsystem Performance Analysis for Windows (http://www.microsoft.com/whdc/device/storage/subsys_perf.mspx).  There is a section entitled: Tools for Storage Performance Analysis that has some additional Performance Monitor counters that may be good to watch as well.

And finally some SQL Server I/O related whitepapers:

Predeployment I/O Best Practices (http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/pdpliobp.mspx)

SQL Server I/O Basics (SQL Server 2000) (http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlIObasics.mspx)

SQL Server I/O Basics, Chapter 2 (SQL Server 2005) (http://www.microsoft.com/technet/prodtechnol/sql/2005/iobasics.mspx)

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
Select 'Total Entries'
select COUNT(*) As NumberOfPlans, SUM(size_in_bytes) / 1024.0/1024.0 AS SizeInMB
from sys.dm_exec_cached_plans
 
Select 'Total Entries Broken Out by Type'
select COUNT(*) As NumberOfPlans, SUM(size_in_bytes) / 1024.0/1024.0 AS SizeInMB,
  objtype
from sys.dm_exec_cached_plans
group by objtype
 
Select 'Those only used once'
select COUNT(*) As NumberOfPlans, SUM(size_in_bytes) / 1024.0/1024.0 AS SizeInMB
from sys.dm_exec_cached_plans
where usecounts = 1
 
Select 'Those only used once Broken Out by Type'
select COUNT(*) As NumberOfPlans, SUM(size_in_bytes) / 1024.0/1024.0 AS SizeInMB,
  objtype
from sys.dm_exec_cached_plans
where usecounts = 1
group by objtype

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
-- Average Stalls per Read, Write and Total IO
---- adding 1.0 to avoid division by zero errors
select database_id, file_id
  ,io_stall_read_ms
  ,num_of_reads
  ,cast(io_stall_read_ms/(1.0+num_of_reads) as numeric(10,1)) as 'avg_read_stall_ms'
  ,io_stall_write_ms
  ,num_of_writes
  ,cast(io_stall_write_ms/(1.0+num_of_writes) as numeric(10,1)) as 'avg_write_stall_ms'
  ,io_stall_read_ms + io_stall_write_ms as io_stalls
  ,num_of_reads + num_of_writes as total_io
  ,cast((io_stall_read_ms+io_stall_write_ms)/(1.0+num_of_reads + num_of_writes) as numeric(10,1)) as 'avg_io_stall_ms'
from sys.dm_io_virtual_file_stats(null,null)
order by avg_io_stall_ms desc

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
-- see runnable tasks
select scheduler_id, current_tasks_count, runnable_tasks_count from sys.dm_os_schedulers where scheduler_id  
 
-- see what current query are using most cpu
select top 50 sum(qs.total_worker_time) as total_cpu_time, sum(qs.execution_count) as total_execution_count, count(*) as number_of_statements, qs.plan_handle from sys.dm_exec_query_stats qs group by qs.plan_handle order by sum(qs.total_worker_time) desc
-- select * from sys.dm_exec_query_plan(plan_handle)
 
-- query using highest cpu
 
select highest_cpu_queries.plan_handle, highest_cpu_queries.total_worker_time, q.dbid, q.objectid, q.number, q.encrypted, q.[text] from (select top 50 qs.plan_handle, qs.total_worker_time from sys.dm_exec_query_stats qs order by qs.total_worker_time desc) as highest_cpu_queries cross apply sys.dm_exec_sql_text(plan_handle) as q order by highest_cpu_queries.total_worker_time desc
 
 
-- look for hash match or sorts etc.
 
sys.dm_exec_cached_plans

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
--Currently executing statements.sql
---- lists users in sys.dm_exec_requests
select r.session_id
    ,status
    ,substring(qt.text,r.statement_start_offset/2, (case when r.statement_end_offset = -1 then len(convert(nvarchar(max), qt.text)) * 2 else r.statement_end_offset end - r.statement_start_offset)/2) as query_text --- this is the statement executing right now
    ,qt.dbid
    ,qt.objectid
    ,r.cpu_time
    ,r.total_elapsed_time
    ,r.reads
    ,r.writes
    ,r.logical_reads
    ,r.scheduler_id
from sys.dm_exec_requests r
cross apply sys.dm_exec_sql_text(sql_handle) as qt
where r.session_id > 50
order by r.scheduler_id, r.status, r.session_id

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
-- query that generate the most physical IO
-- only need to gauge logical writes, checkpoint lazywrite actually flush to physical
 
select top 5 (total_logical_reads/execution_count) as avg_logical_reads, (total_logical_writes/execution_count) as avg_logical_writes, (total_physical_reads/execution_count) as avg_phys_reads, Execution_count, statement_start_offset as stmt_start_offset, sql_handle, plan_handle from sys.dm_exec_query_stats order by (total_logical_reads + total_logical_writes) Desc
 
--select * from sys.dm_exec_sql_text(sql_handle)
--select * from sys.dm_exec_query_plan(plan_handle)

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
--Indexes & Row Lock Waits
-

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
-- Cost Benefit of indexes
---
--- Compare the benefit (measured by reads) vs. the cost (measured by updates) for indexes
 
use Northwind
go
 
--- sys.dm_db_index_operational_stats
/*select 'object'=object_name(o.object_id), o.index_id
    , reads=range_scan_count + singleton_lookup_count
    , 'leaf_writes'=leaf_insert_count+leaf_update_count+ leaf_delete_count , 'leaf_page_splits' = leaf_allocation_count
    , 'nonleaf_writes'=nonleaf_insert_count + nonleaf_update_count + nonleaf_delete_count
    , 'nonleaf_page_splits' = nonleaf_allocation_count
from sys.dm_db_index_operational_stats (10,NULL,NULL,NULL) o
where objectproperty(o.object_id,'IsUserTable') = 1
order by reads desc, leaf_writes, nonleaf_writes
go
*/
declare @dbid int
select @dbid = db_id('Northwind')
--- sys.dm_db_index_usage_stats
select 'object' = object_name(object_id),index_id
    ,'user reads' = user_seeks + user_scans + user_lookups
    ,'system reads' = system_seeks + system_scans + system_lookups
    ,'user writes' = user_updates
    ,'system writes' = system_updates
from sys.dm_db_index_usage_stats
where objectproperty(object_id,'IsUserTable') = 1
and database_id = @dbid
order by 'user reads' desc
 
select 'object'=object_name(o.object_id), o.index_id
    , 'usage_reads'=user_seeks + user_scans + user_lookups
    , 'operational_reads'=range_scan_count + singleton_lookup_count
    , range_scan_count
    , singleton_lookup_count
    , 'usage writes' = user_updates
    , 'operational_leaf_writes'=leaf_insert_count+leaf_update_count+ leaf_delete_count , leaf_insert_count,leaf_update_count,leaf_delete_count , 'operational_leaf_page_splits' = leaf_allocation_count
    , 'operational_nonleaf_writes'=nonleaf_insert_count + nonleaf_update_count + nonleaf_delete_count
    , 'operational_nonleaf_page_splits' = nonleaf_allocation_count
from sys.dm_db_index_operational_stats (@dbid,NULL,NULL,NULL) o
  ,sys.dm_db_index_usage_stats u
where objectproperty(o.object_id,'IsUserTable') = 1
and u.object_id = o.object_id
and u.index_id = o.index_id
order by operational_reads desc, operational_leaf_writes, operational_nonleaf_writes
go

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which
the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product
in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and
Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.
*/
select
  m.database_id,
  db_name(m.database_id) as database_name,
  m.file_id,
  m.name as file_name, m.physical_name, m.type_desc,
  fs.num_of_reads, fs.num_of_bytes_read, fs.io_stall_read_ms, fs.num_of_writes, fs.num_of_bytes_written, fs.io_stall_write_ms
from sys.dm_io_virtual_file_stats(NULL, NULL) fs
  join sys.master_files m on fs.database_id = m.database_id and fs.file_id = m.file_id

/* This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code
and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market

Introduction to Hyper-V for Exchange

Introduction to Hyper-V for Exchange

Contents

Hyper-V architectural overview

Hyper-V Virtual Machine creation

Hyper-V network creation

Hyper-V for Exchange server

Monitoring and troubleshooting of Virtual Machines      

                Hypervisor Performance Monitor Objects

Working with Traces

Resources

Credits

Tech Bulletin Archive and Subscription Information

Hyper-V Architectural Overview

Hyper-V tends to be compared with Microsoft’s solutions like Virtual PC and Virtual server, but Hyper-V comes with a totally different architecture. It leverages the virtualization extensions provided by the Intel and AMD processors to implement its new architecture.

Hyper-V uses the concept of a parent partition and child partitions. A parent partition is the OS installed on the physical hardware and child partitions are the virtual machines created on the OS. The hypervisor (as seen in the diagram 1.1 below) loads before the Windows Kernel and runs in a special execution mode called Ring -1, which is made possible by the Intel  and AMD processor virtualization extensions. Data Execution Prevention (DEP) is also a requirement for Hyper-V.  Hyper-V takes care of processor and memory management, allowing efficient management of all the virtual machines.

The code for Hyper-V is written in assembly language. Since it is a very light code, it is very fast and agile in performance. The Windows hypervisor has its own application programming interface (API) and all the Operating Systems running on top of Windows hypervisor call into this API via “Hypercalls”. The Microsoft hypervisor must have at least one parent or root partition, running Windows Server 2008. The virtualization stack in the parent partition has direct access to the hardware devices. The parent partition then uses the hypercall API to create the child partitions which house the guest operating systems.

Hyper-V supports installation of Windows 2000 and higher operating systems, for both x86 and x64 architecture. For smooth management of the virtual machines, Hyper-V provides Integration Services referred to as Kernel Enlightenments. These include time synchronization, heartbeat, shutdown, Key/value pair Exchange and VSS. Integration services are only available for supported operating systems.

Image014


1.1   Hyper-V architecture

Hyper-V virtual machine creation

Hyper-V comes as an installable server role in Windows server 2008.  It can be installed and managed using the Server Manager console. Virtual Machines can be created by following the steps below:

1.       Open Server Manager and expand Roles

2.       In the right pane click Add roles

3.       In the Add roles wizard, select the Hyper-V role and click next

Image003

4.       You can create a dynamically expanding VHD and the wizard suggests the maximum size the VHD can grow based on the space available in the physical hard drive

Image004

5.       You can either choose to create a blank VHD or choose to boot from a ISO image, drive or floppy

Image005

 

Hyper-V Virtual Network Creation

Hyper-V allows creation of virtual networks, to manage connectivity in the following areas:

a)      Between the virtual machines hosted in a server

b)      Between servers with Hyper-V role installed in them and hosting VMs

c)       To provide VMs with external network access

The networking can be illustrated using the below diagram (3.1)

Image006
        
Image007

3.1 Hyper-V networking

The diagram on the left illustrates the state of the parent partition without any child partitions created. The physical NIC is bound with all the networking protocols and hence all the related communications.

The diagram in the right illustrates the networking model with parent and child partitions. When a virtual network is created, a virtual switch is created in the parent partition. A virtual NIC created in the child partition connects to virtual switch in the parent partition using a virtual Ethernet port. Now with this configuration, all the protocols are unbound from the physical NIC and the only protocol bound is the Microsoft Virtual Network Switch protocol. All the child partition’s networking is handled by the virtual network switch shown above which then binds with the physical NIC, completing the picture.

There are three types of virtual network switches that can be created:

1.       External network switch: Binds with the physical network adapter and provides external network access to the virtual machines.

2.       Internal network switch: Allows connectivity between the parent partition and the child partitions on the same Hyper-V server.

3.       Private network switch: Allows connectivity between the child partitions in the same Hyper-V server, there is no connectivity to the parent partition.

A virtual network can be created using the Virtual network manager window.

Image008

Depending on the requirement, you can create any one of the three types of virtual networks.

Image009

Hyper-V for Exchange Server

Below are the key take away points for Exchange deployment in Hyper-V:

Support:

·         Exchange 2007 SP1 is fully supported on Hyper-V

·         Exchange 2003 is supported, provided it meets the requirements outlined in the support policies and recommendations here

·         Exchange 5.5 and 2000 are not supported

·         Unified Messaging is not supported in Hyper-V

·         CAS, HUB, EDGE will be recommended and supported

·         The Mailbox server role will be supported on Hyper-V, but emphasis is placed on performance:

o   A Physical server should be used to scale up a Mailbox server

o   The Exchange VSS Writer does not work inside of a VM.

Performance:

·         The same performance requirements need to be met when scaling virtual machines

·         Customers should consider performance first and virtualization second

·         Exchange server performance is currently a major call generator and with Hyper-V as an additional layer is introduced that needs to be evaluated when investigating performance issues

·         Pass-Through disk I/O performance is better than VHDs

·         It is easy to over subscribe to a physical resource

·         iSCSI does not perform well with virtual network switches or NICs

·         Bottlenecks in the parent partition can affect performance in child partitions

·         Perfmon counters are different in the child and parent partitions and may need to be captured on both depending on the issue

Monitoring and Troubleshooting Virtual Machines

Hyper-V provides various diagnostic and monitoring tools. In Windows server 2008, event logging for Virtual machines are made easy to access and diagnose by providing individual classification under the event viewer. The various classifications available under Event viewer are:

·         Hyper-V-Config

·         Hyper-V-High-Availability 

·         Hyper-V-Hypervisor

·         Hyper-V-Integration

·         Hyper-V-Network

·         Hyper-V-SynthNic

·         Hyper-V-SynthStor

·         Hyper-V-vhdsvc

·         Hyper-V-VMMS

·         Hyper-V-Worker

Hyper-V-Config

Events are logged here that relate to problems accessing a virtual machines configuration file.

Hyper-V-High-Availability

Events are logged here that relate to quick migration or failover clustering between two virtual machines.

Hyper-V-Hypervisor

Events are logged here regarding hypervisor load failures or problems with the hypervisor itself.  If the hypervisor does not load because hardware virtualization is not enabled in the BIOS, for example, that event will be logged here.

Hyper-V-Integration

Events are logged here that relate to problems with the integrated components.

Hyper-V-Network

Events are logged here that relate to problems with the virtual switch.

Hyper-V-SynthNic

Events are logged here if there is a problem with network communication using the synthetic NIC.

Hyper-V-SynthStor

Events are logged here that relate to any storage issues when using the synthetic storage driver.

Hyper-V-vhdsvc

Events are logged here that relate to virtual hard disks. Failures to add, delete, merge, expand, convert and mount virtual hard disks will write events to this log.

Hyper-V-VMMS

Events are logged here that relate to the virtual machine management service functionality.

Hyper-V-Worker

Events are logged here that relate to the worker processes functionality.

Hypervisor Performance Monitor Objects

The following section gives a deeper explanation of counters and how to use them to monitor the performance of virtual machines in Hyper-V .  This information can also be found here.

Microsoft Hyper-V ships with 24 performance monitor objects that can be used to monitor the performance of both the parent partition and child partitions. Using these objects and the associated performance monitor counters, an administrator should be able to get a much better overall picture of how their system is performing, as well as the ability to narrow down performance problems to a specific partition.

Performance monitor objects for Hyper-V are divided into the following groups:

·         Hypervisor                                                          

·         Hyper-V Legacy Network Adapter

·         Hyper-V Task Manager Detail

·         Hyper-V Virtual objects

·         Hyper-V VM objects

Monitoring CPU Utilization

The counters to monitor CPU Utilization and their description are given below:

Using the % Processor Time Counter

The % Processor Time counter provides key information about Hyper-V performance. This performance counter details the total amount of CPU time being used by processes, which is the time the CPU is not idle waiting for work. Other % Processor Time counters detail CPU process time on a process-by-process basi

What about my private bits?

encryptionAs I’ve chronicled my migration to and trials of various in-the-cloud services, a number of commenters have asked my thoughts about storing personal or private information online. I don’t have any empirical evidence to support it, but I doubt that those who staff large-scale data centers have the time or inclination to go trolling amok people’s stuff. For one thing, there’s just a whole hell of a lot of noise to sift through. Curiously, there isn’t much of published research on the amount of information humans generate. The Global Information Industry Center at the University of California, San Diego, has been working for several years on a project to measure how much information we create. They were slated to release a report at the end of 2008, but haven’t yet. Their earlier 2003 report is still available, though:

Print, film, magnetic, and optical storage media produced about 5 exabytes* of new information in 2002…. We estimate that the amount of new information stored on paper, film, magnetic, and optical media has about doubled in the last three years…. Information flows through electronic channels — telephone, radio, TV, and the Internet — contained almost 18 exabytes of new information in 2002, three and a half times more than is recorded in storage media.

Let’s use this to calculate possible 2008 results. To simplify the math, let’s assume a linear growth rate (which is certainly not the real case). If stored information went from 2.5 EB in 1999 to 5 EB in 2002, then linear growth says in 2008 we created 10 EB. If we assume a constant 3.5 multiplier (again, probably unrealistic) for information flows, then in 2008 we transmitted 35 EB. So the total volume of data generated in 2008 was 45 exabytes. Given Earth’s 6.7 billion population in 2008, that’s 6 gigabytes per person (remember, we’re counting total flows, not just original generation).

When you think about it for a while you’ll remember that, for the entire history of telecommunications, content has been visible to service providers and storage companies. What worries me more than some voyeuristic sysadmin is pernicious snooping by various authorities driven by some deep-seated fear that somone, someplace, is expressing an impure or unsanctioned thought. Where in the days of voice communications the law was very clear that carriers could not be held responsible for the actions of their subscribers, today’s legislative thinking appears to be taking the opposite direction. This is not a healthy turn, by the way; consider also your rights when you enter the United States with your own personal laptop: none.

Which leads back to the question “what about personal or private information?” My answer: encrypt it all. It matters not where you keep it — in the cloud, on your PC, or printed on paper — find an encryption utility you like, scramble your data, and protect your keys. Authorities can probably compel service providers to turn over data; encrypted blobs will be useless to them. If they really want you, they can get a warrant for data on your own computers; you can make even that useless if you encrypt it with a key you don’t know. Recently randomwire published a recipe for combining Dropbox and TrueCrypt. This looks interesting, and I’ll see if I can repeat the experience with SugarSync.

Boys and girls, you know I’ve been urging everyone to encrypt portable data for years. I think we can all agree that cloud = portable, right? Your responsibility to protect your information doesn’t change because you’re using someone else’s hard drives; in fact, it’s a responsibility you simply can’t ignore.

——–
*Funny bit: WordPress’s dictionary needs updating. It lacks an entry for “exabytes,” offering “exacerbates” as a substitute. Maybe they aren’t so wrong, really!

Add to Facebook

Add to Digg

Add to Del.icio.us

Add to Stumbleupon

Add to Reddit

Add to Blinklist

Add to Twitter

Add to Technorati

Add to Furl

Add to Newsvine

Kullanici bilgisayarlarinin DHCP kullanimi konusunda

Bu ayarlar GPO ile yapilamiyor dogrudan. Bunun yerine startup da calisacak bir script ile yapabiliriz.

bunun disinda ayarlari tek tek yapmak birseyleri degistirmek istersek su kullanilabilir: http://gallery.technet.microsoft.com/ScriptCenter/en-us/41e6ab51-78c0-4413-b0...

Son olarak da bu isler netsh komutu ile de yapilabiliyor fakat network baglantisinin adi degistirilmisse calismayabilir. Referans durmasi acisindan gonderiyorum: http://gallery.technet.microsoft.com/ScriptCenter/en-us/5af36ed9-675b-425f-9b...