The online racing simulator
LFS for DualCore CPU's
(61 posts, started )
try a ky track with the grid on the oval with 20+ racers ... i doubt theres any (not severely oced) system that doesnt slow down to about 30-40 fps
Quote from Christofire :Have any of you chaps done any multithreaded programming?

I have (and do), and I don't get to choose which cpu/core/etc the thread runs on - you create the thread and leave it to the operating system (in Windows, at least).

...<snip>...

Nope;
SetThreadAffinityMask

CAD/3d, Photo editing, auido and video editing tools have been targeting specific processors for years. Some games have as well; Quake 3, Quake 4 (with a patch), Tribes2, Serious Sam, and Serious Sam 2 are multi-core/proc "aware" (there are a quite a few more, but some require command line args eg; start /jediknight.exe +set r_smp 1).

But quite a few game engines being created now are going to be multi-core/proc aware (CryENGINE2, etc.).

Quake 3 had limited support for SMP, meaning it would do some work to queue threads on to specific processors, but it did not really take full advantage of the power of the system (I have feeling he was still seeing a bottleneck from the AGP / GPU side). Serious Sam 2 on the other hand is a great example of a multi-core/proc utilization game engine.

You're right though, one big problem with specifying thread affinity is load balancing. If you're throwing threads down to CPU1 and overloading it compared to CPU0 you're going to find yourself in a world of performance hurt. You can generally uncover such a hit during testing, make a small tweak in the threading model and voila. Either that or create a dynamic load balancing engine...*shudder*
Quote from Bob Smith :Heh, I tried maxing out LFS (all in-game settings maxed, 2048x1536 with 6xAA + temporal AA + adaptive AA + 16x HQ AF), and I get ~70fps on my own on some parts of the track, but as low as 17fps in some places. Dunno why that is really, everything looks about the same, I'm assuming my minimum FPS is CPU limited.

Even reducing the resolution down to 1600x1200 doesn't get my FPS that high, peaks at 85fps, yet down to just under 30fps in some sections. So I dunno how the hell you can sit there at 100fps.

OK, I take that back. There must be a driver bug that when you enable temporal AA, FPS gets capped to the refresh rate. Turning it off (but leaving everything else on), I can see over 130fps now and then. But I'm still getting down into the 40s now and then too, so 100fps rock solid still seems mega.
#29 - Gunn
I'd like to see multithreading support for LFS. Bring it on.
#30 - spyr
what operating system supports multiple cpu's ? does win2000 SP4 support multicore or hyperthreading? and about the nvidia havok FX, its software so does a game have to be designed to take advantage of it?
All of the NT based systems support multiple CPU's, so Windows NT, 2000, XP are all ok, 95, 98 and ME do not.
The only sensible way to make it 'multi processor friendly' is to use multiple threads. That's my opinion. That has the best changes to work correctly in most situations and with least amount of work.

How much you benefit from multithreading depends on the 'job' you are trying to split. Some jobs are are really not so easy to split into multiple threads (or that they would benefit from it). I've made few multithreaded apps. If you are really interested i got these results for my fractal program calculating a picture:

threads time relative
--------------------------
1 8.032 100%
2 6.625 82%
3 6.281 78%
4 6.110 76%
5 6.265 78%
6 6.266 78%
7 6.141 76%
8 6.172 77%
...
After 3 threads it is not getting any better, so it seems. (if the difference is significant between 2 and 3 threads is in doubt, even though the times are averages over multiple runs).

I have Hyperthreaded P4 2.8GHz(Northwood) (1 core). I haven't had change to test on 2 core system.

The only processor aware thing i would try to do is like, HT CPU ->2 threads, dual core->4 threads etc...
Quote from Aquilifer :The only sensible way to make it 'multi processor friendly' is to use multiple threads. That's my opinion. That has the best changes to work correctly in most situations and with least amount of work.

How much you benefit from multithreading depends on the 'job' you are trying to split. Some jobs are are really not so easy to split into multiple threads (or that they would benefit from it). I've made few multithreaded apps. If you are really interested i got these results for my fractal program calculating a picture:

