Jericho1060 / DU-Industry-HUD

A simple HUD for monitoring and managing industry in Dual Universe
GNU General Public License v3.0
38 stars 19 forks source link

CPU overload on unit Programming Board [4046] #14

Closed jeffmilton closed 4 years ago

jeffmilton commented 4 years ago

CPU overload on unit Programming Board [4046] Session stopped: 285921192 / Programming board [4046]

Dismantled each piece step by step until I isolated that the error occurred under every condition until the Master Programming board was disconnected from the Large Core. No errors in the board were provided.

Jericho1060 commented 4 years ago

Hi thx for your feedback can you tell me a little more about it : was the storage monitoring enabled ? Was the Master stopping working ?

Jericho1060 commented 4 years ago

Just pushed a rework of the update system to improve things. Not sure it will fix everything but it should be better now.

Waiting for your feedback

jeffmilton commented 4 years ago

If you want to come out to my factory on sanctuary I'll let you reproduce it. I'm Resource#5313 on discord.

jeffmilton commented 4 years ago

I started removing everything until I just had the master board connected to the core and with just the master board hooked to the core it still produces a CPU overload error with the new code.

jeffmilton commented 4 years ago

I turned off transfer monitoring and container monitoring and still get a cpu overload error.

samuk912 commented 4 years ago

just before downtime today I setup one of my factory's with this and i get the same message CPU overload. the factory is a medium core if that makes and difference

Jericho1060 commented 4 years ago

this is probably due to a large number of data collection boards enabled at a same time The core size doesn't change anything i need more information about the case it is hapenning @jeffmilton i'll probably try to find a moment to come to you and see if i can find something

samuk912 commented 4 years ago

@Jericho1060 i only have 6 worker boards at the moment if you want to cords to my factory let me know and i can send them to you

youpilai commented 4 years ago

@Jericho1060 i've done some tests on my own, for a similar project and i'm very interested by any solution i can tell you what i've tried if you want (i'm french by the way)

Jericho1060 commented 4 years ago

Thx to @jeffmilton for letting me test the hud on his industry building and now i identified the problem. the CPU load error at the start of the master board is due to the total number of elements presents on a core. in His case, the building have more than 3000 windows, for a total of 4083 elements. At the start, the script is asking the core for all elements id, then, for each element, he is identifying the type to identify the industries. This is the problem, the first loop on all elements to identify the type for a huge amount of element is causing CPU load error. I'll try to fix that by limining the number of operations each seconds, this fix could take some time and as a temporary solution, the only thing i can tell you is to move your industry on a core with less elements.

I'll come back to you as soon as i have a solution.

Jericho1060 commented 4 years ago

potential fix deployed (faster than what i was thinking)

Jericho1060 commented 4 years ago

Problem solved and tested with @jeffmilton

jeffmilton commented 4 years ago

Thanks for working through this with me. The solution works well!

samuk912 commented 4 years ago

thank you i will update when i log in next