Extreme increase in CPU usage with the same script

  • Culture

    Hey all,

    I'd like to request feedback on other players. Has anyone seen an increase in CPU usage while not changing anything? The last few days my script execution time has increased by about 20%, and I'm still running the same scripts.


    I've seen a lot of weird CPU increase in random locations of my script. One of the best examples I got was a simple upgrade creep, standing next to the controller, calling upgradeController. This call took 16 ms! I've been getting hit with cpu-limit reached about every 10 seconds now.

    Some details:

    • Memory init - Same cpu usage as ever
    • Creep actions - increased significantly
    • Creating new creeps - takes significantly longer
    • find* operations in the room - Same cpu usag


    My script hasn't changed at all in the last 2 weeks (except for the last 2 days to mitigate this). My cpu has increased from 210 CPU on average to 254 CPU.


    Has anyone else seen this behavour?







  • Culture

    It seems to have stabilized itself again:






    In case anyone is wondering how I got these stats, I used this library:


  • Dev Team

    We're having some server-side issues due to increasing amounts of players, and working on some optimizations right now.

  • I experienced the same yesterday - my usage jumped from 12 to 23. It is back to normal now.

  • I don't have numbers, but: 

    - A few weeks back, my code was running fine, CPU would go up or down, but overall the bucket would fill up, so on average I had a slightly positive balance

    - I didn't really change anything in those last few weeks that would have CPU impact

    - I hit a new GCL level in those last few weeks, so my CPU limit increased by 10, which should have further helped my CPU balance


    However, I suddenly noticed actually having a negative balance now, my bucket draining all the time. Yesterday I only maintaining a somewhat neutral balance now since I disabled my remote mining, which is certainly not a long-term solution... I haven't dared to re-enable it yet, so I'm not sure if the problem has fixed itself. But yes.. I absolutely noticed some heavy issues with CPU usage.

    Gonna have to re-activate my grafana and do some benchmarking as soon as I got the time..

    We're having some server-side issues due to increasing amounts of players, and working on some optimizations right now.

    so... other players are influencing my CPU usage? thats a bit weird and counter-intuitive, isn't it?