CGRU / cgru

CGRU - AFANASY
http://cgru.info/
GNU Lesser General Public License v3.0
276 stars 111 forks source link

skip refresh of a DONE job #599

Closed ultra-sonic closed 4 months ago

ultra-sonic commented 5 months ago

Hi Timur,

i am creating this ticket as a follow up on #592 here is a quote of our converstation:

we have also noticed that the cpu load of afserver goes up just by having lots of "DON" jobs. we usually have 1000 RDY jobs and sometime between 4000-10000 DON jobs and they seem to have a huge impact on the server performance. shouldn't those jobs be skipped really fast? is there anything that the server needs to check on them?

where you answered:

  1. DONE jobs are skipped in solving. Unfortunatelly DONE jobs refreshes same way as not DONE. Any node runs refresh in Afanasy every second. Jobs check depends and refreshes all task to refresh counts and state. This needed, for example, if you restart task of some done job. But i see that we can optimize refresh, i think that we can totally skip refresh of a DONE job, and run refresh on any action (restart something).

We would greatly appreciate if this change could be added to the 3.4.0 release. Do you think this is doable?

Thanks in advance Oli ( and @sebastianelsner )

timurhai commented 5 months ago

Hello, Oli! Right now I implementing SUSPENDED task state, needed for manual (from outside) dependence solving between tasks. This is not a big deal, and I think i will finish it at the next week. Later I can start to solve this issue (it is not big too). So it will be added to the 3.4.0 release.

ultra-sonic commented 5 months ago

thanks for the quick reply and for adding it to 3.4.0 much appreciated!

timurhai commented 4 months ago

This day at our studio we are working on an updated server. It seems everything is ok. Binary compatibility was not broken, so you can test.

timurhai commented 4 months ago

It still works fine, i think that issue is done.

sebastianelsner commented 4 months ago

Yes! This works for us as well. Many thanks for implementing. I think this took a bit of load of the server. But still, we are seeing that the actual issue is the various "hasTicket" functions, which are called many times and load our server.

ultra-sonic commented 4 months ago

as @sebastianelsner this works like a charme! thanks a lot for implementing this!