What is ICE Affinity ?

Recently a range of dual-core CPU users - those who have Pentium D, AMD X2 and even Pentium 4 HyperThreading CPUs - are complaining of odd game problems, such as random crashes to desktop and lockups. It's happened due to motherboard developers incorrectly initialize processors. If any program use processor tick counter, this program can fail on any dual-core CPU system. Windows constantly balances loading, and uses processors alternately. If both of the CPU have been initialized synchronously this problem does not appear. But most motherboards can not initialize CPU synchronously. If there is small time lag between CPU initialisation, switching from one CPU to another will produce time shift, direct or reverse. Time starts to flow jerky, that make work of most games unstable.

You can think what this is error appear only in games. Unfortunately, this is appear also in device drives for some USB HDD, flash MP3 players etc. It's easy to test, there is what error on your computer or not. Just execute this is test: ICEAffinityTest.exe. If you computer is not perfect, this is test will show you time shift between your CPUs. This is test very simple. You can see below code allow to measure this is time shift:

TLargeInteger Tmp;
QueryPerformanceFrequency(&Tmp);
__int64 Freq = Tmp.QuadPart;
           
QueryPerformanceCounter(&Tmp);
__int64 Value = Tmp.QuadPart;
__int64 LastValue = Tmp.QuadPart + Freq;
__int64 Shift = 0;
           
while(Value < LastValue)
    {
    QueryPerformanceCounter(&Tmp);
    if (Value - Tmp.QuadPart > Shift) Shift = Value - Tmp.QuadPart;
    Value = Tmp.QuadPart;
    }

double TimeShift = double(Shift) / Freq; //seconds

For bug-free motherboard variable TimeShift have to be equal zero. If TimeShift not equal to zero, it's mean what you have serious reason to demand from the motherboard manufacturer to fix this is bug.

While motherboard manufacturer persuades you to wait, you can use ICE Affinity for solving this is problem for a games. You have to specify the application rules to use single CPU (CPU affinity). You can use it from Task Manager, but it's not not conveniently, because need to do it every time when game is started. ICE Affinity is a small utility witch can solve this is problem in more comfortable way. ICE Affinity start any application from command line and specify affinity for it.

ICEAffinity.exe <Affinity Mask> <Application Path> [Application command line parameters]

<Affinity Mask> - is a integer in which each bit represents the processor on which the process are allowed to run.

Example:
ICEAffinity.exe 1 Game.exe - Use only first CPU
ICEAffinity.exe 2 "C:\Program Files\Game\Game.exe" - Use only second CPU
ICEAffinity.exe 3 "C:\Program Files\Game\Game.exe" -CONNECT -LAN - Use both CPU

For using ICE Affinity copy ICEAffinity.exe go a game directory and create shortcut for ICEAffinity.exe. During making shortcut instead of full file path to ICEAffinity.exe like: "C:\Program Files\Game\ICEAffinity.exe"
set
"C:\Program Files\Game\ICEAffinity.exe" 1 Game.exe
where Game.exe is a game filename. Now click to this is shortcut will execute you game.

Download ICE Affinity

P.S. The e-mail has been received from one of users. It can help:

I'd like to thank you for your program Ice Affinity Test and the information on the description page. I was able to resolve a some long standing problems with my system because of it. I'd also like to tell you how I was able to fix my system, since it is not described on your site and it may be helpful to others. I am running an AMD X2 4200+ dual core on an ASUS A8NSLI-Premium motherboard, after updating the bios to the latest version, I still had cpu sync issues although they were not as pronounced from an amount standpoint (originally I had about -250ms and that improved to -80ms on average), but in applications it was just as bad. I came across an MS KB article (# 909944) http://support.microsoft.com/kb/909944/en-us one of the suggestions was to upgrade the CPU driver, I found it at http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_871_13118,00.html in my case it is the driver second from the bottom ( AMD Athlon™ 64 X2 Dual Core Processor Driver for Windows XP and Windows Server 2003 Version (exe) 1.2.2) once I installed the driver and rebooted, all timing tests have come back as perfect and the problem in applications is gone. Please consider sharing this on your Ice Affinity page or in your forum.

Ray Rodriguez <*******@gmail.com>