Wednesday, April 30, 2014

Build an energy efficient computer



Here I will show a sample configuration of an energy efficient workstation.

This build, in my view, will provide power efficiency and stability as well as good performance.

PSU - Any 80 Plus (and up - such as Bronze, Silver, Gold, Platinum and Titanium)
Top brands include: Corsair, Seasonic, Cooler Master, Thermaltake, Antec and others.
I would recommend Corsair AX series power supply (rated 80 Plus Platinum) as it would waste the least power.

CPU - Any Intel 4th Generation CPU which model ends on T.
I recommend i7-4765T as its TDP is at 35W. So at its full power it won't go beyond 35 watts.

Motherboard - Leading low watt brands include Asus, EVGA, Gigabyte and Asrock. A gaming motherboard will typically consume much more power than a mini-ITX motherboard.
I recommend Asus Z87i-PRO - good performance and low power.

RAM - There is a low voltage type of DDR3 called DDR3L which uses less power, also emits less heat. Brands include Kingston HyperX Lovo or Genesis and Adata XPG, among others.
I recommend Kingston HyperX LoVo - Kingston's special line of low voltage ram.

Hard Drive - Western Digital Caviar Green or Seagate Barracuda LP for HDD, Samsung 840 Series for SSD.
I would recommend a Samsung 840 EVO or PRO series drive.

Optical Drive - most optical disc drives are the same power, however a slim drive version will consume less power than the standard version.

Monitor - Any LED backlit LCD monitor, preferably with high Energy Star compliance. The smaller the size of the screen - the lower the power consumption. Here's a list of 18-22 inch monitors and their wattage.



Tuesday, April 29, 2014

Turn an IBM X3100 M4 Server into a workstation.



This is a neat little server that comes from IBM that officially doesn't support Windows 7. In this post I will guide you through making it run Windows 7 using the built in LSI Raid controller and a RAID mode.
If you decide to use AHCI mode however, it becomes easier (as it is supported by Windows 7), but you will be missing a performance (or stability) increase you'll get with the RAID.

The LSI raid controller on this server does not have drivers that support Windows 7 - only Windows Server 2008 (R2). There's also a great many driver packages available from IBM for this controller, so choosing the right one is quite time consuming. After 4 different failed driver packages I finally found the right one that would enable the RAID controller inside the Windows 7 installation PE. I have uploaded it HERE.
Just unrar and copy it onto a flash drive and browse to it during the installation (when it fails to find any hard disks).

Once the system finishes installing - most of the drivers will be installed, the only ones that won't be are the Chipset and the onboard video (Matrox G200ER2). Download the driver for it here.
Chipset drivers are available here.

Monday, March 10, 2014

Sync files to OneDrive and a local server together automatically.

I have always thought that keeping valuable data in more than one place is essential to productivity. So it's always best practice to sync your files to an external location, especially in the work environment. A good stable sync is what we will talk about in this post.

Recently, I migrated one of the companies that I work for to Office 365. As some of you may know - Office 365 packages come with the OneDrive service that provides 25GB of online storage.
So up until the migration - the users' data was automatically synchronized to the in-house file server (using Offline Files). There is a great many ways to synchronize data from a user's machine to a network location - from using Offline Files, to scripting, to third party software. In this scenario I will talk about synchronizing to both a local network location and a cloud service (OneDrive for Business in this case) without using any third party software.

First, let me point out that OneDrive currently provides one sync folder on the computer where everything that you want synced has to go. You cannot designate other folders to be synchronized to OneDrive unless you copy them to the sync folder and continue to work from there. So let's say you do that but you'd still want the same data synchronized to your local file server. And you don't want to use third party software that may create system instability, or load it up.
So, we're going to accomplish this task by using a Robocopy monitoring script that will be running invisibly in the background. All the time.

So we create a batch script that will contain the following:

@echo off
robocopy "Source OneDrive Folder" "Destination network folder" /MIR /COPY:DT /MON:1

Now (assuming your system partition is C:), your source OneDrive folder is usually located at

C:\Users\username\OneDrive
or
C:\Users\username\OneDrive for Business

Your destination should be a local folder or a network share. Don't forget the quotation marks.

You might also need your shared folder credentials if the share is password protected, so to log into the share correctly the script would have to present the correct credentials. To do that you will have to add a line that logs into the share (before the Robocopy command):

net use \\servername /USER:username password

After the Robocopy command you might want the script to log out, using the following command:

net use \\servername /d

This is a syncing script, that's why we're using the /MIR switch, this means that if we delete the file in the source folder, the file will soon be deleted in the destination folder. If you wish to copy files and not sync them, you can use /E /COPY (or /COPY:DT) instead of /MIR.

I also should mention that /COPY:DT switch in the above script is optional, it instructs Robocopy to preserve the files' Date and Time stamps but not attributes. I just prefer using it in this situation for better stability.

