scotterman

notes to help me remember

Category Archives: Slow running

Windows 7 TCP Auto-tuning and Server 2003

For most of the year we have been dealing with slow, unreliable connection to our network.  We have Windows Server 2003 for our file server and domain, and mostly Win XP clients, with a few Windows 7.  We have one mobile lab running Windows 7, and a couple of other computers running it as well.

We eliminated several problems this year including blocking DHCP access to non district computers using MAC callout filtering.  Sorry, I can’t remember, offhand, where we found it, but the download and instructions are readily available.  We replaced our “older than the hills” switches, as well as our access points.  The APs were not old, but not as beefy as the replacements, and not all configured the same.  All in all, very good improvements for the year.  We will be replacing our file server in the near future.

But with all the upgrades and changes, one thing has remained constant: poor connectivity to the network.  Students have been able to log on to the network, but then can’t access the file server, or their files don’t open, or worst of all, they can’t save their work.  The connections just seem to time out, or go to limbo.  Mind you, this doesn’t always happen, and almost never when trying to replicate the issue on one machine.  It became clearer that the issues seemed to be mostly affecting the mobile lab running Windows 7.

Research has pointed to Windows 7 TCP auto tuning as a possible suspect.  These articles all discuss auto tuning:

Microsoft Technet Forums
Sevenforums
SpeedGuide (several tweaks for connectivity)
Microsoft Knowledgebase (slow file transfers)

I opened the command window and executed the following commands on the Windows 7 mobile lab computers:

netsh int tcp set heuristics disable
netsh int tcp set global autotuninglevel=disable

The first command turns off the Windows 7 automatic override for TCP settings, and the second turns off the autotuning.  The post by canspec on Seven Forums speaks most directly to this issue.  The other links above include other possible reasons for connection problems.

However, this did not seem to be related to our issues.  Perhaps more significant were making sure that the Windows did not shut off the wireless when not in use (under power management in properties for the wireless controller) , and that automatic caching of files is turned off.

Slow Speed Chase

Ugh – feeling intelligence challenged again today.  Another “slow” laptop came my way again today.  It is kind of like that illusion where the moon looks larger at the horizon.  An older computer often seems slower.  Sometimes there are definite issues, but other times not so much. 

Anyhow, this laptop WAS incre d ib l y,  s  l   o   w.  So I was off and running to chase down the cause of this semi comatose PC. After patiently starting it up (while running 120+ Windows updates on two other laptops, going through the morning email, and updating some inventory lists), I was able to check to make sure the HDD was running in Ultra DMA Mode (and it was). N e x t  I  (had coffee, and moved several surplus iMacs to the hallway whilst I) defragged the HDD and ran a chkdsk.  Both of these went well enough. The Task Manager showed the CPU usage bottoming out at about 30%.  The bottoming out was quite pronounced, with never a dip below.  FINALLY, when checking the system properties yet again, I noticed that the CPU speed was abysmally slow (something like 384 MHz). A reboot followed by a visit to the BIOS setup revealed the ugly truth that, for whatever reason, this laptop was running a wee bit slow.

I tracked down this post which mentioned resetting the BIOS.  After a quick check into the BIOS I found an option to reload the default settings.  Following a much quicker reboot, the BIOS reported a more welcome clock speed.  It remains to be seen if there is an issue which will again put the brakes on this unit.  But for now, we are off and running again.

Update January 19, 2012: Well, it didn’t take long for it to revert to it’s old ways.  A motherboard problem, I’m guessing.  We will let it slowly fade into the past, and send it off for replacement.

Slow Running HDDs on Laptops

Found that HDDs were running in PIO mode instead of DMA (or Ultra DMA).  Check this in device manager under IDE, primary device.  It will say run in DMA mode if available, and then show currently running in PIO mode, if this is the issue.  Ran “HD Tune” program to verify drive performance issues.

Ran a Visual Basic script to reset the registry settings to force WinXP back to DMA mode on the drive.  DMA mode causes the PC to go through the Disk Management processor.  In PIO mode disk access goes through the CPU, causing slow performance and heavy CPU usage (90-100% usage).

Ran this on both Teresa P’s and Amanda K’s Dell D610s.  Teresa’s was back to PIO a few days later.  Amanda opted for a different laptop.  Have seen this on a few others and generally recommend that the user back up all files, and prepare for possible HDD failure.

Script name is resetdma.vbs

Script follows:

‘ Visual Basic Script program to reset the DMA status of all ATA drives
‘ Copyright © 2006 Hans-Georg Michna
‘ Version 2007-04-04
‘ Works in Windows XP, probably also in Windows 2000 and NT.
‘ Does no harm if Windows version is incompatible.

If MsgBox(“This program will now reset the DMA status of all ATA drives with Windows drivers.” _
& vbNewline & “Windows will redetect the status after the next reboot, therefore this procedure” _
& vbNewline & “should be harmless.”, _
vbOkCancel, “Program start message”) _
= vbOk Then
RegPath = “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\”

ValueName1Master = “MasterIdDataChecksum”
ValueName1Slave = “SlaveIdDataChecksum”
ValueName2Master = “UserMasterDeviceTimingModeAllowed”
ValueName2Slave = “UserSlaveDeviceTimingModeAllowed”
ValueName3 = “ResetErrorCountersOnSuccess”
MessageText = “The following ATA channels have been reset:”
MessageTextLen0 = Len(MessageText)
ConsecutiveMisses = 0
Set WshShell = WScript.CreateObject(“WScript.Shell”)
For i = 0 to 999
RegSubPath = Right(“000” & i, 4) & “\”
‘ Master
Err.Clear
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Master
errMaster = Err.Number
On Error Goto 0
If errMaster = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Master
WshShell.RegDelete RegPath & RegSubPath & ValueName2Master
On Error Goto 0
MessageText = MessageText & vbNewLine & “Master”
End If
‘ Slave
Err.Clear
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Slave
errSlave = Err.Number
On Error Goto 0
If errSlave = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Slave
WshShell.RegDelete RegPath & RegSubPath & ValueName2Slave
On Error Goto 0
If errMaster = 0 Then
MessageText = MessageText & ” and ”
Else
MessageText = MessageText & vbNewLine
End If
MessageText = MessageText & “Slave”
End If
If errMaster = 0 Or errSlave = 0 Then
On Error Resume Next
WshShell.RegWrite RegPath & RegSubPath & ValueName3, 1, “REG_DWORD”
On Error Goto 0
ChannelName = “unnamed channel ” & Left(RegSubPath, 4)
On Error Resume Next
ChannelName = WshShell.RegRead(RegPath & RegSubPath & “DriverDesc”)
On Error Goto 0
MessageText = MessageText & ” of ” & ChannelName & “;”
ConsecutiveMisses = 0
Else
ConsecutiveMisses = ConsecutiveMisses + 1
If ConsecutiveMisses >= 32 Then Exit For ‘ Don’t search unnecessarily long.
End If
Next ‘ i
If Len(MessageText) <= MessageTextLen0 Then
MessageText = “No resettable ATA channels with Windows drivers found. Nothing changed.”
Else
MessageText = MessageText & vbNewline _
& “Please reboot now to reset and redetect the DMA status.”
End If
MsgBox MessageText, vbOkOnly, “Program finished normally”
End If ‘ MsgBox(…) = vbOk
‘ End of Visual Basic Script program