Multicore Processors
#1

I am trying to use more than 1 core. I have an intel core 2 quad cpu. I want to use 1core for my operating system and onfr my game (Il21946). I've gone into the conf.ini under (RTS). I deleted the semi colon at the affinity mask and changed the number one to two. Doing this is supposed to allow me to use two of the cores. Please advise if this is correct or not. Also,ddoes the semi colon have to be put back for this to work? If this is all wrong could you please help me out?

Thanks in advance
Relic
Reply
#2

This setting uses a binary mask.
"1" means core 1 only.
"2" means core 2 only.
"3" means core 1 and core 2.
"4" means core 3 only and so on...

The semicolon is just a remark, meaning that the line is not in effect if the semicolon is set.
This applies to all settings in any ini file.

Best regards - Mike
Reply
#3

I went to my task manager and watched the graph and it appears that core 1and 2 were in use.CPU usage was 25-27% When two cores are working I presume one is for my game and one is for my operating system. Is tjat correct?
thanks
Relic
Reply
#4

Do a search for 'Processor Affinity' on the AAA and read my brief on this.
I wrote an entire article on it for you guys.

S!

Though I fly through the valley of death, I will fear no evil.....
For I am the meanest SOB in the valley!

[Image: JollySignature.jpg]
Reply
#5

Posted by Jinxx

I posted a big segment on this a few months back.

This is the way the ProcessAffinityMask value works in IL2.

If it is commented out the OS will decide which cores to use. ie All cores.
"IL-2 is not a ,multithread application." True
IL-2 only uses 1 core" False.
so PAF....

=1 - core 0
=2 - core 1
=3 - core 0+1
=4 - core 2
=5 - core 0+2
=6 - core 1+2
=7 - core 0+1+2
=8 - core 3
=9 - core 0 + 3
=10 - core 1 + 3
=11 - core 0 + 2 + 3
=12 - core 2 + 3
=13 - core 0 + 2 + 3
=14 - core 1 + 2 + 3
=15 - core 0 + 1 + 2 + 3

commented out - all cores

If a core is enabled, it does NOT mean that core will be performing 100% while the other cores that are not enabled do nothing.
The enabled core needs an active thread to perform,
The disabled cores will be assigned tasks by the OS if needed.
There is only one way to switch off cores - the power switch - meaning all or nothing lol.

There was an long thread at SimHQ some time back exploring this(end 2005/beginning of 2006).

a '1' bit will enable the core, a '0' bit disables it.
Actual activity of cores can be checked through TaskManager. Keep in mind in general Windows OS runs hundreds of threads at the same time IL-2 runs.

A substantial part of IL-2 is written in Java which can use in excess of 100 threads. (source: Sun Microsystems) Shift-Tab opens the Java console in-game Yep that's where all those white messages come from.

Bitmask: 00000000000000000000000000000000 = Decimal 0
Processor affinity is off, and the load is distributed across all available processors.

Bitmask: 00000000000000000000000000000001 = Decimal 1
Processor 1 selected. The process will only run on processor 1.

Bitmask: 00000000000000000000000000000010 = Decimal 2
Processor 2 selected. The process will only run on processor 2.

Bitmask: 00000000000000000000000000000011 = Decimal 3
Processors 1 & 2 selected. The load is distributed across both processors, effectively the same as setting 0 above for Dual cores.

Because 0 puts the load across all processors and 3 puts the load on processor 1 and 2, they are essentially the same thing for Dual core CPUs.

For Quad core CPUs you can use more values:

Bitmask: 00000000000000000000000000000100 = Decimal 4
Processor 3 selected. The process will only run on processor 3.

Bitmask: 00000000000000000000000000001000 = Decimal 8
Processor 4 selected. The process will only run on processor 4.

And any combo between 0 and 15, for example:

Bitmask: 00000000000000000000000000000101 = Decimal 5
Processor 1 and 3 selected. The load is distributed across processor 1 and 3.

Bitmask: 00000000000000000000000000001111 = Decimal 15
Processor 1, 2, 3, and 4 selected. The load is distributed across all processors, 1, 2, 3, and 4.

Get the picture?



Basically, using a multi core processor in IL-2 has no real performance gain when you're talking about just the game, but........
If you use a multicore processor and assign different programs to each core, you get incredible results.

ie. I use an AMD Phenom 9850 quad core with the following settings.

IL-2 is running on Core 4
TS is running on Core 3
HL is running on Core 2
Windows uses Core 1

This is what processor affinity will do for you. Take the load off of the core that you're using for the game by assigning the game to use a core that isn't normally used. Windows, by default, will always try to use the first core (Core 0).

Hope this helps a bit.

Credit goes to Jinxx
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)