Now we can save the script as a BAT or a CMD file and run it (preferably in elevated mode) to see how it works. The script will never close unless the command prompt is closed manually, so this may create an annoyance to the user. That's why it may be a good idea to automate it's execution and keep it hidden from the user.

To do that we go into Task Scheduler and create a task to run this script. I recommend the trigger being the user's logon. Because if the trigger is a certain time of day - there may be duplicates of the same process, because the process never stops anyway.

Make sure you set the SYSTEM account as the account running the task, and mark it Hidden. This will allow the script to run invisibly in the background. This starts the cmd.exe and robocopy.exe processes and they only take a few hundred kilobytes in memory.


You can also check out my post on how to sync network shares to OneDrive automatically.

Friday, January 10, 2014

How to optimize Windows 7 for an SSD drive




As some of you may know, an SSD drive has a limited lifespan of around 100-1000 written terabytes (here's an interesting link that shows some statistics on SSD lifespans). Therefore it is best practice to minimize the amount of data written daily onto it, especially if it's a system disk.

Here I will show how to move the most data intensive system folders to another drive, and to tweak the system to write less onto your SSD operating system drive, under Windows 7.

It is important to note that if you care about the lifespan of your SSD drive, it is always a good idea to have an additional drive in your configuration (another (less valuable) SSD or another HDD drive) to store your user files and to minimize the load on the main SSD drive.

First we start by moving the default pagefile to your other drive's partition by going into Start > right click on Computer > Properties > Advanced System Settings > Advanced (tab) > Under "Performance" click on Settings > Advanced (tab) >  Click on "Change" under Virtual Memory. This will open a new window called "virtual memory" where "Automatically manage paging file size for all drives" will be checked. Uncheck the box near that sentence and click on your system partition shown in the list of all partitions. Now click on "No Paging File" radio button and click on "Set". This will remove the pagefile from your system partition. Now, some people who have 16GB RAM or more in their machine leave Windows running without a pagefile, but I do not recommend it because some problems may happen, such as when explorer.exe suddenly bloats to over 15GB of RAM.
Now click on a different partition (located on your other drive) and click on "System managed size" radio button, and click on "Set" to enable it. Click OK and restart your system. Once you boot back, you will see that your system partition has more free space than before, on the account of us moving the pagefile to another partition.

Next we should disable Hibernation, which also create a temp file on your system partition (which CANNOT be moved) called hiberfil.sys. We do this by going into command prompt in elevated mode and running:

powercfg.exe /hibernate off

This will immediately disable hibernation and erase the hiberfil.sys file. If you must put the computer to sleep - use sleep mode if your motherboard supports it correctly, or simply turn off your machine. Your SSD is fast enough to boot real quick with no need for sleep mode.

Next - we move on to the system's temp folder, user's temp folder and temporary internet files.

First off, we should create a main temp folder on the secondary hard drive. Let's call it MainTemp. Inside it - create a folder for the system's temp files, let's call it SysTemp. Now for the user's temp files - UserTemp.

To change the system's and user's default temp folder location go into Start > right click on Computer > Properties > Advanced System Settings > Advanced (tab) > Environment Variables...
Here you will see two fields that show User Variables and System Variables. User variables will usually only cover TMP and TEMP entries, which you should both change to the path you crated on that other drive to the user's temp folder that we called UserTemp.
In the system variables, scroll down to the same TEMP and TMP entries, and change their paths both to the new folder we've created on the other drive, called SysTemp.
So if the other drive's partition is D, then the user's TMP and TEMP should point to D:\MainTemp\UserTemp
And the system's TMP and TEMP should point to D:\MainTemp\SysTemp.

After restarting, these changes should be enacted.

Now, we move on to the Temporary Internet Files.

With Internet Explorer it's quite easy to change the temp folder location.
First we should add another folder under our MainTemp folder on the secondary drive, let's call it IETemp.

Then, go into IE, click on the Alt button on the keyboard, this will bring up the menus. Click on Tools, Internet Options, under Browsing History click on Settings, click on Move Folder and navigate to the newly created temp folder on that other drive. Click on OK, it will ask you to save new location and reboot, click on Yes, and the computer will reboot.

Google Chrome however does not let the user easily change the location of the temp folder.
Let's again create a new temp folder for Chrome on our secondary drive, let's call it ChromeTemp under Maintemp.

What we have to do is create a shortcut to Chrome on the desktop (if it's not already there), and right click it and choose Properties. This will bring up a window with the shortcut settings. In the "Target" field we have to add a command that will point Chrome to the new temp folder we created earlier.
The existing path is something like this:

"C:\Program Files\Google\Chrome\Application\chrome.exe"

We want to change it to:

"C:\Program Files\Google\Chrome\Application\chrome.e­xe" --disk-cache-dir="D:\MainTemp\ChromeTemp"

Click OK to save the new shortcut changes.

So now using this new shortcut - Chrome will store all the temporary files on the secondary drive.

Hopefully these tweaks should free up more space on your SSD and let it live longer.

Monday, December 9, 2013

Mouse and keyboard stop working in Windows 7

Today I have witnessed a rare problem with mouse and keyboard being unresponsive in Windows 7, even though they work in BIOS, boot manager, mini-windows, etc.

If this happened to you, it may be due to an unsuccessful upgrade or installation of Kaspersky Antivirus 2013.

The solution is quite complex and involves editing the registry offline, if you have never edited the registry before - this may not be a good time to start.
There are numerous guides online how to get into your registry when you can't do it from your system, I will not go into this here.

When you load your registry hive, you need to check two keys. The first key has the settings for keyboard:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96b-e325-11ce-bfc1-08002be10318}

and it should have a string called UpperFilters and it should have a value kbdclass (if there are any other values, delete them).

Second key has settings for the mouse:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96f-e325-11ce-bfc1-08002be10318}

