Page 1 of 2

multicore/multithread optimization?

Posted: 13 Apr 2009 18:48
by ming
i wonder how good trackmania can make use of more than one core/thread?

because as far as i can see it only uses one single core (the first one), this often at max, wheras all other cores are nearly empty.
this gives me lags from time to time, even if the option "enable multi-threads" is enabled.

is there a way to better optimize trackmania for multicore systems, some special options or similar?

thanx

Re: multicore/multithread optimization?

Posted: 13 Apr 2009 23:26
by Wolf68k
There's a setting ingame to enable multi-threads? Where?
My game runs smooth as silk for me an I have a C2Q Q8200.
I never looked to see how many cores were being used before. With the help of RivaTuner's Hardware monitor I saw that Core3 was getting most of the use at around 70-80% and that Core0 was only around 50% usually just under. Cores1 and 2 stayed around 10% so I don't really count that for much of anything. So yeah I'd say for the most part it only used the 1 core.

Re: multicore/multithread optimization?

Posted: 13 Apr 2009 23:53
by Generator
He's reffering to the launcher Wolf (its in 'Configure\Advanced\Compatability\'), as shown below.
Image

I couldn't comment on how well TM uses it though, my dually seems fair even in usage but that could be the 'AMD Dual-Core Optimizer' doing its stuff.

Re: multicore/multithread optimization?

Posted: 14 Apr 2009 01:53
by Wolf68k
I forgot to look there. Thanks.

Re: multicore/multithread optimization?

Posted: 14 Apr 2009 03:28
by anonymous345
my cpu usage wasn't that bad with the multi-threads enabled on my dual core
Image
I had a few other programs running at the same time but they weren't doing anything

Re: multicore/multithread optimization?

Posted: 17 Apr 2009 21:12
by ming
thanx for your answers.

after some further research i found out that there is in fact a problem with some cpu's...

dualcore (core2duo) seem to work fine, and both of the cores are used at almost the same level.
tripple core (like amd phenom 8750 model), and for my part nehalem Xeons E5520 (quadcore) seem to have the problem that only the first core is used and this almost at max, for whatever reason...

what about other cpu's and architectures? any reports? can anyone else confirm this issue?

Re: multicore/multithread optimization?

Posted: 18 Apr 2009 11:21
by Leak
ming wrote:dualcore (core2duo) seem to work fine, and both of the cores are used at almost the same level.
tripple core (like amd phenom 8750 model), and for my part nehalem Xeons E5520 (quadcore) seem to have the problem that only the first core is used and this almost at max, for whatever reason...
Ignore the CPU graphs. That's just the OS bouncing one thread around between several cores, usually to distribute the generated heat evenly over the CPU die.

What's the total CPU usage shown in task manager? If it's 50% for a dual core or 25% for a quad core CPU the game is still only using the equivalent of a single core.

np: DOOM - Cellz (Born Like This)

Re: multicore/multithread optimization?

Posted: 19 Apr 2009 00:29
by anonymous345
Leak wrote:
ming wrote:dualcore (core2duo) seem to work fine, and both of the cores are used at almost the same level.
tripple core (like amd phenom 8750 model), and for my part nehalem Xeons E5520 (quadcore) seem to have the problem that only the first core is used and this almost at max, for whatever reason...
Ignore the CPU graphs. That's just the OS bouncing one thread around between several cores, usually to distribute the generated heat evenly over the CPU die.

What's the total CPU usage shown in task manager? If it's 50% for a dual core or 25% for a quad core CPU the game is still only using the equivalent of a single core.

np: DOOM - Cellz (Born Like This)
not necessarily, if you're limited by your gpu then you can't say the game is using the equivalent of a single core

Re: multicore/multithread optimization?

Posted: 19 Apr 2009 12:07
by ming
Leak wrote:
ming wrote:dualcore (core2duo) seem to work fine, and both of the cores are used at almost the same level.
tripple core (like amd phenom 8750 model), and for my part nehalem Xeons E5520 (quadcore) seem to have the problem that only the first core is used and this almost at max, for whatever reason...
Ignore the CPU graphs. That's just the OS bouncing one thread around between several cores, usually to distribute the generated heat evenly over the CPU die.

