Staggering start times of concurrent tasks

We’ve noticed that some of our jobs can have issues where they crash when dealing with larger scenes. From looking into it, it seems that the issue is actually the initial loading of the scene. In this particular program, a lot of data gets read up front, taking up a huge amount of RAM. After that initial load, the RAM usage drops significantly, to entirely manageable levels. However this can cause an issue when 4 concurrent tasks are running. All 4 try to load the file together, slowing each other down and often crashing.

Our current solution is just that we run less concurrent tasks, but now I’m wondering, is it possible to stagger the times at which concurrent tasks run? Even just a simple timer that waits 1 minute from the first to the second task etc. might be able to help. I couldn’t find anything in the docs, but I’m wondering if I missed an option or if anyone has done something like this to get around a similar issue in their pipeline?

I think your best options is docs.thinkboxsoftware.com/produc … throttling but I am not sure if this will be triggered as it is a single slave, with many tasks. Can you give it a try?

Thanks for this tip, I’ll try it out. Though it’s unclear whether or not this will affect anything when I’m not copying the job files?

To explain, in case I wasn’t clear, our slaves don’t copy job files. The issue with large scenes is that they’re slow and unwieldy to open in the program. It’s the size they take up in RAM that’s the issue. The size on disk doesn’t come into play at all.

I would apply a “Task” level “Limit” to your job(s) in question and let it release the limit, say when the job has progressed > 1% of the task in question:
docs.thinkboxsoftware.com/produc … #new-limit

This will have the effect that no matter how many ConcurrentTasks are running on a slave, with this “Task” level limit, it will be restricted to loading 1 scene file and start rendering to at least 1.1% of the task before then releasing it’s task level limit, which will thereby allow another Concurrent task to then be released. Yes, it will slow things down for the intial job startup per concurrent task, but shoudl deliver the stability and functionality you require to stop this ‘blocking’ or local bottleneck behaviour.

Let us know how it goes.

Ah, that’s a great solution. Unfortunately it wont happen to work in our case, as this is with the Anime Studio Pro plugin. It has an issue with not being able to return useful feedback for the progress bar, so the tasks are always either at 0% or 100%. For any other one this would work really well, but unfortunately it doesn’t seem to work for us.

Thanks for the ideas! We’ll just have to continue manually adjusting concurrent task levels for now.

Ok, understood. Here’s a naughty little trick for you; you can always set the progress yourself by customising the AnimeStudio Pro plugin. I’m not too hot on what Stdout this application dumps out, but is there any line(s) printed out which would be the appropriate point ‘in time’ to force the progress value? If so, we just need a StdoutHandler function that looks for this line via a RegEx and then when found, sets the progress or it could even release the actual limit if you fancy.

# manually set progress to 5% at a certain point of the render process, to allow the "limit" applied to the job to be "released" at 5% or more. self.SetProgress( 5.0 )

docs.thinkboxsoftware.com/produc … 6011018760

Aha, that’s another great trick! …but I think I’ve just discovered the issue with Anime Studio’s stdout.

Judging by the timecodes in these logs, all the stdout gets dumped in one moment, rather than over time:

[code]=======================================================
Log

