Hard Light Productions Forums

General FreeSpace => FreeSpace Discussion => Topic started by: ShivanSpS on March 19, 2011, 12:56:32 am

Title: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 19, 2011, 12:56:32 am
SO i now got my HP DM1 in reemplacement of the older MSI U230.

Ill try to make a video this weekend... U230 with its HD3200, even when overcloked to 700mhz, was not able to provide any good playable fps over 800x600 using vps.

Now, since this game seems to be very light on cpu, E-350 with its HD6310 is able to play FS2 with mediavps (incluiding advanced vps) at 1366x768, AA x2 AF x8...

the bad thing about the dm1 is the really bad designed arrow keys :S damn... i gona need to be very creative with the key mapping to be able to play...
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: Fury on March 19, 2011, 03:26:12 am
Now, since this game seems to be very light on cpu, E-350 with its HD6310 is able to play FS2 with mediavps (incluiding advanced vps) at 1366x768, AA x2 AF x8...
Err wat?

FSO is not light on CPU, exactly opposite. FSO craves for single-threaded performance. FSO isn't multithreaded so having more than one core in your CPU doesn't do much, except help to offload tasks not related to FSO to the other core. But as such, FSO is in most cases limited by computer's single-threaded CPU performance rather than anything else. Mediavps might be playable, but I doubt certain mods are.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 20, 2011, 12:03:58 am
yup you right, there ist a fps increase after disabling AA and AF...
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: NeoKnight on March 20, 2011, 07:57:42 am
FSO craves for single-threaded performance. FSO isn't multithreaded so having more than one core in your CPU doesn't do much, except help to offload tasks not related to FSO to the other core. But as such, FSO is in most cases limited by computer's single-threaded CPU performance rather than anything else.

Is multithreading compatibility a possible feat for the SCP team? If so, is it somewhere on the roster?
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: The E on March 20, 2011, 08:07:28 am
No. It is neither possible without major restructuring of the code, nor is it planned for the foreseeable future.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: NeoKnight on March 20, 2011, 08:24:10 am
Pity. Here's to the unforeseeable future!  :D
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: pecenipicek on March 20, 2011, 10:52:13 am
Pity. Here's to the unforeseeable future!  :D
[gman]Prepare for unforeseen consequences...[/gman]
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 25, 2011, 08:57:29 pm
About multicore support, we are 100% sure it does not work even if i set the afinity to both cores? by default, windows set the afinity to cpu 1, is a good idea. but if i set to both cores, the game seems to be run better (on my E350), and i let the taskmanager running in background to check and it seems to be using both cores... not at 100%, but the graph cleary showed that.

What i see, its some kind of glitch when loading a mission with both cores, the game stop responding for a while, there is a high chance of crash.

I made a video running the game, playing lion at the door, when the game starts, the fps was 35 and it when quickly to 45 and 50, using afinity to both core, it when to 60 inmediately.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: The E on March 25, 2011, 09:07:57 pm
FSO will only ever use a single core. By default, it is set to grab the second core in the machine. While you can reassign that, it won't change the fact that FSO is a single-threaded application.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 25, 2011, 09:19:39 pm
But why taskmanager graph shows its using both cores? a load of about 75% averange on both cores while playing.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 26, 2011, 01:14:31 am
http://www.youtube.com/watch?v=X_HIW87Hhlc

here we go... its seems to be using some basic dual core processing... maybe impossed by the operative system? it maybe not optimised, but its there. The FPS diference can be seen, its not big, but its there.

Setup:
1366x768
AA x2
AF x4
using mv_advanced

Config its:
AMD APU E-350
3GB ram
HD6310

Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: The E on March 26, 2011, 05:26:21 am
Ah, yes, after some testing, I can see that you are both right and wrong. Right, in that setting afinity to both cores may grant you a bit of a performance increase. This is because FSO spawns a total of 9 threads during gameplay, 3 of which actually use significant processor time. Setting  processor affinity to both cores allows the OS to offload some of those worker threads to other CPUs. However, the main fact remains that FSO is a single-threaded application, all the game logic, all the processing that makes the game a game, is done in a single thread.

In my test on a system with an AMD Athlon 2 P320 CPU usage during the most intense cutscene I could find never went over 60%, and those 10% are coming from said worker threads (God I love Process Explorer). So, in total, you're looking at a ~10% performance gain. Which didn't really have a noticeable impact on framerate, at least for me.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 26, 2011, 08:32:47 am
P320 is considerably faster than a E-350, remember that E-350 is just a bit faster than a Atom dual core.

Its hard to make a comparison, we need a scripted mission, but for what i can see, in a E-350 the difference can go up to a 25%, maybe more.

I wonder if possible to add a option to the launcher to automatically set the affinity to both cores.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: The E on March 26, 2011, 08:45:02 am
Again, that is sort of expected. The faster your CPU, the less impact this'll have.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: NeoKnight on March 26, 2011, 07:17:57 pm
I wonder if possible to add a option to the launcher to automatically set the affinity to both cores.

