Saturday, 27 February 2010

Speeding up Vista boot

I started to notice the speed of my laptop on boot was degraded. Upon noticing this I spent hours browsing the web looking for possible suggestions to speed it up. Now as it's a laptop I wasn't expecting wonders as the power is nowhere near that of a desktop but it used to be usable upon log-on rather than having to wait a few minutes so I figured there must be something I could do.

Browsing the web come up with several suggestions about disabling software and other start up processes which I played around with to no avail. In fact the more I messed about the longer it seemed to take.

Within the Event Viewer underneath Applications & Services\Microsoft\Windows\Diagnostics-Performance\Operational I was finding boot up logs of warnings and errors, each time with various other (and sometimes none) messages.

I ended up trying a System Restore to a time before I remembered it being slow and that seemed to work initially but then after installing missing patches and software it started acting slow. So as a final resort I restored it to the initial state on purchase, after backing up all my wanted files of course,

This apparently formatted the c drive and I was expecting everything to be as it was when purchased. Sadly it didn't appear so, so either my memory was failing (likely) and the computer had never been that quick to boot up or something was still amiss.

After more research I then found the following pages:

http://smallvoid.com/article/winnt-xperf-xbootmgr.html

http://helpdeskgeek.com/how-to/speed-up-boot-time-in-windows-vista/

http://forum.thewindowsclub.com/windows-tips-tutorials-articles/30384-how-time-boot-perform-boot-trace-windows-microsoft-windows-7-sdk.html

and, in my opinion, the best one

http://alinconstantin.blogspot.com/2008/06/speeding-up-windows-vista-boot-and.html

They all pointed towards something called the Windows Performance Toolkit which Microsoft has information on at http://msdn.microsoft.com/en-us/performance/cc825801.aspx

I thought I had nothing to lose in trying this out so the first thing I tried upon finally installing the Windows Performance Toolkit, which was a challenge in itself. I had to install the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 first. I only installed the Win32 Development Tools from this as apparently the full install would have taken quite a long time. Once this had been installed I could find the correct WPT file in the C:\Program Files\Microsoft SDKs\Windows\v7.0\bin directory. In my case it was the wpt_x86.msi file as I had 32 bit Vista.

I ran the following in and elevated command prompt once this was installed

xbootmgr -trace boot -traceFlags BASE+CSWITCH+DRIVERS+POWER -resultPath C:\

The system then rebooted and left me with log files in my root directory (thus the C: above) that I could examine. These files gave me the knowledge that the disk activity was running at almost 100% during boot, giving me the impression this could be the main problem.

This looked a similar status to that mentioned by Alin Constantin in his blog so I followed his instructions and tried defragging.

Defragging was tried first using Vista's built in tool, despite Vista stating it wasn't necessary. This took forever and I actually got fed up of waiting for it before downloading another tool which did it far quicker. I wasn't convinced however and I noticed no significant improvement upon reboot after this. The improvement I did get came after I actually left the Vista defragging utility to run overnight and it actually finished. I was still getting errors in the above mentioned event log but they were warnings rather than critical.

The laptop was becoming quite usable again but I decided I had nothing to lose in running the command Alin mentioned that apparently forces "existing internal operating system optimization mechanisms to update their state based on the current configuration of the system".

xbootmgr.exe -trace boot -prepSystem

This was the command I ran and after about 6 re-boots I am left with a PC that now seems to be as it was when I got it. Although I am still getting the odd warning message in the event log.

Tonight I am going to let it defrag in full again just for luck!

Friday, 26 February 2010

Vista WMI Event 10

On a clean install of Windows Vista I was receiving the below error in the Application Event log.

Event filter with query "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA "Win32_Processor" AND TargetInstance.LoadPercentage > 99" could not be reactivated in namespace "//./root/CIMV2" because of error 0x80041003. Events cannot be delivered through this filter until the problem is corrected.

I'm not quite sure why it was appearing but a quick scout around the web gave me the impression that it wasn't causing any real problems. The Windows Management Instrumentation seems to be some kind of system used by Microsoft to manage drivers and interact with Windows.

Removing the error was fairly straightforward and after doing so I found nothing noticeable wrong with the computer.

Here's what I did:

I opened up my Windows services and stopped the "Windows Management Instrumentation" Service. Doing this also stopped two dependent services, "Security Center", & "IP Helper".

Once these were stopped I then ran the Command Prompt (within Start Menu/Accessories) as an administrator (right click on the Command Prompt option).

Within that I typed the following to move the 'faulty' files to a new directory. (Don't type the bits in brackets!)

cd \     (to get to the root of the c drive)
md backupwbem     (to create a directory to move the files to)
cd windows\system32\wbem\repository     (to go to the path containing the files)
move * c:\backupwbem    (to move all files from this directory into the one created above)
exit     (to quit command prompt)

Once I had done this I then restarted the 3 services above ("Windows Management Instrumentation" , then "Security Center", and finally "IP Helper") and all was well.

Friday, 19 February 2010

SEO Musings

A few weeks ago I attended a meeting with a client about the search engine optimisation (SEO) for their website.

I knew some of what they said but there were a few aspects I hadn't contemplated for.

I know that URL Rewriting is a good thing although I'm yet to establish exactly what the best format of a URL actually is. I need to research this for another client soon so hopefully I will come up with a plan. I did find out that hyphens should separate words rather than having them all together (i.e. this-page.aspx rather than thispage.aspx)

Having links inter-linking between the site is also a good thing. So text on the home page could have links within it to pages within the site - then users can navigate without having to only use the menu bar.

Breadcrumbs - I'm not sure if this is good for SEO but it is probably very good for site users to have an idea of where they are currently navigated.

In terms of CSS I had tended to put the odd one or two styles within the actual HTML page but this should all be put in external style sheets - that way robots crawling the site have less text to actually crawl to find the good content.

Error pages should also be more user friendly to the user.

I know some of the above are pretty obvious now they are written down but they are just some things I had never contemplated previously.

I also know the above doesn't even begin to cover SEO in full but I'm hoping by posting this, it will remind me to improve my site building.