System Performance Tweaks #2– Delete Pagefile.sys in Windows 7

I have 16GB of memory on my current laptop and recently discovered that it never seems to use much of it, but swaps to the hard drive like crazy. After investigating I found two things that have improved my performance this is one of them. I am also looking at having my work laptop replaced so I wanted to get this documented somewhere that was not going to be lost.

The pagefile.sys is the virtual memory file the system uses to cache data. This file can become very large. Whenever you don’t have enough physical RAM the system can use the virtual RAM to speed up the current process. So, the virtual memory is quite essential for a fast system and it is not recommended to disable it. Even on systems with a lot of RAM you will need this file badly. Actually, the more physical RAM you have, the more virtual memory you should have. As a rule of thumb, you should always have 1.5 times more virtual memory than physical RAM, recommended is 2 times more.

Deleting the pagefile.sys is not a good solution and you should only do it if you need disk space urgently

Disable/Delete Pagefile.sys

  1. Open Control Panel
  2. Click on System and Security
  3. Click on the System header
  4. Click “Advanced system settings” on the sidebar
  5. On the Advanced Tab in the Performance section click Settings…
  6. On the Performance Options dialog click Advanced
  7. Click the change button

image

Final steps

At this point what you do may vary depending what you want the outcome to be.  First uncheck “Automatically manage paging file size of all drives”.  As you can see I opted to keep the pagefile.sys file but make it very small, the other option is to operate without a pagefile.sys file by choosing the “No paging file” option.

System Performance Tweaks #1– Disable Hibernation

I have 16GB of memory on my current laptop and recently discovered that it never seems to use much of it, but swaps to the hard drive like crazy.  After investigating I found two things that have improved my performance this is one of them.  I am also looking at having my work laptop replaced so I wanted to get this documented somewhere that was not going to be lost.

Disable Hibernation

Hibernation uses a lot of disk space to store system state so it can be recovered.  The sleep mode does what I want, but I couldn’t figure out how to get rid of the Hibernate file (hiberfil.sys).  You can delete the hiberfile.sys but it will just come back so you need to disable the Windows Hibernation function.

Disable Hibernation GUI

The Hibernate settings are stored under the Control Panel’s Power Options applet, but they are buried under each power plan’s advanced power settings submenu.

http://i.techrepublic.com.com/blogs/win7_power_options_03.png?tag=siu-container;attachment_1496

Disable Hibernation – Command Line

This is the only guaranteed way to disable Hiberation on Windows Vista, and Windows 7.

  1. Open the command prompt with administrative privileges
  2. Enter “powercfg.exe –h off”
  3. Exit the command prompt

http://i.techrepublic.com.com/blogs/powercfg_01.png?tag=siu-container;attachment_1503

 

Re-enable Hibernation

To re-enable Hibernation, check the Enable Hibernation in the GUI or enter “powercfg.exe –h on” in a command prompt with administrative privileges.

Executor: Where did my keywords go?

I use Executor (http://executor.dk) and love it.  Well, most of the time I do.  Every once in a while it seems to freak out and looses all of it’s settings including keywords.  Loosing the setting are no big deal, but the keywords?

I have use various methods to resolve this in the past, remove and re-install etc.  Last week it happened again.  Removing and re-installing did not help at all, it just looked blank.

Executor does such a great job of just working in the background and requires very little attention I had not explored it’s vast features.  Well, this time I found that all of the default keywords could be restored by importing them from the original files that were used during install.

On the keywords tab context menu is “Import keyword from file…” which allowed me to import see the standard.exc which was all the missing keyword AND a windowskeywords.exc with added some I did have before.

I also noticed a “Export keywords..” with once I had them all setup the way I wanted I promptly used to export them all to a file of my choosing to make it easier to fix next time.

“Import from start-menu…” also looks very interesting and I am sure will save me some typing in the future.

Delete Team Foundation Server Work Item with WitAdmin

I have been keeping my source control in Team Foundation Server for years, but have faultered when it comes to using Work Items. Oh, I have tried a few time and then stopped for various reasons.  Today I thought it would be good to clean up the old work items and try again.  This turned out to be a bit of an issue. There is not right-click delete, selection all and then choose delete from the action menu. 

So how do you delete a Work Item?

I finally found it the WitAdmin command line tool, part if the Team Foundation Server Power Tools, allows you to destroy work items by id.

Usage: witadmin destroy /collection: collectionUrl /id: id

Example: witadmin destory /collection:http://tfs.example.com:8080/DefaultCollection /id:112345

This allowed me to delete the work items, good thing was that I didn't have that many to delete.

TFS Remove Local Files for Branch

Since I am the build manager for my team and have to touch every release I get a lot of files on my hard drive that I don’t need anymore.  I mean when we are on release 15.2 do I really need a local copy of release 8 or 10, or 14 for that matter.  I used to just delete the local copies, but TFS still thinks you have them and starts acting up.  Of course there is a way to delete them via Source Control Explorer but it is not very obvious.  I found the solution on a post titled “TFS Top Tip #11 –Removing source control files from your local file system” by Martin Woodard.

It appears that if you do a Get Specific Version and specify Changeset of 1 the files will be deleted locally and the server will know it.  Changeset 1 is a special Changeset  that only contains the root ($/).  So by getting Changeset 1 you basically get nothing, there were no files in the source control tree when this Changeset was created.

This is definitely not as easy a deleting a branch in git, but I does help me keep my release folders cleaned up. Thanks Martin for posting this.

Calendar

<<  October 2014  >>
MonTueWedThuFriSatSun
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Month List