threads time relative
--------------------------
1 8.032 100%
2 6.625 82%
3 6.281 78%
4 6.110 76%
5 6.265 78%
6 6.266 78%
7 6.141 76%
8 6.172 77%
...
After 3 threads it is not getting any better, so it seems. (if the difference is significant between 2 and 3 threads is in doubt, even though the times are averages over multiple runs).

I have Hyperthreaded P4 2.8GHz(Northwood) (1 core). I haven't had change to test on 2 core system.

The only processor aware thing i would try to do is like, HT CPU ->2 threads, dual core->4 threads etc...

I hate to nitpick here, but LFS is a multi-threaded application already. What LFS is not, is optimized for multiple hardware thread environments.

Interesting data...

How were you targeting your threads? I'm assuming you were using SetThreadAffinity, but what priority levels did you have your threads set at?

You have to remember the Windows scheduler works on a quantum, if your threads are set at lowest level they will be interrupted more frequently by not only higher priority threads, but all other threads running at the same level as you.
Quote from der_jackal :I hate to nitpick here, but LFS is a multi-threaded application already. What LFS is not, is optimized for multiple hardware thread environments.

Yes, heh heh. I realized it too when studying it more after i wrote the message but was too lazy to do any editing

Quote from der_jackal :
How were you targeting your threads? I'm assuming you were using SetThreadAffinity, but what priority levels did you have your threads set at?

Targeting? You mean processors? Nothing. It lets OS choose them as it sees best. Actually i don't know how this is understood in HT CPU

Priority is normal.

And the idea in the data was just to show what kind of improvement you can expect in this kind of machine. So that people don't think it is 2x (100% improvement).

Splitting a screen calculation is actually quite simple, but some jobs can be really hard to split.

Quote from der_jackal :
You have to remember the Windows scheduler works on a quantum, if your threads are set at lowest level they will be interrupted more frequently by not only higher priority threads, but all other threads running at the same level as you.

Yes. And using the highest is not really recommended.

Actually this conversation makes wanting to try little bit more testing

But maybe this conversations is not for this forum
Quote from Aquilifer :Yes, heh heh. I realized it too when studying it more after i wrote the message but was too lazy to do any editing

Figured, it's just a pet peeve I'm suffering lately.

Quote from Aquilifer :
Targeting? You mean processors? Nothing. It lets OS choose them as it sees best. Actually i don't know how this is understood in HT CPU

Ahh, see you're not really doing anything different than what LFS (or any other normal application) is doing currently. Just spawning threads and waiting for them to complete. There you will see an increase in performance gains, but you would probably see even more in an optimized environment (this really depends on the "weight" of the threads in your app).

Targeting specific processors would probably yield some different results, both bad and good depending on how you did this.

HyperThreading is really more of a product of the processor, programmatically you'd access both thread executors the same way (GetProcessorAffinity, SetThreadAffinity, etc.).

Quote from Aquilifer :
And the idea in the data was just to show what kind of improvement you can expect in this kind of machine. So that people don't think it is 2x (100% improvement).

Good point.

Quote from Aquilifer :
Splitting a screen calculation is actually quite simple, but some jobs can be really hard to split.

Yup yup! Part of design is determining what you can and can't split off and how best to load balance between the hardware thread executors.

Quote from Aquilifer :
Yes. And using the highest is not really recommended.

Oh lord no, running at level 31 ("real time") is a huge system blocker, but running at 2 (DISPATCH in kernel land) would prevent you from being interrupted as frequently by threads with lower priorities, but you also block any of your other threads which you have affinity for that processor from running on that processor until your thread is done.

Quote from Aquilifer :
Actually this conversation makes wanting to try little bit more testing

But maybe this conversations is not for this forum

Maybe we should spawn a thread in the programming forum (pun intended).
Quote from Jamexing :Actually, physics calculations depend on the exact mathematical models LFS employs, which most of us here don't know. Anyway, multithread is particaularly good for parrallel processing. If its some algorithm that requires massively fast serial processing, they're nothing special.

Actually, all new games on the market are heavily dependant on parralel processing to perform anyway. That's why we need to change those expensive graphics card all so often. If a single core was sufficient, we'll need no 2nd CPU to process graphics.

