Posts tagged windows
Windows Server Time Services
Nov 18th
One thing that I think no one cares a great deal about is if their clock is off by a minute or two. Unfortunately, when running computers they do. Even a slight variation in the time can mean a difference from your computers talking to each other to rejecting each other due to security policy violations. In this case because there is a clock skew. So just wanted to write on how to setup an authoritative time server in your Windows AD environment. AD is pretty picky about the time and its the easiest place to setup the authoritative time server for your domain, as all your domain joined PCs will sync pretty quickly if the AD server makes a time shift. This will work on any version of Windows Server Domain Controllers (2000/2003/2008) that I know of. You can even do it on XP, Vista, Win7, but on the desktop there is an extra tab to modify the time server source directly. Also when you join a computer to a domain it will pull the time from the domain controller.
Configuring the Windows Time service to use an external time source
To configure an internal time server to synchronize with an external time source, follow these steps:
- Change the server type to NTP. To do this, follow these steps:
- Click Start, click Run, type regedit, and then click OK.
- Locate and then click the following registry subkey:
- In the right pane, right-click Type, and then click Modify.
- In Edit Value, type NTP in the Value data box, and then click OK.
- Your modified value should look as such:
- Set AnnounceFlags to 5. To do this, follow these steps:
- Locate and then click the following registry subkey:
- In the right pane, right-click AnnounceFlags, and then click Modify.
- In Edit DWORD Value, type 5 in the Value data box, and then click OK.
- The modified value should look as such:
- Enable NTPServer. To do this, follow these steps:
- Locate and then click the following registry subkey:
- In the right pane, right-click Enabled, and then click Modify.
- In Edit DWORD Value, type 1 in the Value data box, and then click OK.
- Your changed value should look as such:
- Specify the time sources. To do this, follow these steps:
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
- In the right pane, right-click NtpServer, and then click Modify.
- In Edit Value, type Peers in the Value data box, and then click OK.
Note Peers is a placeholder for a space-delimited list of peers from which your computer obtains time stamps. Each DNS name that is listed must be unique. You must append ,0×1 to the end of each DNS name. If you do not append ,0×1 to the end of each DNS name, the changes made in step 5 will not take effect. You can add additional NTP servers with a single character “space” between the ‘,0×1′ and the next server. Look at my screenshot below for a visual explanation. I recommend setting three as this is usually the standard for NTP. You can go to the NTP Pool website here to find what servers work best for you. Closer to you is always better. In my case, I used the Japan pool.
- Locate and then click the following registry subkey:
- Select the poll interval. To do this, follow these steps:
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval
- In the right pane, right-click SpecialPollInterval, and then click Modify.
- In Edit DWORD Value, type TimeInSeconds in the Value data box, and then click OK.
Note TimeInSeconds is a placeholder for the number of seconds that you want between each poll. A recommended value is 900 Decimal. This value configures the Time Server to poll every 15 minutes. This will tell your domain controller to communicate with the NTP pool servers that you just set to make sure that it is within the correct time boundaries.
- Locate and then click the following registry subkey:
- Configure the time correction settings. To do this, follow these steps:
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\MaxPosPhaseCorrection
- In the right pane, right-click MaxPosPhaseCorrection, and then click Modify.
- In Edit DWORD Value, click to select Decimal in the Base box.
- In Edit DWORD Value, type TimeInSeconds in the Value data box, and then click OK.
Note TimeInSeconds is a placeholder for a reasonable value, such as 1 hour (3600) or 30 minutes (1800). The value that you select will depend upon the poll interval, network condition, and external time source.
- Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\MaxNegPhaseCorrection
- In the right pane, right-click MaxNegPhaseCorrection, and then click Modify.
- In Edit DWORD Value, click to select Decimal in the Base box.
- In Edit DWORD Value, type TimeInSeconds in the Value data box, and then click OK.
Note TimeInSeconds is a placeholder for a reasonable value, I usually use double what I set the poll interval to. In this case 30 minutes or 1800 seconds. The value that you select will depend upon the poll interval, network condition, and external time source.
- Locate and then click the following registry subkey:
- Quit the registry editor.
- At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:
- The time then almost immediately updated to the correct time as you can see in the next two pictures of the corrected time and also in the event log (eventvwr.msc)
I hope that this helps anyone who is trying to setup an authoritative time server in their Windows Domain network. It’s not really hard. Just make sure if you are changing multiple machines that the time you are modifying isn’t terribly huge. (ie. half a day or something.) If you change one AD machine and the clock jumps forward or back half a day (probably due to a time zone setting) the other servers will loose trust between the other machines. Authentication processes will stop working and whatever else is based on those servers trusting each other. A snowball of problems so just might want to keep that in mind.
This process was taken from the Microsoft article source KB816042.
Easy Tweaks for Windows Desktops to get some extra performance
Nov 11th
Thought I would add my small share of some simple Windows tweaks that I run to get a bit of extra performance out of my computer with everyone else. There isn’t anything here that should destroy your system, but with anything please keep in mind what you are doing.
Enable Multi-Core Booting (XP/Vista/7)
With dual-core desktops almost the norm now with any PC you get these days, I have no idea why Window’s cannot detect and enable this during install. But turning it on after your installation is still quite simple. You will also need administrator access to run this command.
- Click on the “Start” icon and then “Run As…” (or just press Windows Key + R)
msconfig
Then press enter.
- From here you can change all your startup services for your Windows installation.
- If you want to turn off certain boot specific services you can do that, but for this we will just look at the “Boot” tab. Press “Advanced Options“.
- Tick the “Number of processors” box and enable the maximum amount of processors you have to enable during boot time.
As indicated below I have enabled dual-core booting for my dual core desktop.
There is also an area for the “Maximum memory” as well. I have tried it before on my desktop but it seemed to reduce the amount of maximum memory I have. Putting 4GB in then rebooting showed in my computer properties that I only have 3.68GB or so. Leaving it off shows the full 4GB so you can try enabling it if you so desire, but off works fine for me.
- To finish press OK twice and you will get a message warning about needing to reboot to apply the changes. Press okay to reboot and the next boot your computer will boot up with multiple cores and hopefully that much faster.
Reclaim some disk space back from Windows. (Vista/7)
This next one is an option that is mixed if you want to leave on or off. It involves the hibernate disk file. By default Vista/7 have this enabled. As it is a hibernation file, it is exactly the size of memory that you have installed in your computer. 8GB of memory means a 8GB chunk of space on the hard disk. If you are trying to reduce the installation footprint or have a small (SSD) drive to begin with this could be a lot of valuable space. Or especially a desktop where usually the computer in question might be in sleep mode or off. Disabling this is quite simple, and you get the amount of memory reclaimed from your harddisk instantaneously. No reboot needed either!
- Open a command prompt as an “Administrator” level user and run the command:
powercfg -h off
- That’s it you’re done. You can run a quick
dir /ah
on the root OS directory to see that the hiberfil.sys has been removed to confirm. You can see this in my before and after screenshots.
I’ve just saved myself 6GB+ of diskspace on function that I won’t use on my desktop. With RAM prices becoming ridiculously cheap, and having 4GB or more in a system isn’t that uncommon anymore. Why anyone would want to try and save a system state of GB of data is beyond me. It will probably take longer for the system to come out of hibernation than it would with a fresh startup. Batteries are getting better as well, so unless you’re crossing the ocean, leaving the system in sleep mode should be sufficient. You’ll have almost an instant on, aside from the larger drain on the battery rather than having it in hibernate mode.
Remove and disable the System Restore Points (Vista/7)
Note: The previous two tweaks are fairly simple and as long as you don’t turn off all of your services in msconfig, the system usable. This next one does have possible ramifications down the road should you need to restore the system from a previous state. I don’t install a lot of software so I usually turn this off to help with installations, updates, and such.
- Click on the Windows “Start” icon > Computer (right click) > Properties
- Click on Advance system settings > System Protection > Click Configure
- Change the Restore Settings to Turn off system protection. Also Delete any current restore points. Note: After doing this, any ability to revert to the “Last known state” function will cease to work. You will gain a performance boot when installing updates and other programs though as its not having to make several copies of itself when installing.
Press okay to complete.
Press yes to continue and you will come back to the properties screen. You will now see that system protection is off. Press OK again one more time to leave the system properties.
Modifying the swap disk file
If you have a lot of RAM in your machine you might want to try disabling the page swap file on your PC as well. That way Windows has no ability to try and make unnecessary swaps to the disk. At 8GB of RAM you can pretty much have almost anything under the sun open for days and it will be alright. 4GB is also doable, but I would recommend not to open as many applications. Again mileage will vary depending on what you run. I would recommend that you run “taskmgr” and look at the running processes (as administrator) during normal use to see how much memory each application is using during normal usage. At 2GB or less, it is probably best to create a fixed file size of a 1:1 ratio. Not as good as no swap file, but at least the system will not be trying to resize the swap file while at the same time trying to write data to it. (This is the default setting for Windows.)
- Click on the Windows “Start” icon > Computer (right click) > Properties
- Click on the Advanced tab > press Settings…
- In the Performance Options window goto the Advanced tab and press Change…
- A new window titled Virtual Memory will appear. Deselect the “Automatically manage paging file size for all drives” then proceed to set a custom size. For 8GB+, “No paging file” should work. For 4GB, it’s a toss up. I’ve done fine with “No paging file”, if your system starts crashing applications unexpectedly check the Task Manager and if you need more memory set a 4096MB Initial and Maximum size. This effectively fixes the swap file size and the system to make the hard disk delete and recreate swap files when it needs to grow them. For <2GB, I highly recommend setting a custom size of 2048MB. If you don’t you’ll probably start seeing a lot of random applications frequently after using your computer for some time.
- Press Set to apply the settings, and then OK to exit out. Press OK again two more times to leave the System Properties. At this point you will be reminded that your changes will not take effect until you reboot your system. Reboot the system and the new virtual memory settings will take effect.
These are just some of the free simple solutions that I apply to my computer to keep it zippy. Hope that it helps you. If I find anything else I’ll update this again.































Recent Comments