multi core support

N@uralBornNoobistN@uralBornNoobist Gorge-N-Freeman,2Gorges1Clog Join Date: 2012-12-24 Member: 176138Members Posts: 120 Advanced user
edited December 5 in NS2 General Discussion
right...i am currently sat on a dual core @ 5ghz with 4 threads. i have the kudos to buy a quad core...but in the past going from a dual to a 4 core made no difference what so ever...are there any plans which i hope there are on making this a truely multi core supported game?

it says in the patch notes that the engine now utilizes all cores but from what ive heard it doesnt really make a difference.

Comments

  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow Posts: 4,391 Advanced user
    Here is a relevant dev response from September.
    Time for a little tech talk!

    First of all NS2 utilizes multiple threads to run various tasks at once. With the upcoming 64bit build (which is available at the 64bit steam beta branch but not stable yet) NS2 gets better in distributing those tasks across all CPUs. Also NS2 is able to run more at once because no task has to wait to be able to allocate enough memory to run. Left aside that every task runs a little bit faster thanks to being able to fully utilize the modern CPU now with 64bit instructions.

    The image below shows the CPU usage of the 64bit client:
    unknown.png

    Now some may wonder why not all cores are used by 100%. That's because tasks depend on each other. The render tasks only start after the world has been updated and that depends on various other tasks to finish in time (physics simulation and i/o tasks).

    For those of you interested to see details about those things in action type profile into your console and hit space:
    tlsczu88ydyr.jpg
    That will allow you to see how much time each of the main render pipeline task needed to render given frame. You can also expand each thread's call trace by clicking on the + symbols to see what exactly takes all the time. Use a and d to navigate between frames and space to continue profiling.

    Enter profile again into the console to close it.

    To make it short as soon as one task takes significant more time to process it slows down every other task depending on it. And that's the issue with NS2. The world update routine is written in Lua using no co-routines and is not very optimized at all. Which means all world entities are updated in order and updating each takes significant CPU time.

    So increasing the world updates per second is not feasible without a lot single core power to make sure the world update finishes in time even after the 64bit update.

    Though we have been working on optimizing the game logic code in the last year and hope to get those changes out after the 64bit migration has been done.

    However there is another reason most who have tried increased rates discarded the idea after testing. There is a lot of game logic code that was not written with the possibility of higher tick rates in mind. So e.g. you have logic routines causing players to take twice as much damage over time when the tickrate gets doubled. To really support higher update rates those lines of codes need to be fixed as well.

    Which all in all is a lot of work. We will continue working on it slowly but steady and will let you know if we think higher update rates are finally not only possible but also feasible.

    Edit: Added a screenshot and some details about the ingame profiler


    To summarize: You should see a performance improvement from going from a dual core to a quad core at the same Ghz speed, but it would not be a massive increase in performance. Is a quad core worth it? It is to me, but it may not be to you.
    When you aim for perfect balance, you discover it's a moving target.
    Perfect balance is not attainable, but if we chase perfection we can catch excellent gameplay.
    NS2 is a moving, breathing thing. We have to be willing to constantly evolve. Perfect balance is constant transformation.
    SquishpokePOOPFACEYojimbo
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands, Hoogezand Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue Posts: 14,947 Advanced user
    Might help to know the brand of your dual core and that quad core as well, to make an educated guess as to what kind of "performance gain" you could expect per core. I mean it's not all Ghz, CPU family is also quite important as newer families are more efficient per clockcycle, per core

    Guardian of the "magic cookiejar" AdminModerator

    Existence Unknown

    Retired forum Admin, I mostly used a flamethrower tank for disputes... Mostly
    Retired EUPT Deputy | Moral Support | Squad 5 Blue
    102 1HP Skulk escapes and counting | Play the Latest Version of Booster Z-Frame
    YouTube NS2 Playlists: Unusual Selection | NS2 Stuff | NS2PT | NS2 Tuts

    NordicYojimbo
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow Posts: 4,391 Advanced user
    edited December 7
    Kouji_San wrote: »
    Might help to know the brand of your dual core and that quad core as well, to make an educated guess as to what kind of "performance gain" you could expect per core. I mean it's not all Ghz, CPU family is also quite important as newer families are more efficient per clockcycle, per core

    He gave us a good hint. How many overclockable i3's do you know of that can hit 5ghz fairly commonly? He probably has a Core i3-7350K which is fairly new. Intel has had their i3's locked down for such a long time now, and back when all i3's could overclock 5ghz was incredible.

    Assuming he has an i3-7350K, it really is the difference between dual core and 4 core. If he is someone with the knowledge to get to 5ghz, he probably has a good idea what cpu's perform well.
    When you aim for perfect balance, you discover it's a moving target.
    Perfect balance is not attainable, but if we chase perfection we can catch excellent gameplay.
    NS2 is a moving, breathing thing. We have to be willing to constantly evolve. Perfect balance is constant transformation.
    Kouji_San
  • N@uralBornNoobistN@uralBornNoobist Gorge-N-Freeman,2Gorges1Clog Join Date: 2012-12-24 Member: 176138Members Posts: 120 Advanced user
    yea ive got an i3 7350k, i guess i will just wait until the next cpu's come out and expect a nice performance increase.
    Kouji_San
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow Posts: 4,391 Advanced user
    edited December 7
    The way intel has been going, it may be a long time before you see a worthwhile performance increase.

    In my opinion, switching to a 4 core will net you more performance than intels next generation. Just because NS2 does not use multiple cores well does not mean we that more cores will be pointless. A quad core at equal speeds should perform better. The real question is, how much are you willing to pay for diminishing returns?
    Post edited by Nordic on
    When you aim for perfect balance, you discover it's a moving target.
    Perfect balance is not attainable, but if we chase perfection we can catch excellent gameplay.
    NS2 is a moving, breathing thing. We have to be willing to constantly evolve. Perfect balance is constant transformation.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands, Hoogezand Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue Posts: 14,947 Advanced user
    edited December 7
    Just a side note... I mean in terms of power-consumption you're not going to top the i3 7350k right now, by any stretch of the imagination even at 5Ghz. That thing is already quite new and a lot nicer towards your power bill, compared to let's say my 2500K @ 4.5-5Ghz, which is quite thirsty at the top end of those speeds :D

    95W vs 60W

    And as you know, quads are harder to get a stable OC to 5Ghz than dual, so you would run into diminishing returns as Nordic mentioned, especially with NS2's oddball multi-core support

    Guardian of the "magic cookiejar" AdminModerator

    Existence Unknown

    Retired forum Admin, I mostly used a flamethrower tank for disputes... Mostly
    Retired EUPT Deputy | Moral Support | Squad 5 Blue
    102 1HP Skulk escapes and counting | Play the Latest Version of Booster Z-Frame
    YouTube NS2 Playlists: Unusual Selection | NS2 Stuff | NS2PT | NS2 Tuts

  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow Posts: 4,391 Advanced user
    edited December 8
    Kouji_San wrote: »
    And as you know, quads are harder to get a stable OC to 5Ghz than dual, so you would run into diminishing returns as Nordic mentioned, especially with NS2's oddball multi-core support
    I don't think it is harder to get quads stable at higher clock speeds anymore. With my 2500k, 3570k, 4770k, 4790k, and 3930k I could not get a faster overclock by disabling cores.

    Going to 4 cores would have diminishing returns even assuming he was at 5ghz with 4 cores. If he loses the cpu lottery, it could be even further diminished returns.
    When you aim for perfect balance, you discover it's a moving target.
    Perfect balance is not attainable, but if we chase perfection we can catch excellent gameplay.
    NS2 is a moving, breathing thing. We have to be willing to constantly evolve. Perfect balance is constant transformation.
  • N@uralBornNoobistN@uralBornNoobist Gorge-N-Freeman,2Gorges1Clog Join Date: 2012-12-24 Member: 176138Members Posts: 120 Advanced user
    edited December 12
    i just got the i7700k...im at 5ghz...maybe it can go even higher because the volts are lower at this speed than the dual i had. IT DOES make a difference. no idea what the late game fps will be like but after joining a server with 5 minutes playtime the fps doesnt budge from 200.

    so yea any1 thinking of moving to a quad from a dual...dont hesitate. as long as you hit 4.8 - 5 ghz your doing alright.


    Post edited by N@uralBornNoobist on
    Nordic
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow Posts: 4,391 Advanced user
    i just got the i7700k...im at 5ghz...maybe it can go even higher because the volts are lower at this speed than the dual i had. IT DOES make a difference. no idea what the late game fps will be like but after joining a server with 5 minutes playtime the fps doesnt budge from 200.

    so yea any1 thinking of moving to a quad from a dual...dont hesitate. as long as you hit 4.8 - 5 ghz your doing alright.


    A dual core would likely be limited at the same point that a quad core is. According to ghoul's post, the world update thread often gets behind and makes every other thread wait on it. I am curious if your late game fps will be about the same or slightly better.
    When you aim for perfect balance, you discover it's a moving target.
    Perfect balance is not attainable, but if we chase perfection we can catch excellent gameplay.
    NS2 is a moving, breathing thing. We have to be willing to constantly evolve. Perfect balance is constant transformation.
Sign In or Register to comment.