Needed Starmade Performance Optimization: MultiThreading

    Joined
    Mar 7, 2015
    Messages
    85
    Reaction score
    11
    The main problem with StarMade servers has been that the game has only had the ability to use one core of the servers processor to do calculations, which causes all sorts of unneeded and unwanted lag/latency. This is a rather big problem for large SM servers because they have so many players connecting to a single server. Multithreading needs to be a thing in SM, without it, it leaves a little much to be desired imo. Now, I have never worked with Java, so i don't know what options you have available to you for Multithreading, so i cant give you any suggestions there.

    I know people have asked for this already, but I thought I would just put it out there to refresh everyone's memory, seeing as I have not seen the suggestion in a long while. (The #1 SM server gets a little too much lag for it to be much fun, this is why I bring it up.)
     
    D

    Deleted member 433088

    Guest
    I honestly don't know nearly enough about this kind of features, but I actually thought SM already had multithreading. At the very least, when I run it I see all four cores in my computer increase in activity equally (some settings even peg all four to 100%)
     
    Joined
    Mar 7, 2015
    Messages
    85
    Reaction score
    11
    That's for the client, not the server unfortunately... Like, honestly, if there is multithreading in the client, i have absolutely no idea why it wouldnt be in the server, but it doesnt appear to be.
     
    D

    Deleted member 433088

    Guest
    Huh wow. It does sound strange, but since I know rather little about programming and such, I'll leave some space for doubt until someone more knowledgeable gives a reason for it
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    Iirc, planet generation is multithreaded, but not much else is. There is probably a very good reason for it. schema , micdoodle8 , bspkrs might be able to explain it :)
     
    Joined
    Jul 3, 2015
    Messages
    37
    Reaction score
    22
    • Purchased!
    Weird... I'm running a dedicated ubuntu server that is running only StarMade and I am seeing utilisation across all four cores with htop....
     
    Joined
    Mar 7, 2015
    Messages
    85
    Reaction score
    11
    Iirc, planet generation is multithreaded, but not much else is. There is probably a very good reason for it. schema , micdoodle8 , bspkrs might be able to explain it :)
    What needs to be multithreaded are the physics calculations... Because I just cant see what else would be causing all this latency.
     
    Last edited:
    Joined
    Jun 30, 2015
    Messages
    16
    Reaction score
    12
    • Purchased!
    • Community Content - Bronze 1
    My ships have turrets on them. If I undock anything larger than a frigate from home station, I drop from 100+ FPS down to exactly 3. Likewise, as I approach the station, I drop to 3 FPS, then when I manage to dock, it instantly shoots back up to 100+. There is a threshold, a distance away from the station, where the framerate decrease applies. I am cruising along at 100+ FPS, then upon crossing that threshold, it drops. When flying away from the station, upon crossing that threshold, it shoots back up to normal.

    This is not a graphics card issue on my end, as it affects everyone in and around the station.

    So I thought, hey I dock to a floating platform anyway, I'll just extend the floating platform out to that threshold, dock there, and shuttle in to the station. That seemed like a decent workaround. So I built a pole all the way out to that threshold, crossed it, and constructed a new docking plate. Then I deleted the pole, so that the plate itself, even though it was quite some distance away, was still connected to the station.

    Extending the docking plate extended the threshold of lag.

    Now, that same threshold that used to apply when approaching the station, applies that far again when approaching the new docking plate. By this point the station is maybe 2 inches long on my screen. I turned down visible blocks to the absolute lowest setting, so that I couldn't even see my own ship. There was virtually nothing onscreen, but I was getting 3 FPS. My friend on the station was getting about 7 FPS.

    Now mind you, the docking plate was all of 5 blocks. I got out of my ship, removed those 5 blocks, and BOTH his AND my FPS jumped back up to normal. When 5 blocks are causing an FPS drop of -100 or more, and I can pinpoint the exact 5 blocks that are the cause, it is not a graphics card issue. It is an engine issue.

    We've both quit playing because it is sucking the fun right out of the game. This issue needs to be taken seriously.
     
    • Like
    Reactions: Ithirahad
    Joined
    Feb 22, 2015
    Messages
    869
    Reaction score
    179
    • Purchased!
    • Legacy Citizen
    Then I deleted the pole, so that the plate itself, even though it was quite some distance away, was still connected to the station.
    Whether the blocks have a physical connection or not, they remain part of the station if they ever were connected. All you did was make your station bigger with predictable results. Try making a second, smaller base out that far just for docking. Then use slideways or gravity guns to transfer to the main base. That might work. I'm not sure shuttles will work, since you'll just be changing ships, but the size might make a difference. Can't hurt to try.

    In my case, simply entering a sector with a planet will cause massive lag which eventually crashes my game. As long as I don't actually enter the sector, no problems at all.

    Is your threshold at a sector boundary? Check your co-ordinates please.

    Another thing to test, does your threshold coincide with the gravity field? Just align a grav generator so that you will 'fall' towards the threshold. When you leave the field and stop falling, are you at the threshold?

    You can probably check both of these things at the same time. This information may not actually help you, but knowing this may let you design a work around and give the devs needed information for fixing it.
     
    Joined
    Mar 9, 2014
    Messages
    596
    Reaction score
    112
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    Agreed this is needed IF its the case. I know the cilent seems to max all 4 cores on my system no idea about servers though.
     
    Joined
    Mar 7, 2015
    Messages
    85
    Reaction score
    11
    It is, Bobby let us see what the CPU usage was like on our server zack, the only time it uses another core is when it is in the process of logging another person into the game. Otherwise it stays at a solid 25% CPU utilization on a 4 core processor. If you like you can go ahead and check for yourself on the servers website where everyone chats through the site.
     
    Joined
    Mar 9, 2014
    Messages
    596
    Reaction score
    112
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    It is, Bobby let us see what the CPU usage was like on our server zack, the only time it uses another core is when it is in the process of logging another person into the game. Otherwise it stays at a solid 25% CPU utilization on a 4 core processor.
    I know this mate just remaining nutural so i don't have to provide proof.
     
    Joined
    Mar 7, 2015
    Messages
    85
    Reaction score
    11
    Now I am kinda disappointed that no one (moderator or developer) has bothered to reply to me and give their feedback.
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    • Legacy Citizen 10
    • Top Forum Contributor
    I believe the latest update that fixed most of the game stability issues and increase FPS in loads of areas show that schine isn't disregarding the issues.
     
    Joined
    Dec 17, 2014
    Messages
    534
    Reaction score
    195
    • Purchased!
    • Legacy Citizen 4
    The total disregard of these issues is unfortunate.
    That has to be the funniest and most ludicrous post I've seen today. I suppose the lst lot of lag they fixed in the last patch meant nothing to them as well. That must be why they included all the optimization. :rolleyes:

    derp.
     
    Joined
    Jan 24, 2015
    Messages
    24
    Reaction score
    20
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 6
    Ehh Some servers rely on Really Powerfull cpu's [Xeon E5] 16 Physical Cores all at the same Ghz and unto 10% overclock PER CORE!