Higher use of CPU for many/some actions on PTR?



  • While running the same code on the live server as PTR, with similar situations (no large differences such as additional buildings or different rooms) I noticed that even with a greatly different amount of creeps (64 on the live server and 42 on PTR) I am seeing some significant differences in CPU use. on the live server I was seeing an average of 47.71 CPU per tick with my bucket staying above 9900. On PTR I was seeing an average around 72.8 causing my bucket to gradually deplete, despite having less creeps. After some investigation using the profiler it almost appeared as if things such as room.find are using more CPU on PTR than the live server.

    Using the profiler over 30 ticks, on the live server I tracked 1360 calls to Room.find with a total time of 64.1 and an average of 0.047. On PTR I saw only 661 calls to Room.find with a total time of 65.5 and an average of .099.

    While the difference in situations may very well be the issue with this discrepancy, could anyone else take a look at this and test it out to see if I'm correct in what I'm seeing?

    Thanks!


  • YP

    don't forget that cpu is processing time (+ the 0.2 tax for intents ) and depends on other processes on the server, the hardware, number of users on the server and stuff like that...

    you simply can't compare the cpu usage on different servers.



  • Shouldn't my cpu not be impacted by the process of other users, and if it is would the fact that the majority of players on ptr only having 10 cpu mean that there would be significantly less additional overhead compared to the live server?

    My reason for this post was to see is anyone else was seeing this as well because if the CPU cost of intents had doubled since a change on PTR (I had not seen this issue on prior sessions on PTR) then that may be something that needs to be pointed out, and if it was just me then that would more likely point to some flaw in my code or testing rather than an issue with the next deployment.


  • Dev Team

    PTR and main server work on different hardware and different environment. Same CPU usage profile is not guaranteed there.



  • @artch @W4rl0ck Ah, well alright then! Thanks for the responses!