Reply
 
Thread Tools Display Modes
Old 01-05-2009, 08:26 AM   #121
Jesse
Junior Member
 
Jesse's Avatar
 
Join Date: Jan 2009
Location: Bay Area, CA
Posts: 24
Reputation: 0 Jesse will become famous soon enough
Send a message via AIM to Jesse Send a message via MSN to Jesse Send a message via Yahoo to Jesse
Default

I made my own affinity tool for myself a few days ago in AutoIt when I found I couldn't get TaskAssign to work. At first it was a simple script that would run in the background and set the dcs.exe affinity when it found one, but I kept adding onto it. I wanted to merge the two Black Shark desktop icons into one and never have to set the affinity again. After I decided I was going to release it on the forums I cleaned up the interface, optimized some shaky code and added some error checking. Here is the result:

EDIT: Use this new google code project page for instructions and download link.

Version 2 removes the need for any user configuration. Just run and it works.

__________________


Last edited by Jesse; 01-06-2009 at 05:50 AM.
Jesse is offline   Reply With Quote
Old 01-05-2009, 09:50 AM   #122
aledmb
Member
 
Join Date: Dec 2008
Posts: 213
Reputation: 2 aledmb is on a distinguished road
Default

man, you're really into it, right?

i just start priffinity and leave it's window open.
then i launch dcs.
when the launcher switches to the desktop, dcs.exe always chooses 1cpu affinity.
i just click "auto set" and let dcs.exe load the game.
aledmb is offline   Reply With Quote
Old 01-05-2009, 11:12 AM   #123
Jesse
Junior Member
 
Jesse's Avatar
 
Join Date: Jan 2009
Location: Bay Area, CA
Posts: 24
Reputation: 0 Jesse will become famous soon enough
Send a message via AIM to Jesse Send a message via MSN to Jesse Send a message via Yahoo to Jesse
Default

Quote:
Originally Posted by aledmb View Post
man, you're really into it, right?
Yea it got a lot more complicated than before when it was just me using it.
In order to release it on here and have any chance of people using it, I needed to make it user friendly, warn if something is wrong, and make it work even if their setup isn't exactly like mine.

It might look like more work than it's worth, but in reality it should only take a couple minutes to set up. Then you can get rid of the dual desktop icons and only have one thing to do when you want to play Black shark: open the launcher. The rest is taken care of.

Like I said, making stuff like this is a hobby of mine. This is just the first time I've ever worked up the nerve to package and let the rest of the world try it. Even if only one person found it useful it'd be enough for me.
__________________

Jesse is offline   Reply With Quote
Old 01-05-2009, 12:04 PM   #124
Mastiff
Senior Member
 
Mastiff's Avatar
 
Join Date: Jan 2009
Posts: 1,138
Reputation: 23 Mastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of lightMastiff is a glorious beacon of light
Default

Quote:
Originally Posted by =Prophet= View Post
My suggestion is using Wombats scripts, then follow the directions he gave to add the DCS startup commands.

Then you have 2 shortcuts just like you do normally, but they start with the cores you have selected.

No excess programs running in the backround.

I have attached the modified scripts. 1 for dual core, 1 for quad, 1 for 4 thread on an i7 and one for 8 threads on an i7. A singleplayer and multiplayer .cmd file. And also the process.exe file.

Download the file attached to this post.
Extract contents to your x:\Program Files (x86)\1C\Eagle Dynamics\Ka-50 this is the default location.
Replace the SP and MP shortcuts on your desktop with shortcuts to the appropriate SP and MP .cmd files.
Is it normal to cause my CPU to beep every time it loads in and out of GUI before the game finally starts?

It did increase my FPS from 15 to 47. SP

MP from 12 to 27 - 30
__________________
"any failure you meet is never a defeat; merely a set up for a greater come back"
Mastiff is offline   Reply With Quote
Old 01-05-2009, 12:46 PM   #125
ZaltysZ
Member
 
ZaltysZ's Avatar
 
Join Date: Feb 2006
Location: Lithuania
Posts: 497
Reputation: 18 ZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of light
Default

Quote:
Originally Posted by =Prophet= View Post
Yup.

You could have weather calculations in one thread. The flight model on another. AI on another.

I am sure things can be split up. Not that I think it would be easy at all, but I am sure there are many things that could be parallel.
The problem is not splitting, but parallel execution. It is easy to split, however most threads won't be executed at the same time because of dependencies between them.