Point is, LFS will benefit grealy from proper multi-core support, since newer and faster CPUs will all be multicore as the limits of single core tech are already being reached.

lol u think the limit is reached? i think if an amd processor generation next (together with other parts of the pc) needs up to 900W of stream?!... then i think the limit isnt reached yet, just look to single cores of intel (i personally use amd so no need to say i do commercials for intel lol) especially the mobile cpu just need a percentage of Watt amd's "big blocks" needs.

anyway a dual (low watt) cpu would be probably better than a single core. but who cares, lfs runs already ass fast on my "slugspeed"-system even with maximum aa and af at 2048x768 resolution (dualmonitors)...
Bump..

I think LFS really needs to be multi-core optimized.. Don't know how difficult and doable that is, is it even possible in it's curent stage or we would have to wait S3 for this? If there are some coders here who can tell us something about this...

Having E6550 and 8600 GLH, LFS really shouldn't struggle at full grids (it can get to 30 FPS on starts with max details and 1680X1050 on South City, not exactly a struggle, but it stutters). Since i'm guessing that my graphic card could really handle very well the LFS graphics, than it's processor's "fault" here. If LFS used it's other core, it would be locked to 60 FPS no matter what.. How realistic is expectation to have this implemented in the near feature?
#38 - Gunn
A quote from a previous thread....

Quote :
Quote from Scawen :It can't be done very quickly. It would need the graphics and physics to be decoupled and run on separate threads. The method for doing this properly also brings certain other benefits, due to the interpolation between frames possibilities. In other words, the required changes lead on to other things, which should be done at the same time.

It would be about a months work, as a rough guess. I expect to do this some time, as multiple cores seem to be the way of the future. Actually I'm expecting to do this in a future version, after S2, when we could use the extra CPU time to do some things in higher resolution on more powerful computers, while maintaining physical compatibility with slower computers.


Quote from Gunn :A quote from a previous thread....

Thanks, i missed that one..
So we could expect this in the "near" future after all, that's great, not in S2 final unfortunately, but later... that's ok, i hope it won't turn into "distant" future
#40 - Jakg
If your using any AA that 8600 is easily the thing that's holding you back.
Quote from Jakg :If your using any AA that 8600 is easily the thing that's holding you back.

I do actually, 8xAA and 8xAF if i'm not mistaken, but i don't think that's the reason, and it's that pimped 'Goes like Hell' 8600
I really think that's not the issue, you can't call LFS graphics "top notch" now, can you? It's true that i maxed out everything in LFS and i'm using lots of High res stuff, but again, this card should be enough, more than enough IMO.. Played some new games like COD4 all maxed out also and it ran great, Crysis can run also on medium(some high) settings just fine..
And LFS only struggles on full grids, more preciselly on the back of the full grid so i think it has something to do with cars around me being calculated in real time, something that CPU does..
Didn't tried it myself, but a friend of mine told me that GTR2 ran perfectly fine with lots of players with max graphics with a 6600 GT and Barton 2500+... We all know that ISI doesn't do fancy real time calculations of other cars like LFS do, so that's the reason it runs fine, that graphic card should be enough not to mention better ones (like mine for example)..
People are having frame drops to one digit figures with Patch Y on south city. While i'm at that subject, there should be some better graphic settings, like some real "low", "medium", "High" settings, my teammates are saying that they no matter what they do with "LOD" or "Dynamic LOD" and all that, the performance is the same.. so there's a problem somewhere..
I'm not saying LFS should have less Physics calculations, god no! I'm saying that if you actually caugh up for a new system, you should expect some noticable diference.. or if you're on a old system, there should be some proper details settings since the curent LOD and all that does practically nothing, you should be able to really make it look bad, like when you set it to LOW in rFactor so that Skins are even blurred
#42 - Jakg
Take Task Manager, open it, go to the performance tab and then open LFS. Go for a drive with some Ai or online or wahtever, then look at the graph. IF the graph goes all the way to the top, then your CPU is holding you back. If it doesn't, then something else is holding you back, which is more than likely your GFX card.

