Multithreading?
Forum » General / Showcase » Multithreading?
Started by: noone88noone88
On: 1241717663|%e %b %Y, %H:%M %Z|agohover
Number of posts: 11
rss icon RSS: New posts
Multithreading?
noone88noone88 1241717663|%e %b %Y, %H:%M %Z|agohover

Hi, I made some tests with JigLibX using internal multithreading within the engine… It's far from being optimized or even stable. The compiled versions can be found here:

http://jiglibx.wikidot.com/local--files/forum:thread/mt.zip

Please run both demos (normal und multithreaded) and tell me your framerates and processor counts. Just start it, wait 5sec and write the fps down.

For me its:

MT: 30 fps
NT: 20 fps
processor count: 4

last edited on 1241729419|%e %b %Y, %H:%M %Z|agohover by noone88 + show more
unfold Multithreading? by noone88noone88, 1241717663|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
BlackSpiderWolfBlackSpiderWolf 1241739975|%e %b %Y, %H:%M %Z|agohover

Mine was.

MT: 13fps
NT: 11fps

Processors count: 2

I ran them a few times and NT was always 11, but MT kept changing between 12,13,14.

unfold Re: Multithreading? by BlackSpiderWolfBlackSpiderWolf, 1241739975|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
noone88noone88 1241780886|%e %b %Y, %H:%M %Z|agohover

okay, thanks… what I didn't mentioned… event test this if you have only 1 processor. (The mt should run much slower there)

unfold Re: Multithreading? by noone88noone88, 1241780886|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
WesleyEWesleyE 1241782490|%e %b %Y, %H:%M %Z|agohover

MT: 18 fps
NT: 12 fps
processor count: 2

I'll try to test this on a 2X quad machine when I get back from work.

last edited on 1241782918|%e %b %Y, %H:%M %Z|agohover by WesleyE + show more
unfold Re: Multithreading? by WesleyEWesleyE, 1241782490|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
PolyVector (guest) 1241842628|%e %b %Y, %H:%M %Z|agohover

@noone88
I was just toying around with multithreading small parts of jiglibx today, small world… :)

I just wanted to say that if you're seriously multithreading JigLibX, make sure to avoid ThreadPool (and write your own thread manager that reuses threads)… The garbage generated from my own attempt at multithreading counteracted the benefits w/ jumpy GC's (on the 360). I don't know how many of the devs here develop on the 360, but it's also important that you have an option to select the Number+Affinity of threads so that we can make use of specific cores we aren't utilizing.

Anywho, good luck multithreading JigLibX, I can't wait to really test it out!

BTW, I'm running Windows virtualized on my Mac and only allowing it 1 virtual processor… so probably useless data, but both multithreaded and normal versions run around 7-8fps…

unfold Re: Multithreading? by PolyVector (guest), 1241842628|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
nikescarnikescar 1243020047|%e %b %Y, %H:%M %Z|agohover

MT - 19fps
NT - 13fps
processor count - 2

That's pretty promising already. Have you tried this on 360 yet? With those kinds of performance gains my project would run a solid 60fps using 2 cores for JigLibX, 1 core for all the rest of my code and a spare core left over for AI.

Nice work.

unfold Re: Multithreading? by nikescarnikescar, 1243020047|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
BlazingIntensityBlazingIntensity 1245770851|%e %b %Y, %H:%M %Z|agohover

MT: 25 fps
NT: 18 fps
processor count - 2

unfold Re: Multithreading? by BlazingIntensityBlazingIntensity, 1245770851|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
SilentKill (guest) 1247792594|%e %b %Y, %H:%M %Z|agohover

How's the development for MT tech going?

here are my results:

MT: 55 fps (ran very smooth)
NT: 30 fps

core count: 4 (with HT turned on: 8)

Any code released yet to play around with? My game has some performance issues on xbox, runs on 120 fps if my physic objects are inactive, once I run into them (with a vehicle) frames can drop down to as low as 40 fps. MT might help out a lot in this situation.

unfold Re: Multithreading? by SilentKill (guest), 1247792594|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
SilentKill (guest) 1248778752|%e %b %Y, %H:%M %Z|agohover

Did some work on my cpu last week, so I thought I'd give it another go.

Normal: 55 FPS
MT: 92 FPS

Core count: 4 (@4.2mhz, core i7)

unfold Re: Multithreading? by SilentKill (guest), 1248778752|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
SilentKill (guest) 1248781180|%e %b %Y, %H:%M %Z|agohover

Ok can't edit my post as quest, so for now I'll have to triple post (srry)

Using multithreading and leaving it be for 2-3 minutes got it to run from 50 to 72 fps. when I zoomed out a little so I could see all the objects and then drive thru with the car, the fps went up…to 126. This happened every time I drove through the object with the car. Odd behaviour or intended? maybe you can use this information for something, hope it helps.

unfold Re: Multithreading? by SilentKill (guest), 1248781180|%e %b %Y, %H:%M %Z|agohover
Re: Multithreading?
Kendaop (guest) 1248837147|%e %b %Y, %H:%M %Z|agohover

Normal: 24 fps
MT: 36 fps

I found it odd that the blocks behave differently if you are running NT or MT. What's the cause of this? Is the world initialized the same in both of them? Sorry, I'm kinda new to this.

unfold Re: Multithreading? by Kendaop (guest), 1248837147|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License