Weird maxed out client CPU usage

    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    I just noticed something very weird about the game client's CPU usage; it isn't some new behaviour, I just failed to notice it before:

    I'm running StarMade in windowed mode on an AMD FX-8350 eight core Gentoo Linux box, 8MO RAM, and a Nvidia GTX560Ti.
    The StarMade client maxes out one CPU core, which I assumed just was the way it was supposed to be, but as soon as its window loses focus, CPU load immediately drops down to barely noticeable - even though the client is still running, rendering graphics and doing all the stuff the client does, except getting any input.

    I have no idea whether it's the same for Windows or MacOS, or if it's just some local weirdness with my particular Gentoo configuration, so I'd appreciate any feedback from other users before officially calling this a bug.
     
    Joined
    Aug 30, 2013
    Messages
    1,744
    Reaction score
    323
    Fist person I know who literally installed Gentoo.

    No, I don't think this happens with Windows.
     

    AndyP

    Customer Experience Manager
    Joined
    Aug 15, 2013
    Messages
    1,199
    Reaction score
    264
    • Schine
    • Wired for Logic
    Starmade window loosing focus goes to a low resource mode.

    Although it still renders stuff, it ingores the input processing, and this seems to relieve alot of load.
    However, maxing out one cpu core is unusual.

    But as this seems GUI related it may also be related to:

    Issue #785 - Dedicated server GUI maxes 1 CPU core

    and this was confirmed in Windows to happen.
    If you are running a local single player you also have a dedicated server runing.
    (NoGUI but if it is the GUI your client may be causing it.. the same way it does on dedicated server)

    - Andy
     
    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    Starmade window loosing focus goes to a low resource mode.

    Although it still renders stuff, it ingores the input processing, and this seems to relieve alot of load.
    However, maxing out one cpu core is unusual.

    But as this seems GUI related it may also be related to:

    Issue #785 - Dedicated server GUI maxes 1 CPU core

    and this was confirmed in Windows to happen.
    If you are running a local single player you also have a dedicated server runing.
    (NoGUI but if it is the GUI your client may be causing it.. the same way it does on dedicated server)

    - Andy
    Thanks for the feedback.
    I have the server running from the console for occasional multi player visitors, never tried the server GUI. The client behaves the same either way (just tested with "pure" single player mode). And I don't think it's GUI related, since the UI is still being rendered, and disabling it via Tab-G doesn't change anything.
    Might be some uncontrolled polling for input events, no idea whether that's a Java thing, or an issue with LWJGL, although I doubt both, since other popular games use them and AFAIK don't exhibit this behaviour.
     
    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    A small update:
    Enabling VSync seems to be a workaround. With it enabled and a fixed frame rate of 60, the CPU gets no noticeable load from the client anymore.
    I'll keep an eye on this and will post if and when I find out more.

    The server never uses much anyway, except when generating planets - that always hits like a freight train. I wonder if caching the planets instead of re-generating them every time wouldn't be the better option, but that's beside the point of this thread.