Review and resolve TODOs for #21525 and possible improvement in monitoring
Ticket [#21525] contains a couple of TODOs that should be reviewed and resolved.
Opening this ticket as a reminder:
1. As explained the Total monitor information is duplicated, should not be unless there is a reason I'm missing:
for a in current_qc_total[w]: glidein_monitors['Total%s%s'%(w, a)] = current_qc_total[w][a] # TODO: remove this and following 2 lines of comment if all OK # The content of glidein_monitors is already added to the EntryClassad, no need to duplicate as attribute # Being an attribute was publishing it also in glidefactoryclient, adding it there (was it desired?) # self.jobAttributes.data['GlideinMonitorTotal%s%s' % (w, a)] = current_qc_total[w][a]
2. This is adding calculations also for entries that are inactive. Check on a busy Factory what is the actual load added. If it is too much, a different solution must be found
# Evaluate stats for entries without work only if these will be advertised # TODO: check if this is causing too much load # Since glideins only decrease for entries not receiving requests, a more efficient way # could be to advertise entries that had non 0 # of glideins at the previous round if do_advertize and len(entries_without_work) > 0: forkm_obj.add_fork('GWMS_ENTRIES_WITHOUT_WORK', forked_update_entries_stats, factory_in_downtime, [my_entries[i] for i in entries_without_work])
Furthermore, ticket [#21525] modifies the monitoring values for entries that are not involved in requests (new changes) or for entries and clients (e.g. Frontends) that are interacting.
If an entry is interacting w/ a client but has status also for previous interactions w/ other clients, those statuses are not updated.
This will add further load and there may be no need to update that information since most of it comes from the client itself (ClieintMonitor and Request).
Anyway it should be evaluated