Well, if the FSO engine can't be multithreaded, I'd say this is the next best thing.

...even if the results are negligible on higher-end systems
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: Iss Mneur on March 26, 2011, 09:27:12 pm
I wonder if possible to add a option to the launcher to automatically set the affinity to both cores.

Well, if the FSO engine can't be multithreaded, I'd say this is the next best thing.

...even if the results are negligible on higher-end systems
As I noted in the 3.6.12 release thread where ShivanSpS asked for a flag as well. SCP will not add a launcher flag because we do not think it is stable. ShivanSpS seems to think it is stable, .12 may in fact not crash all the time anymore.  Personally I have not tried since .10.

 However as I outlined in the other thread, FSO does have a mechanism to change the affinity if you want to experiment.

I already tested it and it works fine, with about 15 to 40% performance increase in a E-350 APU...

http://www.hard-light.net/forums/index.php?topic=75149.0

so i wanted to know if there is any way to force it whiout doing it manually from TM everytime.
Find or create a ProcessorAffinity key of type DWORD in the Freespace registry entry it is under HKEY_LOCAL_MACHINE/SOFTWARE/Volition/Freespace2 or HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Volition/Freesspace.

Set the value of the key to 0 to disable fso auto setting the mask.  See the SetProcessAffinityMask (http://msdn.microsoft.com/en-us/library/ms686223%28v=vs.85%29.aspx) documentation on msdn for other possible values.

If you have weird unrepeatable issues with FSO, remove the key. Good luck.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 26, 2011, 10:22:26 pm
yup the key works well, and the game too. But remember that this will only make sence for low end dual core cpus, with a good enoght gpu to play FSO, the list is quite short, Atom 330+ION, Atom D525+ION2, Zacate and Ontario APUs and old generation AMD mobile solutions, like L335+HD3200 and K325+HD4225.

So far, it works perfectly, no crash at all, i tested on the E-350 and my desktop pc with a core I3.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: NeoKnight on March 27, 2011, 12:34:13 pm
I wonder if possible to add a option to the launcher to automatically set the affinity to both cores.

Well, if the FSO engine can't be multithreaded, I'd say this is the next best thing.

...even if the results are negligible on higher-end systems
As I noted in the 3.6.12 release thread where ShivanSpS asked for a flag as well. SCP will not add a launcher flag because we do not think it is stable. ShivanSpS seems to think it is stable, .12 may in fact not crash all the time anymore.  Personally I have not tried since .10.

 However as I outlined in the other thread, FSO does have a mechanism to change the affinity if you want to experiment.

Ah, I see. And it seems that if sufficient stability is ever attained, most systems will, by that time, be equipped with CPUs powerful enough to mitigate the positive effects of resetting core affinity. Still, it's an interesting concept.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: Zacam on March 27, 2011, 01:39:26 pm

I've been using that value for over 2 years now without any issues that I can determine.

Maybe that's why I cant reproduce some issues though. Hmmm...
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: LHN91 on March 28, 2011, 12:07:59 pm
I own the even littler brother of the E350, the acer 5253 with the C50 1.0 dual core and radeon 6250.

I don't expect it to do all that well with FSO, but i want to at least try. I've been pleasantly surprised with the performance on it so far, I've been playing Dragon Age 2 on low on it for a few days..... Choppy as hell (Between 5 and 20 fps), but better than i thought it would be.

I'll let you know in a day or two once i play with the options.... right now my FSO install is set for my desktop. Athlon II X4 620 with a Radeon 4870.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: Luis Dias on March 28, 2011, 03:41:23 pm
I wonder if possible to add a option to the launcher to automatically set the affinity to both cores.

Well, if the FSO engine can't be multithreaded, I'd say this is the next best thing.

...even if the results are negligible on higher-end systems
As I noted in the 3.6.12 release thread where ShivanSpS asked for a flag as well. SCP will not add a launcher flag because we do not think it is stable. ShivanSpS seems to think it is stable, .12 may in fact not crash all the time anymore.  Personally I have not tried since .10.

 However as I outlined in the other thread, FSO does have a mechanism to change the affinity if you want to experiment.

Ah, I see. And it seems that if sufficient stability is ever attained, most systems will, by that time, be equipped with CPUs powerful enough to mitigate the positive effects of resetting core affinity. Still, it's an interesting concept.

But will future CPUs be "powerful enough", or is the progress being actually driven towards multiple cores each with the same performance?

Notice, this actually makes sense, since it provides good response times for multitasking, and is more power efficient. There's also the point that for many applications, "current" CPUs are already "good enough". And for future intense applications, multithreading will be used anyway.
Title: Re: Testing FS2 FSO on AMD APU E-350
Post by: ShivanSpS on March 28, 2011, 07:13:44 pm
E-350, C-50 and Dual core Atoms with nvidia gpus are definitely not powerfull enough...

Next AMD APUs are a new Zacate, an E-450, it also includes turbo core 2.0, so single core performance its going to be better, yet i don't think it will be good enough. Others APUs are Llanos, derived from Phenom 2, so those are more than enough for FSO.