and in the same UpperFilters string we should have the value mouclass (again, if there is anything else inside this string, delete it).

Here's an example of what it looks like when there is a residual erroneous key from Kaspersky inside the UpperFilters string for the keyboard:


That value "klkbdflt" is the troublemaker.


Friday, December 6, 2013

How much power does my computer consume?




This is a very interesting question that is becoming more current with all the green power awareness nowadays.

In average, an office desktop workstation will consume 130 to 175 watts per hour. That includes the PC (with a 65w based CPU, HDD drive and a basic video card) and a 40 watt LCD monitor.
The consumption is quite variable because the CPU consumes power based on its load, so at near 95% of CPU load this kind of station will consume around 175 watts, and when idle - it goes down to 130 watts. The monitor also varies in power consumption based on the backlight luminance, so at max luminance this monitor will consume 40 watts.

But does the station consume any power when in sleep mode or powered off completely? Yes it does. The PC itself may consume around 6-7 watts when turned off but plugged in (some motherboards power off completely, while others still provide +5V to USB ports). Same goes for the monitor in standby mode (3-6 watts).

Now, what is important when choosing or building a computer that is energy efficient?

First we start with the CPU, which are currently Haswell based CPUs by Intel, or Piledriver based Richland CPUs by AMD.
The lowest power consuming models of these CPUs (35-45watts) will have the letter T at the end of the model name (i.e. Pentium G3420T by Intel or A10-6700T by AMD).

Power Supply Unit - Power supply quality matters when we're talking about power efficiency, because a lot of energy is wasted when the PSU converts AC to DC necessary to power the computer.  So the better the PSU quality - the less power will be consumed. A good indication of power supply quality is the 80 Plus certification.

Motherboards - regular motherboards usually consume less power than high-end ones because they have less features (slots, ports, etc). Some motherboard manufacturers provide power saving technology built into their products such as Gigabyte's Dynamic Energy Saver or Asus' EPU technology.

Video cards - a video card is usually necessary for gaming or advanced image processing (CAD, 3D or video editing), and usually is power consuming, so unless there's a specific need for it - it may not be used.

Hard Drive - SSD drives consume about 70% less power than HDD drives. However, some energy efficient HDD drives will spin down when idle (such as the Green drives by WD), so that is a plus when building an energy efficient workstation.

Optical Drive - DVD drives generally consume a bit less power than Blu-Ray drives. An external USB optical drive may be used when necessary.

Cooling - A low power CPU will require less cooling, however cooling fans are not very power consuming, generally 1-6 watts.

Monitor - LED backlight based monitors generally consume less power (over 50%) than conventional LCD monitors, so replacing an older LCD monitor with a new LED based LCD monitor may be a good idea.

Speakers - Unless sound quality is of high importance, it might be quite efficient to use USB powered speakers, not only to use one less power socket, but also to save power by having small speakers that do not have their own power supply that wastes power.

So, to summarize - the most energy efficient component replacements are CPU, PSU, hard disk (SSD), and the monitor.

Click HERE for a sample configuration of an energy efficient station.


Tuesday, December 3, 2013

Windows cannot currently check for updates because the service is not running



Sometimes Windows 7 may not let you download updates because of some issues with the Software Distribution folder. This may even happen soon after a fresh install of Windows.

Here's how to fix it.

Open command prompt in elevated mode and type:

net stop wuauserv

This will stop the Windows Update service.

Next enter this command:

ren %windir%\SoftwareDistribution softwaredistributionold

This will rename the Software Distribution folder so the system will have to recreate a new empty one.

Now all we have to do is restart the Windows Update service by entering:

net start wuauserv

Now we can retry downloading updates from Windows Update.