Forums

Schedule tasks slower than in terminal

I have noticed that scheduled tasks is slower than when running in terminal. This might be due to printing and writing to the log files?

  1. Is there a way to make this faster?
  2. Is there a way to clear some of the logs periodically? (I assume when the log file is huge it will be slower)

it may be slower simply because the task servers currently have more tasks being run on them than the console servers- I'm not sure if it is because of the printing/writing of the logs. Those log files are cleared periodically. You could also manually clear it by doing something like echo '' > your-log-file.

Is there a way to make it faster? I am currently maxed out on priority (100k seconds per day) and if it's running at this speed I might need to find a different solution.

quick thing to check- do you know how much slower it is running? and also do you know how it's constrained? eg: cpu constrained vs bandwidth constrained vs io constrained etc?

how can you tell if its cpu/bandwidth/io? It's slower by like ~ 2 seconds which is pretty significant for my purposes.

ah--- do you mean startup time is longer? or that actual number crunching takes longer? (perhaps add some prints with timestamps to your code to debug?)

Running time is longer.

Something is wrong today...probably started about 12 hours ago. Everything seems to be slower...and my threads kept getting killed, I dont think I was running many more threads than I was previously.

Is there a way to schedule tasks to restart the script in the console? (console script crashes sometimes)

you may need longrun.py

I have the similar issues like you. Run in console is fine. Schedule task is slower

Hi there, the servers that run scheduled tasks do have higher contention than the console servers -- we assume people on consoles need a more responsive environment for interactive work, whereas scheduled tasks can afford to be a little slower, that's the trade-off. I don't think the log files are likely to be the problem.

Out of interest, how much slower are you seeing things?

Anywhere from 2-5s, which is pretty significant for my purposes.

I run schedule tasks to put things back up if my file crash. I guess I can have a bunch of try/except to catch errors and just keep going?

I don't think I understand enough about what you're doing to be able to advise you... put what things back up? if what "file" crashes? which errors?