[Request] Feedback on multithreaded simulation - Page 4

[Request] Feedback on multithreaded simulation

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: [Request] Feedback on multithreaded simulation

Post by jK »

It's really complicated to generate a stable benchmark in Spring.
Currently I run a pre-pass to write a demofile and then rerun that ~6 times, what gives very good results. Only the pre-pass can sometimes differ a lot cause of GameServer code and maybe disk-syncing (todo: the demofile should really be cached in RAM and written on exit/crash!!!).
Creating a benchmark that is comparable between non-syncing runs is only doable with a lot human mind in it: mission-like test-runs (spawn 10 units and let them move from box A to box B) as abma requested for a very long time, but no one is providing :<

Another problem is the runtime, in my tests it showed that you need ~10mins runs to get decent results. So one benchmark run takes >1h ...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [Request] Feedback on multithreaded simulation

Post by smoth »

zerver wrote:
smoth wrote:I don't see really all that much improvment in fps though. at around 200 units I still am dropped to like 100fps.
This thread is about multithreaded simulation, and that has a very minor impact on the FPS. Instead you will be able to play a bigger game with more units. So what you should compare is the CPU load of MTsim vs a normal spring version from the develop branch. Please note that these two are incompatible sync wise, which makes it tricky to use a demo for benchmarking.
according to what I am reading here, I am not even running the mt sim becuase mt boots me to regular sim due to me not having that config value set?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: [Request] Feedback on multithreaded simulation

Post by zwzsg »

jK wrote:mission-like test-runs as abma requested for a very long time, but no one is providing :<
I provided one more than two years ago.

Get this: BASP_V713z166.sd7

In the ingame menu that you have when direct running Spring, or pressing esc in solo game, choose mission "Fusion Farm". Optionally, you may want to /cheat /spectator

You get half a thousands units duking it out in a somewhat random pseudo infinite battle. It works by having the red and blue run a gadget that tell constructors and factories to rebuild anything that was destroyed. The game is not always the same, as the combat issues is determined by many random elements.

If you need a more deterministic game, with /godmode make a simple game with some factories on repeat and save it through my escape key menu.

spawn 10 units and let them move from box A to box B
Kernel Panic provide a tiny mission with 9 units going from A to B to check pathfinding.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: [Request] Feedback on multithreaded simulation

Post by zerver »

smoth wrote:according to what I am reading here, I am not even running the mt sim becuase mt boots me to regular sim due to me not having that config value set?
With risk of repeating myself, Spring now has these threads:

1 Main (rendering (+ sim)) thread
2 Independent sim thread
3 Rendering helper threads
4 Sim helper threads
5 Pathmanager thread

In your case, 2 and 3 have been disabled due to lacking that modinfo setting or config value. But you still have 4 and 5, and that is what this topic is about.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: [Request] Feedback on multithreaded simulation

Post by Silentwings »

I've made several missions for BAR (and they'll also work with BA). I'd be happy to run some of them as tests for this, just let me know. I've still got the exe from the test with behe a few weeks ago.

The only problem I could see is that replaying demo files that were made with missions (from the ZK editor) doesn't seem to work, even if the mission is launched properly i.e. without the mission editor. I've not tried hard to do it but if anyone knows how I'd be grateful :p.
User avatar
AntiAllez
Posts: 105
Joined: 06 Mar 2012, 18:22

Re: [Request] Feedback on multithreaded simulation

Post by AntiAllez »

cmon zerver, make a executable-version for download @ springfiles plz. same thing like with the old mt-sim stuff. The risk is then up to the users, which would also speed up the development ... or I do wrong?
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: [Request] Feedback on multithreaded simulation

Post by zerver »

Okay I will make one in conjunction with 92.0.

However, the problem is that multithreaded simulation does not sync with the official releases, so all players in the game would need to download it from springfiles.
Post Reply

Return to “Engine”