{"action":"closed","issue":{"url":"https://api.github.com/repos/CoFH/Feedback/issues/395","repository_url":"https://api.github.com/repos/CoFH/Feedback","labels_url":"https://api.github.com/repos/CoFH/Feedback/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/CoFH/Feedback/issues/395/comments","events_url":"https://api.github.com/repos/CoFH/Feedback/issues/395/events","html_url":"https://github.com/CoFH/Feedback/issues/395","id":244202430,"number":395,"title":"Thermal dynamics tick handlers are taking up a majority of CPU time, and seem to increase slowly over time","user":{"login":"Ricket","id":196978,"avatar_url":"https://avatars3.githubusercontent.com/u/196978?v=4","gravatar_id":"","url":"https://api.github.com/users/Ricket","html_url":"https://github.com/Ricket","followers_url":"https://api.github.com/users/Ricket/followers","following_url":"https://api.github.com/users/Ricket/following{/other_user}","gists_url":"https://api.github.com/users/Ricket/gists{/gist_id}","starred_url":"https://api.github.com/users/Ricket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ricket/subscriptions","organizations_url":"https://api.github.com/users/Ricket/orgs","repos_url":"https://api.github.com/users/Ricket/repos","events_url":"https://api.github.com/users/Ricket/events{/privacy}","received_events_url":"https://api.github.com/users/Ricket/received_events","type":"User","site_admin":false},"labels":[{"id":627615736,"url":"https://api.github.com/repos/CoFH/Feedback/labels/info%20requested","name":"info requested","color":"d0650b","default":false},{"id":553362265,"url":"https://api.github.com/repos/CoFH/Feedback/labels/wtf","name":"wtf","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-07-19T23:20:11Z","updated_at":"2017-08-23T19:31:26Z","closed_at":"2017-08-23T19:31:26Z","body":"I am running the ATM2 pack v0.73, which has ThermalDynamics-1.11.2-2.2.5.12.\r\n\r\nWe have seen that server CPU usage creeps up over time, eventually it is stuck around 100% (according to top; so that's about 100% of one core) and we start seeing consistent \"can't keep up\" messages. We also, after the server is in this state, have issues where we try to log in and then time out. I'm not sure if that is the same issue or a different issue, but it does not happen if we log in shortly after starting the server.\r\n\r\nI am trying to profile and find the cause of the issues, and in doing so I found that Thermal Dynamics is responsible for the vast majority of the CPU usage of the main Minecraft thread (the other threads are sleeping or blocking on read).\r\n\r\n![Screenshot from YourKit profile session](https://i.imgur.com/rKJOobM.png)\r\n\r\nThe main thread is basically not sleeping at this point (thus the 'can't keep up').\r\n\r\nI play with one other person in this server that I maintain, and while I only have a single Thermal machine and no piping, he has been using the piping, including fluid pipes, which seems to be the primary culprit. I'm sure his creations are solely responsible for the time taken by the Thermal tick methods. But I asked him if he had an excessive amount and he said it was definitely not excessive. I can get more details than that if it will help.\r\n\r\nThe other thing I'm curious about: I took the sample above from a server which I merely started and nobody logged into. This was after the server was running for about 18 hours. There are no chunkloaders in the world. What is thermal doing, why is it doing any calculations at all? Are the chunks being chunkloaded even though we didn't put down a chunkloader?\r\n\r\nI'm glad to provide more debug info. I haven't yet dug into the ThermalDynamics code, besides just browsing some of these at-fault methods and not seeing an obvious cause. I might do so."}}
{"actor":{"display_login":"KingLemming"}}