I suppose in good flight simulator, physics should be affected by weather. It is a dependency: aircraft movement is effected by weather (i.e.: wind). To calculate that movement, wind must be calculated before it. (you can't use numbers in equations, while they are still unknown - it is simple). It means that FM thread will wait data from weather thread - parallelism breaks.

Currently dcs.exe runs with 10 threads in total. It is multithreaded as most programs, however it doesn't mean that it can paralelly run on 10 CPUs.

There is some solutions (workarounds) for parallelism problem. It is possible to "lag" something (like using wind data from previous frame) or calculate things in advance, however such things might give strange side effects, increase calculations and even decrease performance (yes, it happens).

What I am saying is that parallel execution in such programs as simulators is very hard thing to accomplish (much harder than most people think).
__________________
Wir sehen uns in Walhalla.
ZaltysZ is offline   Reply With Quote
Old 01-05-2009, 01:13 PM   #126
ZaltysZ
Member
 
ZaltysZ's Avatar
 
Join Date: Feb 2006
Location: Lithuania
Posts: 497
Reputation: 18 ZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of lightZaltysZ is a glorious beacon of light
Default

Quote:
Originally Posted by aledmb View Post
i don't know, but think about it...
if setting affinity to 2 cores does a great impact,
do you really think 4 or 8 won't be of any help?
It really depends on:
1)Number of threads (one thread can only be executed on one CPU).
2)Level of parallelism (if threads depend on each other, they won't be executed at the same time).
3)Calculation load (lots of threads with small calculations kills performance).

Usage of threads gives performance overhead too. It appears because CPU time is also required for thread synchronization and management. Sometimes threads eat more resources for synchronization than their calculations. For example: there is a program which does 3 calculations: a=1+2; b+1+2; c=a+b. Multithreaded version will probably be slower than single threaded one, because thread initialization and synchronization will take more time than those little calculations.

Well, I don't know exactly how much DCS can be executed in parallel, however it seems that not much. I guess that affinity trick is more related to Vista's implementation of DirectX than to multithreaded code of DCS, because the trick does not work on XP.

Back to your question: I don't think that 4 or 8 cores will be of no help, however I think the performance increase will be lesser going from 2 cores to 4, than going from 1 to 2. You need to test that yourself or ask someone to do that.
__________________
Wir sehen uns in Walhalla.

Last edited by ZaltysZ; 01-05-2009 at 01:19 PM.
ZaltysZ is offline   Reply With Quote
Old 01-05-2009, 04:24 PM   #127
ericinexile
Member
 
Join Date: Dec 2005
Posts: 618
Reputation: 13 ericinexile is just really niceericinexile is just really niceericinexile is just really niceericinexile is just really niceericinexile is just really niceericinexile is just really niceericinexile is just really nice
Default

When this Dual/Multi-core "trick" was shared on this forum I investigated it pretty thoroughly because I needed to evaluate an expensive Vista purchase. What I learned is that Vista handles DirectX differently, and according to Intel, better than XP. My theory, based on a complete and utter ignorance on how computers work, is that Vista allows one core to handle the game while the other(s) share the DirectX load.

A little searching on YouTube will yield an Intel presentation that explains Vista, Processor sharing, and DirectX.

Smokin' Hole
ericinexile is offline   Reply With Quote
Old 01-05-2009, 05:41 PM   #128
H4rM
Member
 
Join Date: Jul 2006
Posts: 105
Reputation: 5 H4rM is on a distinguished road
Default

Jesse, simply awesome work here, thank-you!
__________________

Microsoft Windows Vista x64 bit
Overclocked Intel Core2Duo @ 3.30GHz
6GB DDR Ram
Nvidia GTX280 1GB
DCS Blackshark Russian DVD Box and English Download
1920x1080 res. @ 37" Westinghouse LVM-37w3 1080P
Background image by Shrubbo.
H4rM is offline   Reply With Quote
Old 01-05-2009, 06:21 PM   #129
NullCharacter
Junior Member
 
Join Date: Sep 2008
Posts: 51
Reputation: 2 NullCharacter is on a distinguished road
Default

Jesse,

Excellent tool. Great job. It works just fine on my dual core system.

If I could make a couple of suggestions for future versions:

1. Read the game path from the registry. Mine is located in "HKEY_LOCAL_MACHINE\SOFTWARE\Eagle Dynamics\BlackShark\Path". On 64-bit machines you might find it in "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432node\Eagle Dynamics\BlackShark\Path" if it's not in the first one.

2. Save the settings to the registry instead of an .ini file. Some people (myself for one) would like to just keep your compiled binary on the desktop and a .ini file just clutters things up a bit.
__________________
NullCharacter is offline   Reply With Quote
Old 01-05-2009, 07:02 PM   #130
r-unit
Junior Member
 
Join Date: Nov 2008
Posts: 92
Reputation: 2 r-unit is on a distinguished road
Default

Huge differance for myself.

Went from Windows XP 32 bit, 2gb ram to Vista Ultamate 64bit, 6GB Ram.

Very very nice...... by changing the affinaty i went from 35 FPS to 49 FPS.

I don't mind bouncing out the desktop to change it, and i would like to give a special shout out to whoever found that out !!!!

this sim works excellent with Vista 64Bit.
r-unit is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible Possible Solutions to Vista and Multi Monitor Support Percopius Input and Output 5 11-26-2008 01:33 PM
Multi Language 31st_FF_Punisher DCS: Ka-50 Black Shark 9 11-03-2008 04:28 PM
multi freehand General Discussion 3 08-03-2006 04:20 PM
Are ATI/NVidia drivers multi-core aware? zorlac General Discussion 1 05-23-2006 06:01 PM
New and can't get multi to start g4tomw PC Hardware 0 03-21-2006 08:02 PM


All times are GMT +4. The time now is 09:03 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.