What's the total CPU usage shown in task manager? If it's 50% for a dual core or 25% for a quad core CPU the game is still only using the equivalent of a single core.

np: DOOM - Cellz (Born Like This)
well the global cpu utilisation does usually not exceed 7-8% when running trackmania plus usual backround tasks like AV aso... this is for me even more annoying since my system can virtually treat 16 threads spread over 8 cores, and as i said, tm makes only use of one single thread, despite the fact hat the mulithread option is enabled!
the GPU is definitely not involved into this issue, since i run tm with nearly constant 60FPS limited by v-sync.
and i must also say that other apps/games run good, and are better spread around on the different cores.

and i repeat, my problem is not that the game is unplayable laggy, it runs very smooth, i have only some microlags from time to time, wich is due to t the fact that the tm-thread hits 100% usage of the first core!

anyhow, i will try to find more people concerned by this issue, to try to pinpoint the source of the problem...

Re: multicore/multithread optimization?

Posted: 25 Apr 2009 15:39
by Tom.CZ.73
There is no game which can benefit form 16physical cores, you will be always limited by GPU. I bought i7 few month ago amd according to my abservation Capcom MT Framework is best multithreading engine i have seen so far

Re: multicore/multithread optimization?

Posted: 27 Apr 2009 07:41
by ming
Tom.CZ.73 wrote:There is no game which can benefit form 16physical cores, you will be always limited by GPU. I bought i7 few month ago amd according to my abservation Capcom MT Framework is best multithreading engine i have seen so far
yes, i totally agree with you.
but why does trackmania uses all cores on some systems without any trouble, and one other ones it only uses one single core, depsite the fact that the mulithread option is enabled? thats what i dont get... are there maybe incompatibilities between that piece of code and some (newer) CPU's, or is that option limited to some specific architectures?

Re: multicore/multithread optimization?

Posted: 27 Apr 2009 08:15
by Tom.CZ.73
This is first time I hear that TM is capable to (efective) use more cores. As I heard so far TM loads one core to 95% and second approximately about 25% at hi-end PC. Maybe on PC with slower dualcore CPU TM load first core to 100% and second at 75% which could be considered as "uses all cores (efectively)"

Re: multicore/multithread optimization?

Posted: 27 Apr 2009 08:23
by ming
well my cpu has the same base-architechture as yours, so if my theory is right, you might be in the same case as i am.
and yeas, it seems that some cpu's different cores are used near equal, f.ex: http://tm-forum.com/viewtopic.php?p=150537#p150537
and thats what i was told by some friends.
but i guess it would be great to have a confirmation from nadeo, to clear up this issue :1

Re: multicore/multithread optimization?

Posted: 27 Apr 2009 12:52
by TStarGermany
one comment: i got a core2duo system and only turning the multithread option OFF will eliminate the stuttering i had when playing the game earlier.

Re: multicore/multithread optimization?

Posted: 27 Apr 2009 14:52
by Leak
ming wrote:yes, i totally agree with you.
but why does trackmania uses all cores on some systems without any trouble, and one other ones it only uses one single core, depsite the fact that the mulithread option is enabled? thats what i dont get... are there maybe incompatibilities between that piece of code and some (newer) CPU's, or is that option limited to some specific architectures?
I have the feeling I keep repeating the same explanation over and over again each time this comes up. :grmblz:

That's the OS's scheduler bouncing the one thread TM uses around the cores to (more or less) evenly distribute the load on the cores and keep the overall temperature down. It doesn't do this with all kinds of CPUs, just with some of them.

If you look at the "CPU usage" reading, it'll still be around 50% for dual cores or 25% for quad cores, i.e. it'll run just as fast or slow had you set the game's CPU affinity to a single core.

np: DOOM - Angelz ft. Tony Starks (Born Like This)