Even if it's a "Goes Like Hell" edition, it's still an 8600GT, which, at it's heart, isn't that good.
Quote from Jakg :Take Task Manager, open it, go to the performance tab and then open LFS. Go for a drive with some Ai or online or wahtever, then look at the graph. IF the graph goes all the way to the top, then your CPU is holding you back. If it doesn't, then something else is holding you back, which is more than likely your GFX card.

Even if it's a "Goes Like Hell" edition, it's still an 8600GT, which, at it's heart, isn't that good.

Well, i don't know what's the problem than, but there IS a problem somewhere and it's not my system. What do you think the edition of new interiors will do to the performance than if it struggles with these 128x128 curent ones? I think i should ran them fine (well, 20 FPS at the starts is not exactly fine) but i can't imagine what will others with lower end systems experience then, 0.1 fps
Like i said, we all love LFS and i prefer it's "looks" over any other SIM, it looks more real, but that doesn't mean it has better graphics, it has better graphic artist . I mean, compare the UF1 with some car from GTR2 or RACE, naf said.. The way LFS curently looks(it looks real, but the actual graphics are from '98) and the fact that it doesn't even use my CPU 100% shows that there's something wrong there.
I gota try the demo of GTR2 and RACE again, had them on the old system but they were deleted, gotta try them with full grid and high graphics and i'm 99 % sure that it will run great..
#44 - wien
Quote from Boris Lozac :The way LFS curently looks(it looks real, but the actual graphics are from '98) and the fact that it doesn't even use my CPU 100% shows that there's something wrong there.

No, like Jakg said that shows you that the GPU is the bottleneck in your system and it is holding the CPU back. Speaking from experience with a 7600GT (which in many cases is just as fast as the 8600GT), 8X AA is just too much, even in LFS. Try going own to 4X and see if that helps. If it does, the GPU was the bottleneck, plain and simple.

LFS is surprisingly hard on the GPU with it's settings at full tilt. Don't let the fact that it's "DX8" fool you. The shader pipeline on the card may very well be more or less idling when LFS is running, but there are other things on the GPU that can become a bottleneck in these cases (texture fetch, triangle setup, tessellation etc.). It's not as simple as "GPU power".
I have Core 2 Duo @ 2.6Ghz and 7600GT (Overclocked to 640/740). The bottleneck is the graphics card. CPU doesn't have much to do in LFS. I also did some experiments with AA: 0x - 134 fps, 2x - 132 fps, 4x - 112 fps and finally 8xS - 57 fps. Someone said that he has 8600 and uses 8x AA - that is really killing the GPU. 8600 is too slow for 8x AA, there's no denying it.
Quote from Christofire :Have any of you chaps done any multithreaded programming?

I have (and do), and I don't get to choose which cpu/core/etc the thread runs on - you create the thread and leave it to the operating system (in Windows, at least).

this is partially right.
you assign tasks to special cores...

i.e. gothic 3 and cmr dirt: one core is for the game specific things (cars, physics etc.) and the second core streams the landscape.
just watch, there a two tasks open when you start the game.

possible by using command line
#47 - Gunn
Quote from Jakg :
Even if it's a "Goes Like Hell" edition, it's still an 8600GT, which, at it's heart, isn't that good.

I'm using a 7600GT and it handles LFS with its ram chips tied behind its back.
#48 - wien
Quote from Gunn :I'm using a 7600GT and it handles LFS with its ram chips tied behind its back.

With 8X AA? Mine sure didn't. (This is at 1920x1200 BTW. At lower resolutions it might handle it.)
#49 - Gunn
Quote from wien :With 8X AA? Mine sure didn't. (This is at 1920x1200 BTW. At lower resolutions it might handle it.)

No I'm not running at that high a resolution, but you don't need to run that high to enjoy LFS.
#50 - JTbo
Slowest FPS I have got with LFS has been 40'ish, with 20AI in south city, 1024x768, no aa no af.

Using Geforce 8600GT, which is rather equal to Radeon 850XT which got 14fps, but cpu is now e7650, before that I had A64 3200+ with 1MB cache.

Nvidia drivers have one setting that optimizes driver for dualcore or something, haven't tested if that gives any boost.

LFS for DualCore CPU's
(61 posts, started )
FGED GREDG RDFGDR GSFDG