Bug: Rendering Stopped Overnight

Started by PeanutMocha, September 12, 2012, 12:26:33 PM

Previous topic - Next topic

PeanutMocha

I was rendering an image yesterday with CPU affinity using 4 of 8 cores and priority set to Low.

Before I turned in for the evening, I changed the CPU affinity to use all 8 cores (priority unchanged).

When I looked at it in the morning, I noticed three interesting things:

- The image was unchanged
- The CPU utilization for tgd.exe was 0%
- Rendering was not paused.  The pause button text was "Pause".

I then pressed the pause button, which caused the text to change from "Pause" to "PAUSED".

I then pressed the pause button again, which caused the text to change from "PAUSED" to "Pause".  Result:

- The display instantly updated with a fairly substantial update to the image
- CPU utilization is again near 100%
- Visually, rendering seems to be progressing

Build 2.4.32.1
64-bit version running
Windows 7 x64
i7
16GB RAM

jaf

#1
I'm interested in seeing the Planetside response.  I have assumed it's not good to make any changes during a running (or paused) render.  Since we can't (currently) stop/pause a render and save the progress for later, I'm thinking there's a good reason (that making changes to a scene during rendering is a bad idea.)
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

PeanutMocha

Last time I asked about controlling the amount of CPU used by the renderer (actually it was a feature request), I was told that using the OS mechanism to control priority and CPU affinity is the way to go.

You point out a valid issue: It would be awesome to have a mechanism to persist the current state of the renderer so that the machine can be shut down/rebooted and work resumed later.  It would be even more awesome if the renderer would use such a mechanism to save its own internal state every hour or so, so that an unintentional reboot (power outage, Microsoft deciding a patch is worthy of forcing a reboot when the PC is unattended) does not wipe out many hours or days of work.

Upon Infinity

I use this technique all the time, although I don't think it's ever paused on me.  Although, there have been times when I re-engage the other processors that Terragen will not take them.  However, this usually happens when I've been doing all sorts of different tasks and been a few days since a reboot.

To be fair, windows does give a warning that changing these settings can result in unpredictable events.  I think your best bet is to give it all the processors you want to let it have at the beginning and only change the priority, if at all, as I find even on low priority, the cpu will still give Terragen over 90% if nothing else is going on.

jo

Hi,

This isn't a TG2 bug.  I haven't talked to the others about this but I would say that changing this sort of thing isn't supported. Changing priority is probably ok, but if you want to experiment with this you're on your own really. If you get a problem like this again in a "normal" situation then we'd like to hear about it of course.

Anyway, let's take the default scenario where TG2 detects 8 cores at startup and you're using default render node thread settings. This would mean TG2 is rendering with 8 threads. If you then set it to only run on 4 cores you will get 8 threads trying to render on 4 cores, potentially cutting rendering speed in half. You also set the priority to low which is going to slow it down more. You also need to make sure you've set the affinity to the real CPU cores and not the virtual cores. There's a bunch of other possible permutations I can imagine too. I have a sneaking suspicion if you'd just let TG2 render at full speed overnight you'd probably have got just as far it not further in a shorter time.

I've never really felt a need to mess with this stuff myself on OS X. I always use 16 threads. The only time I've run into issues with responsiveness generally is when TG2 runs out of RAM and starts to use a lot of virtual memory. In that case messing with the thread scheduling won't make any difference. I don't have as much experience with this in Windows but I don't remember it ever being a problem. I guess you've seen something different?

Regards,

Jo

Kadri

#5

Jo , i have not a problem with this and i change those settings without a problem while rendering.
I always thought about things like you said above
and make these changes in a cautious kinda way.

But just for your knowledge; the real reason i change those settings is that TG2 uses the cores
very aggressively unlike lightwave for example.
I can leave the 8 core settings intact in Lightwave and surf and use the other small programs without much problems.
But TG2 makes such an impact that i always leave 1-2 cores for other things .
This was the same on Vista (64 bit) and now on Windows 7 (64 bit), before i had only 4 GB ram and now with 32 GB ram.

I do not know why this happens and this is not something i think very much about , but i just wanted you to know  :)

jo

Hi Kadri,

Thanks very much for the feedback.

Regards,

Jo

PeanutMocha

When a render takes 24+ hours, I really can't just leave it running on all cores because, even with the priority set to Low, I simply can't work on the one PC I have for both earning a living and doing TG2 because there are sometimes substantial delays in the OS releasing CPU resources to non-TG2 programs.  There are noticeable pauses when simply typing text in a slightly-heavy editor like Visual Studio (in fact, I can notice pauses now typing into my browser with a different render running in the background).

My choices are a) Hope I don't get this bug again; b) Begin the render with less than all cores and not change it; c) Not use the computer for work during the render.

By the way, the render that originally spawned this thread eventually visually finished (no apparent change to the image after 4 hours of not touching it, and 0% CPU during that time) but the render window never went to the Finished state.  I had to take a screenshot (fortunately my monitor is higher resolution than the image) to get the result.

For the record, Oshyan recommends using the CPU Affinity settings of the operating system during a render as needed:
http://www.planetside.co.uk/forums/index.php?topic=7863.msg84076#msg84076

jo

Hi,

Quote from: PeanutMocha on September 17, 2012, 11:52:51 AM
My choices are a) Hope I don't get this bug again; b) Begin the render with less than all cores and not change it; c) Not use the computer for work during the render.

I would go with B. That's part of the reason you can control the number of threads used during rendering.

Quote
For the record, Oshyan recommends using the CPU Affinity settings of the operating system during a render as needed:
http://www.planetside.co.uk/forums/index.php?topic=7863.msg84076#msg84076

I don't really read that as a recommendation as such. If you want to experiment with those sort of settings feel free, but it's not something we support.

My personal take on it is that these are very advanced settings and I wouldn't be surprised if messing with them caused problems. I think as far as I'd go myself would be to change priority.

Regards,

Jo