Page MenuHomePhabricator

request tool runs secWatch job once per minute
Closed, ResolvedPublic


*2/ * * * * jsub -once -l release=trusty -N secWatch python $HOME/FNBot/secWatch/ > /dev/null

This was probably meant to start with */2 to run every other minute but even that seems excessive. Scaling back to run once every 5 or 10 minutes would remove a lot of jobs from the job grid.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hi @bd808, thank you for that note. Please have a look at the logfile:

06-04-2017 | 14:46:03 | <--> Start (164301664)
06-04-2017 | 14:46:03 | <--> Pages: 1
06-04-2017 | 14:46:03 | <--> Done: 0.2352s
06-04-2017 | 14:47:03 | <--> Start (164301685)
06-04-2017 | 14:47:03 | <--> Pages: 1
06-04-2017 | 14:47:03 | <--> Done: 0.42006s
06-04-2017 | 14:48:04 | <--> Start (164301704)
06-04-2017 | 14:48:04 | <--> Pages: 2
06-04-2017 | 14:48:04 | <--> Done: 0.2716s

The job needs less than a second per minute, rarely more. Maybe it's possible to keep this interval, considering the short runtime?

Thank you very much!

why not just keep a continuous thread going with a sleep(60) that way you minimize the number of jobs and don't loose functionality.

@Betacommand: well, a continuous would be okay, instead of a recurring job in the grid? Thanks!

The basic point is not the amount of CPU or wall clock time that a job uses to do its useful work. It's more that the act of asking the grid to schedule, launch, record log output, tear down, and update accounting once per minute is typically overkill. I didn't read through the actual job code to understand what it is doing, but broadly speaking there are very few activities on wiki which need to be performed 1440 times per day/10080 times per week. Really the only things I can think of which are that time critical are automated spam fighting systems, and they would typically run as continuous processes with some internal per-batch delay mechanism. Would anything horrible happen on-wiki or off if your job ran 6-12 times per hour instead of 60?

FNDE claimed this task.

I scaled down the interval to

*/5 * * * * jsub -once -l release=trusty -N secWatch python $HOME/FNBot/secWatch/ > /dev/null

In the next step, I'll add a continuous job with one execution every minute.

Thank you all!