Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4 ... 6   Go Down

Author Topic: ProcessAffinityMask settings tool - assign CPU Cores to IL-2  (Read 26841 times)

0 Members and 1 Guest are viewing this topic.

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 24023
  • Taking a timeout
    • STFU
ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« on: February 12, 2013, 06:46:14 AM »

Hi folks,

Recently there have been ongoing discussions about the "ProcessAffinityMask" parameter in conf.ini and it's meaning, so I decided to write a little tool which you can use to calculate the right setting for your PC.
The tool should automatically detect the number of physical CPU cores and the availability of Hyper Threading on your PC.
In case detection went wrong, you can manually adjust those parameters.
Eventually you can check which cores to run IL-2 on and if you ran the tool from within your IL-2 game folder, you can write the new ProcessAffinityMask to your conf.ini with a simple click on a button:


(The screenshot above shows the tool running on an Intel Core i7-920 PC, 4 physical cores (all selected for IL-2) and Hyperthreading (no HT core selected).

The tool need the Microsoft .Net Framework to run (at least Version 2.0, any later version will do as well).
Most likely you have it on your PC already, if not the tool will complain about it, in that case go here to grab your copy of the .Net Framework:
http://msdn.microsoft.com/netframework/default.aspx

The tool itself is available for download here:
https://www.mediafire.com/?c8sj3m14mvn115j

It's packed using 7-zip packer and it is password protected (Mediafire can be tricky about executable files), the password is:
"sas1946" (without double quotes, only small letters and numbers)

@edit by SAS~Storebror:
This 10-year old tool certainly deserved an update.
As such, below you will find a new version 2 of this tool with just minor changes:
  • .NET Framework is 4.0 now. Should work out of the box for Windows 10 and later. No need to install .NET Framework 2.0/3.5 anymore.
  • When you put the "ProcessAffinityMask.exe" into your IL-2 game folder, it will read conf.ini on startup and set the core affinity accordingly, i.e. by launching the app you get a graphical representation of your current settings - if the value is present in your conf.ini, otherwise this tool shows "0" per default.

ProcessAffinityMask v2 download link:
https://www.mediafire.com/?ku0runhgg9jrkhj

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

BravoFxTrt

  • "BIGFOOT"
  • Modder
  • member
  • Offline Offline
  • Posts: 13433
  • Flying Ass Clown #13
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #1 on: February 12, 2013, 06:48:54 AM »

Thank you Mike.
Logged
MSI R9 280X 6GB x2/Crossfire /ASUS M5A99FX PRO R2.0 Mobo/AMD FX 4170 Bulldozer 4core CPU/RAM Kingston HyperX FURY 16GB/ Corsair RM 1000WATT PSU/Windows 10 Enterprise 64bit

Blaubaer

  • member
  • Offline Offline
  • Posts: 514
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #2 on: February 12, 2013, 07:12:59 AM »

Is it right, that IL-2 can only be executed on 1 core at the same time? Using 4 cores the tasks switch from core to core, right? Isn't it better to use just 1 core? And what's HT doing?

Regards, der Blaubär
---
IL-2 Sturmovik 1946 >>> Blaubär Club
Logged

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 24023
  • Taking a timeout
    • STFU
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #3 on: February 12, 2013, 07:18:09 AM »

IL-2 isn't optimized for multithreading.
Still there are several threads running in parallel and some don't need no synchronization, so depending on your PC (cache size matters much in these terms) you might get different results.
Just for instance when I start IL-2 4.11.1m with a Bf-109 groundstart I have 21 threads running in il2fb.exe.

Hyperthreading in short words simulates two cores for each physically available core.
This was used by Intel back in the days of the fastest single core Pentium IV processors in order to get the pipes filled better.
For modern multi core CPUs it's usually useless to assign those virtual cores, 99% you're better off if you use the physical available cores only.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

Ass Eagle

  • member
  • Offline Offline
  • Posts: 938
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #4 on: February 12, 2013, 08:51:01 AM »

I didn't notice much difference, except for PAM=3 was a little better. Otherwise all is about the same.

The Black Death:
DBW v1.71, with all the eyecandy effects, 2048HD skins/textures, etc..

ProcessAffinityMask=3 <- what I always read was correct with dual core
Frames, Time (ms), Min, Max, Avg
  4829,    152834,  19,  69, 31.596

ProcessAffinityMask=5 <- what marcost said to use
Frames, Time (ms), Min, Max, Avg
  4748,    152637,  16,  68, 31.106

;ProcessAffinityMask=5 <- here I disabled and let W7 decide
Frames, Time (ms), Min, Max, Avg
  4752,    152802, 18,  68, 31.099

ProcessAffinityMask=15 <- inludes hyperthreading
Frames, Time (ms), Min, Max, Avg
  4785,    152508,   18,  70, 31.375

----------------------------------------------------------------------------------------------------
Code: [Select]
~Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1
~Processor: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ (2 CPUs), ~2.6GHz
             Memory: 4096MB RAM
~Card name: AMD Radeon HD 6570
       Manufacturer: Advanced Micro Devices, Inc.
          Chip type: AMD Radeon Graphics Processor (0x6759)
           DAC type: Internal DAC(400MHz)
     Display Memory: 2805 MB
   Dedicated Memory: 1014 MB
      Shared Memory: 1791 MB
       Current Mode: 1680 x 1050 (32 bit) (60Hz)
       Monitor Name: SyncMaster T220HD(Digital)
      Monitor Model: SyncMaster
         Monitor Id: SAM03F1
        Native Mode: 1680 x 1050(p) (59.954Hz)
        Output Type: HDMI
Code: [Select]
CPU-Z TXT Report
-------------------------------------------------------------------------

Binaries
-------------------------------------------------------------------------

CPU-Z version 1.61.5

Processors
-------------------------------------------------------------------------

Number of processors 1
Number of threads 2

APICs
-------------------------------------------------------------------------

Processor 0
-- Core 0
-- Thread 0 0
-- Core 1
-- Thread 0 1

Timers
-------------------------------------------------------------------------

ACPI timer 3.580 MHz
HPET timer 25.000 MHz
Perf timer 25.000 MHz
Sys timer 1.000 KHz


Processors Information
-------------------------------------------------------------------------

Processor 1 ID = 0
Number of cores 2 (max 2)
Number of threads 2 (max 2)
Name AMD Athlon 64 X2 5000+
Codename Brisbane
Specification AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Package Socket AM2 (940)
CPUID F.B.2
Extended CPUID F.6B
Brand ID 4
Core Stepping BH-G2
Technology 65 nm
Core Speed 2591.0 MHz
Multiplier x FSB 13.0 x 199.3 MHz
HT Link speed 996.6 MHz
Stock frequency 2600 MHz
Instructions sets MMX (+), 3DNow! (+), SSE, SSE2, SSE3, x86-64, AMD-V
L1 Data cache 2 x 64 KBytes, 2-way set associative, 64-byte line size
L1 Instruction cache 2 x 64 KBytes, 2-way set associative, 64-byte line size
L2 cache 2 x 512 KBytes, 16-way set associative, 64-byte line size
FID/VID Control yes
Max FID 13.0x
Max VID 1.350 V
# of P-States 6
P-State FID 0x2 - VID 0x12 (5.00x - 1.100 V)
P-State FID 0xA - VID 0x10 (9.00x - 1.150 V)
P-State FID 0xC - VID 0x10 (10.00x - 1.150 V)
P-State FID 0xE - VID 0x0E (11.00x - 1.200 V)
P-State FID 0x10 - VID 0x0C (12.00x - 1.250 V)
P-State FID 0x12 - VID 0x0A (13.00x - 1.300 V)


K8 Thermal sensor yes
K8 Revision ID 6.0
Attached device PCI device at bus 0, device 24, function 0
Attached device PCI device at bus 0, device 24, function 1
Attached device PCI device at bus 0, device 24, function 2
Attached device PCI device at bus 0, device 24, function 3

Code: [Select]
[Render_OpenGL]
TexQual=3
TexMipFilter=3
TexCompress=0
TexFlags.UseDither=0
TexFlags.UseAlpha=0
TexFlags.UseIndex=1
TexFlags.PolygonStipple=0
TexFlags.UseClampedSprites=0
TexFlags.DrawLandByTriangles=0
TexFlags.UseVertexArrays=0
TexFlags.DisableAPIExtensions=0
TexFlags.ARBMultitextureExt=1
TexFlags.TexEnvCombineExt=1
TexFlags.SecondaryColorExt=1
TexFlags.VertexArrayExt=1
TexFlags.ClipHintExt=1
TexFlags.UsePaletteExt=0
TexFlags.TexAnisotropicExt=1
TexFlags.TexCompressARBExt=0

TexFlags.TexEnvCombine4NV=0
TexFlags.TexEnvCombineDot3=1
TexFlags.DepthClampNV=0
TexFlags.SeparateSpecular=1
TexFlags.TextureShaderNV=0

HardwareShaders=1

Shadows=2
Specular=2
SpecularLight=2
DiffuseLight=2
DynamicalLights=1
MeshDetail=2
VisibilityDistance=3

Sky=2
Forest=3
LandShading=3
LandDetails=2
CountryDetails=2
LandGeom=3
TexLarge=1
TexLandQual=3
TexLandLarge=1

VideoSetupId=17
Water=2
Effects=1
ForceShaders1x=0

PolygonOffsetFactor=-0.15
PolygonOffsetUnits=-3.0
Logged

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 24023
  • Taking a timeout
    • STFU
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #5 on: February 12, 2013, 08:59:59 AM »

The Athlon 64 X2 does not support hyper threading. Use the tool and see yourself.
Any PAM setting beyond 3 is useless for a dual core non-HT CPU.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

<Gunny>

  • member
  • Offline Offline
  • Posts: 1419
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #6 on: February 12, 2013, 09:06:10 AM »

Thanks Mike.
You do come up with some great add-ons.
Logged

Ass Eagle

  • member
  • Offline Offline
  • Posts: 938
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #7 on: February 12, 2013, 09:07:35 AM »

The Athlon 64 X2 does not support hyper threading. Use the tool and see yourself.
Any PAM setting beyond 3 is useless for a dual core non-HT CPU.

Best regards - Mike
Yes you are very correct. But what I find interesting is that enabling ProcessAffinityMask=3 as compared to just
let Windows 7 decide what to do with the game they are virtually (haha) the same (in my case anyways). Seems
W7 does a very good job at allocating resources for the task at hand & hardware available.
Logged

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 24023
  • Taking a timeout
    • STFU
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #8 on: February 12, 2013, 09:12:31 AM »

Yep that's true.
In fact I'm still waiting for a user to come and tell that he can achieve some reproduceable benefit from changing the PAM value (or even some penalty would do as well).
Most likely what you get from touching that value is simply this: Nothing. 99% probability that nothing will change.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

BravoFxTrt

  • "BIGFOOT"
  • Modder
  • member
  • Offline Offline
  • Posts: 13433
  • Flying Ass Clown #13
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #9 on: February 12, 2013, 10:13:11 AM »

I realy dont think it does make a difference with PAM settings, but i do see a difference in Vcard Drivers and Vcard Panel settings, (as far as rendering) goes. Fast Video Cards are it.
Logged
MSI R9 280X 6GB x2/Crossfire /ASUS M5A99FX PRO R2.0 Mobo/AMD FX 4170 Bulldozer 4core CPU/RAM Kingston HyperX FURY 16GB/ Corsair RM 1000WATT PSU/Windows 10 Enterprise 64bit

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6677
  • In memory of my beloved hero: Saburo SAKAI!
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #10 on: February 12, 2013, 11:47:24 AM »

Hi!

Just a little advise request about my rig upgrade plan:

Since IL2 is core based I'm collecting money to purchase a i73820 which is a quad core rated at 3,6 ghz in whic is possible to choose by default a core to be permanently overclocked!

So I'll overclock that core and set to run Il2 only on that!

Did I do well?

Thanks in advance!

walter
Logged

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 24023
  • Taking a timeout
    • STFU
Re: ProcessAffinityMask settings tool - assign CPU Cores to IL-2
« Reply #11 on: February 12, 2013, 11:49:53 AM »

Basically that's the best you can do for IL-2 as much as the CPU power is concerned.
However please notice that IL-2 doesn't scale well with CPU power, it much more depends on a decent GPU.
Say when you investigate $1000 in a "better" CPU you could have the same effect by spending $100 for a "better" GPU.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.
Pages: [1] 2 3 4 ... 6   Go Up
 

Page created in 0.037 seconds with 24 queries.