2016-06-22 17:44:07: BEGIN - CS-RENDER-03\Administrator
2016-06-22 17:44:07: 0: Start Job timeout is disabled.
2016-06-22 17:44:07: 0: Task timeout is disabled.
2016-06-22 17:44:07: 0: Loaded job: FIN-ANIM_sw_seq_003_sc005 (56f67c6fe2e56e1b24aba252)
2016-06-22 17:44:07: 0: INFO: Executing plugin script C:\Users\Administrator\AppData\Local\Thinkbox\Deadline7\slave\cs-render-03\plugins\56f67c6fe2e56e1b24aba252\AnimeStudio.py
2016-06-22 17:44:07: 0: INFO: About: Anime Studio Plugin for Deadline
2016-06-22 17:44:07: 0: INFO: The job’s environment will be merged with the current environment before rendering
2016-06-22 17:44:07: 0: Plugin rendering frame(s): 193-224
2016-06-22 17:44:07: 0: INFO: Stdout Redirection Enabled: True
2016-06-22 17:44:07: 0: INFO: Stdout Handling Enabled: True
2016-06-22 17:44:07: 0: INFO: Popup Handling Enabled: False
2016-06-22 17:44:07: 0: INFO: Using Process Tree: True
2016-06-22 17:44:07: 0: INFO: Hiding DOS Window: True
2016-06-22 17:44:07: 0: INFO: Creating New Console: False
2016-06-22 17:44:07: 0: INFO: Running as user: Administrator
2016-06-22 17:44:07: 0: INFO: Executable: “D:/Anime Studio Pro 11/Anime Studio Pro x64.exe”
2016-06-22 17:44:07: 0: INFO: Argument: -r “W:\09_animation\sw_seq_003\sw_seq_003_sc005\sw_seq_003_sc005_pm.anime” -v -f jpg -o “W:\11_sub_edit\sw_seq_003\06_final_anim_jpg\sw_seq_003_sc005\sw_seq_003_sc005.JPG” -start 193 -end 224 -aa yes -shapefx yes -layerfx yes -halfsize no -halffps no -fewparticles no -extrasmooth yes -ntscsafe no -premultiply yes -multithread no
2016-06-22 17:44:07: 0: INFO: Startup Directory: “D:\Anime Studio Pro 11”
2016-06-22 17:44:07: 0: INFO: Process Priority: BelowNormal
2016-06-22 17:44:07: 0: INFO: Process Affinity: default
2016-06-22 17:44:07: 0: INFO: Process is now running
2016-06-22 17:47:58: 0: STDOUT: ----------------------------------------------------------------------
2016-06-22 17:47:58: 0: STDOUT: Document Path: W:\09_animation\sw_seq_003\sw_seq_003_sc005\sw_seq_003_sc005_pm.anime
2016-06-22 17:47:58: 0: STDOUT: FPS: 24.00
2016-06-22 17:47:58: 0: STDOUT: Size: 3094x1296
2016-06-22 17:47:58: 0: STDOUT: Frames: 1-294
2016-06-22 17:47:58: 0: STDOUT: ----------
2016-06-22 17:47:58: 0: STDOUT: Save Path: W:\11_sub_edit\sw_seq_003\06_final_anim_jpg\sw_seq_003_sc005\sw_seq_003_sc005.jpg
2016-06-22 17:47:58: 0: STDOUT: Output Format: JPEG
2016-06-22 17:47:58: 0: STDOUT: Frames to render: 193-224
2016-06-22 17:47:58: 0: STDOUT: Multi-threaded: NO
2016-06-22 17:47:58: 0: STDOUT: Half Size: NO
2016-06-22 17:47:58: 0: STDOUT: Half FPS: NO
2016-06-22 17:47:58: 0: STDOUT: Anti-aliasing: YES
2016-06-22 17:47:58: 0: STDOUT: Shape Effects: YES
2016-06-22 17:47:58: 0: STDOUT: Layer Effects: YES
2016-06-22 17:47:58: 0: STDOUT: Reduced Particles: NO
2016-06-22 17:47:58: 0: STDOUT: Extra Image Quality: YES
2016-06-22 17:47:58: 0: STDOUT: Use NTSC Safe Colors: NO
2016-06-22 17:47:58: 0: STDOUT: Don’t Premultiply: NO
2016-06-22 17:47:58: 0: STDOUT: Variable Widths: NO
2016-06-22 17:47:58: 0: STDOUT: Pixel Depth: 24
2016-06-22 17:47:58: 0: STDOUT: Hardware Acceleration: Enabled
2016-06-22 17:47:58: 0: STDOUT: ----------
2016-06-22 17:47:58: 0: STDOUT: Frame 193 (1/32) 3.87 secs/frame 119.94 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 194 (2/32) 7.65 secs/frame 229.55 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 195 (3/32) 7.32 secs/frame 212.17 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 196 (4/32) 7.16 secs/frame 200.38 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 197 (5/32) 7.07 secs/frame 190.89 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 198 (6/32) 7.01 secs/frame 182.32 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 199 (7/32) 6.97 secs/frame 174.28 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 200 (8/32) 6.94 secs/frame 166.51 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 201 (9/32) 6.91 secs/frame 159.03 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 202 (10/32) 6.90 secs/frame 151.69 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 203 (11/32) 6.88 secs/frame 144.44 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 204 (12/32) 6.87 secs/frame 137.33 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 205 (13/32) 6.85 secs/frame 130.21 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 206 (14/32) 6.85 secs/frame 123.21 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 207 (15/32) 6.84 secs/frame 116.23 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 208 (16/32) 6.83 secs/frame 109.25 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 209 (17/32) 6.82 secs/frame 102.30 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 210 (18/32) 6.81 secs/frame 95.38 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 211 (19/32) 6.81 secs/frame 88.49 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 212 (20/32) 6.80 secs/frame 81.58 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 213 (21/32) 6.79 secs/frame 74.71 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 214 (22/32) 6.79 secs/frame 67.87 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 215 (23/32) 6.78 secs/frame 61.04 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 216 (24/32) 6.78 secs/frame 54.24 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 217 (25/32) 6.78 secs/frame 47.44 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 218 (26/32) 6.77 secs/frame 40.64 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 219 (27/32) 6.77 secs/frame 33.85 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 220 (28/32) 6.77 secs/frame 27.07 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 221 (29/32) 6.77 secs/frame 20.30 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 222 (30/32) 6.76 secs/frame 13.52 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 223 (31/32) 6.76 secs/frame 6.76 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Frame 224 (32/32) 6.75 secs/frame 0.00 secs remaining
2016-06-22 17:47:58: 0: STDOUT: Done!
2016-06-22 17:47:59: 0: INFO: Process exit code: 0
[/code]

When I tried adjusting the HandleProgress function, it didn’t seem to be updating the task progress at all. Even when I just changed the function to literally just be self.SetProgress(1). When I moved that very same line to the end of the arguments gathering, it was able to set the progress so it was definitely reading from the correct script. This makes me think that HandleProgress isn’t getting called at a useful point, presumably because all the stdout appears to be dumped at once, after all the rendering has been done anyway.

I’ll look deeper into the plugin script anyway and might find some way in there to delay some of the tasks even if it’s a bit hackier than these solutions.