PDA

View Full Version : Multi Threading


paulg568
08-09-2010, 04:19 PM
I am just wondering how GD will take advantage of multiple cores.

I use win7 and have 2 cpu meters going. One is of each core(I have 4 cores at 2.6GHz) and the other shows the top 5 applications using the most cpu cycles.

When playing Titan Quest it shows one cpu being used to about 68% capacity.

Will Grim Dawn be multithreaded for better performance? or has the titan quest engine been changed to utilize multiple cores? I know I read that the engine has been updated but threads/cores were not mentioned.

Thanks.

heron
08-09-2010, 05:42 PM
I think most console ports are programmed to use 4 cores.
This could be a problem on the pc if you don't have quad-core system.
Maybe in grim dawn, the user have the option to select or even better have it auto detect on load.

paulg568
08-09-2010, 06:41 PM
I am confused, why are you mentioning consoles?

This game is PC only and the developer's have to decide whether or not to put the game onto multiple threads. Or the game engine needs to be divided correctly to handle multiple threads.

I ask because it looks like TQ was not multi threaded. I assume it wasn't due to my post above and the first dual cores started coming out 2004-2005 and TQ came out 2006. So they probably weren't expecting the main stream gamers to have dual cores yet. But now, these days its uncommon to have anything lower than a dual core if you are a gamer. Intel and AMD are up to six cores now.

So, I was just wondering if the TQ engine was changed to handle multiple threads for GD or somehow the scripting allows for multiple threads? Maybe medierra can answer those questions. Thanks.

ASYLUM101
08-09-2010, 06:52 PM
paul,
have you tried changing the options.txt manually to enable multi-cores? I have mine set for that, but it still puts more stress on one core than the second, but they both are at around 30-50% when playing TQ.

paulg568
08-09-2010, 08:24 PM
No I have not tried that. But basically you are saying that multi threading can be enabled in TQ so I should expect it to be in Grim Dawn as well.

yerkyerk
08-09-2010, 09:08 PM
I don't think TQ was optimized for dual core, but yes, multicore can be manually turned on/off in TQ and if it really has any effect, I fully expect it to be in GD as well. Ofcourse, a dev could give you a better answer.

Azrael
08-09-2010, 09:23 PM
Enabling efficient use of multiple cores (especially more than two) is a lot more complicated than just changing some value in a text file. No, the program itself has to be written from the beginning to be able to properly make use of multi-threading.

Also, if a game is capable on being run on a single core just fine, why would you even go to the trouble of multi-threading?

mamba
08-09-2010, 11:34 PM
I think most console ports are programmed to use 4 cores.

not following consoles much, do Xbox 360 and PS3 have 4 cores ?

This could be a problem on the pc if you don't have quad-core system.

no, you always have more programs running than cores, having multiple threads belonging to one program works the same way. So having fewer cores than threads is not an issue, the game will still run.

Unless the threads utilize more cpu power than you can offer (note, the first post said his one core was utilized 68%, so there is room for a second thread even on that first core), having more cores in theory should not make a difference (in practice it does make a small difference).

mamba
08-09-2010, 11:38 PM
I don't think TQ was optimized for dual core, but yes, multicore can be manually turned on/off in TQ and if it really has any effect, I fully expect it to be in GD as well. Ofcourse, a dev could give you a better answer.

where do I turn this on or off (this is actually the first time I hear about this...) ?

Rhis
08-10-2010, 01:52 AM
If they are talking about forceSingleProcessorMode=false, it should be set that way by default if you have 2 or more logical cores.

It also doesn't actually do what it says.

Edit: If you have a cpu with more than 1 logical core and that option is set to true by default, please pm me with your cpu make/model.

ASYLUM101
08-10-2010, 02:05 AM
Yes that's what we're talking about, and it doesn't do that by default, at least not for me. I've reinstalled/installed TQ on several PCs, all with 2 cores and it always starts off as forced true. I even tried with a Quad. However, that was on all AMD machines.

I'll see about getting you my cpus, I can't remember them atm and will have to look them up.

mamba
08-10-2010, 02:49 AM
Edit: If you have a cpu with more than 1 logical core and that option is set to true by default, please pm me with your cpu make/model.

In TQ it is set to false, in IT it is set to true for me. Should I set it to false there ?

Intel Core2 Duo CPU T9300 @ 2.50GHz

Rhis
08-10-2010, 03:35 AM
Yes, set it to false.

Sile
08-10-2010, 03:53 AM
Crikey, gonna check this out when I get home

Rhis
08-10-2010, 05:02 AM
You can read what the setting actually does, here:

http://www.titanquest.net/tq-forum/threads/901-IS-TQ-a-multi-threading-app?p=14585&viewfull=1#post14585

What it doesn't do is correctly identify non-intel cpus. As a result, the setting is defaulted to true when it shouldn't be. This can result in performance degradation, as mentioned in the post.

This is fixed in Grim Dawn. We might update the engine with additional multi-core support, if there is time.

Panthro
08-10-2010, 05:22 PM
It was set to "true" for me as well, and I've got an Intel Core i7 920.

I've changed it to "false" and I'll see what happens...

Renevent
09-10-2010, 02:19 AM
I never knew about this setting...btw on my installation it was set to 'true'.

Intel Core 2 Quad Q6600 G0

Spearmint
09-11-2010, 10:59 AM
My TQIT was on true while my TQ was on false - running a i5 750.

Set it to false now as well.

Echonian
09-11-2010, 03:58 PM
Multi-core support isn't really necessary in Grim Dawn...it would be nice, but as far as I know it wouldn't be enough of a performance gain to justify the time needed to code it in.

If I had any say, I would add SOME multi-core support - as in, splitting up the calculations for say...monster AI. But it would probably be a lot of work.

In all honesty, I would work on multi-core support after release of the game, based on whether it is needed at all (say, in situations where there are a lot of monsters on screen and a lot of AI calculations need to be done). Otherwise, I would just work on adding in more content and improving gameplay features. :D