Planetside Software Forums

Support => Terragen Support => Topic started by: pokoy on August 18, 2017, 06:20:04 AM

Title: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 18, 2017, 06:20:04 AM
I am seeing something I didn't get with any other version until now. Some actions, like resetting TG (file menu > New) or loading and saving scene files takes 30 seconds, sometimes even longer. During that time TG is unresponsive or draws a blank white window... It's not happening always, but quite often. For example, saving a file (network or locally, doesn't matter) will sometimes happen immediately, other times it takes somewhere between 30-60 seconds. Sometimes, changing values in a node will behave similar and causes TG to get unresponsive for some time. All this is without RTP being used.

When rendering, I sometimes can't access other programs and the mouse pointer disappears or freezes, browsing the internet (Opera, Chrome based) is also heavily affected, the browser hangs or takes really long to load even a simple page.

I suspect that the updated threading and CPU utilization isn't as smooth as it should be. I've seen similar behavior from renderers in WIP stage where CPU threading hasn't been optimized. I never had these problems before and could perfectly render in the background and still do something else on the same PC.

Anyone else seeing this?
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on August 18, 2017, 03:46:58 PM
I have noticed a difference in how TG4 looks when loading (file|new has to go through an initialization loading the default scene.)  The display seems to  "whiten" a bit longer, but I imagine the program needs to go through a lot of calculations to get to a point where the preview begins to display the loaded scene.  It will use all your CPU cores as set in preferences, so it could grab a lot of resources if your settings use all cores.

My system has 8 cores/16 thread so in the image below shows all 16 threads getting a 50% to 75% load when doing a File|New (right side of each thread display.)  I'm sure Matt can explain this better than my guesses.



Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Kadri on August 18, 2017, 05:47:41 PM

Maybe not related directly to your problem but in the past (if i remember correctly) when i set affinity to 7 cores it stayed that way.
Now it changes so far i see. Not much a problem but a little annoying.

I have kind of the same problems like you have too like the OS stuttering-freesing for a short time.
But loading and saving doesn't look much different to me.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on August 18, 2017, 08:12:24 PM
Kadri, but do you mean "Preferred number of cores" in Edit|Preferences?  Mine only changes when I change it -- it's not stored in the tgd files.

Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Kadri on August 18, 2017, 08:36:13 PM
Quote from: jaf on August 18, 2017, 08:12:24 PM
Kadri, but do you mean "Preferred number of cores" in Edit|Preferences?  Mine only changes when I change it -- it's not stored in the tgd files.

Sorry, i had to be more precise. I mean the "affinity" option in the Windows TaskManager.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on August 19, 2017, 12:04:05 AM
No problem.  I almost wrote that I have had a few "delays" in win10 (at least I attributed those to win10) that I didn't notice in winXP.)  I still have problems (sometimes) if  I pause and later resume a TG4 render or abort a population.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Dune on August 19, 2017, 02:40:15 AM
I don't have any of these problems on win 7, so maybe it's win 10?
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Kadri on August 19, 2017, 03:12:48 AM

Maybe. But my small problems begun with v.4.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on August 20, 2017, 03:02:39 PM
Threading for the *renderer* hasn't changed as far as I recall. It's just for the 3D Previews. This *could* affect the loading issues, etc. you're seeing, but should not have an impact on system resources and freezing, stuttering, etc. *during* rendering.

We're seeing some various issues like this which may be related, but are hard to track down. We'll look into it, but if anyone can come up with a very reliably reproducible process to replicate the issue that would be extremely helpful.

Affinity is an operating system feature, TG has no effect on it, so if it "stuck" previously, it's not something that changed in TG.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 21, 2017, 02:49:38 AM
I'm on Win 10 if it helps, I have a Win 7 render node that I'm going to test with the same scene files and see if there's any difference, will report later.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 21, 2017, 07:44:02 AM
After briefly testing the same files on Win 10 and Win 7 it really looks like Win 7 doesn't suffer from the occasional hangs/stalls. I can't say for sure but it could really be related to Win 10.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on August 21, 2017, 06:20:10 PM
I went from XP to win10 and notice more temporary "hangs" now.  It's more prevalent with TG, but then TG usually puts more of a load on the system. 

I just shake my head now when I look at the number of processes (mostly Microsoft) running under win10.  Chrome also can be resource heavy.

I think win10 has a "game mode" that might be worth exploring.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 22, 2017, 08:05:41 AM
After working with a scene on Win 7 earlier today I have to say that Win 7 suffers from the same problem, disabling the 3d preview didn't help, unfortunately. These short freezes where never a problem with older TG versions.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: archonforest on August 22, 2017, 04:53:16 PM
Quote from: pokoy on August 22, 2017, 08:05:41 AM
After working with a scene on Win 7 earlier today I have to say that Win 7 suffers from the same problem, disabling the 3d preview didn't help, unfortunately. These short freezes where never a problem with older TG versions.

I do not have lags on Win 7..but I have TG 4.0.4
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 23, 2017, 02:57:11 AM
I wonder how TG 4.1.11 behaves for you. It's definitely showing the lags and freezes for me.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: archonforest on August 23, 2017, 04:44:36 PM
Yeah i wish but can't download it from the PS site anymore.  Always tells me invalid email... Guess i stick with the 4.0 version.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on August 23, 2017, 05:53:05 PM
pokoy, do you get "lags" on scenes without objects (trees, plants, 3d models, etc.)?  Are you using RTP when you see the "lags"?
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 24, 2017, 04:27:13 AM
Quote from: jaf on August 23, 2017, 05:53:05 PM
pokoy, do you get "lags" on scenes without objects (trees, plants, 3d models, etc.)?  Are you using RTP when you see the "lags"?
No objects, no RTP - I open TG with the default scene and just saving takes almost a minute while TG freezes showing a blank screen - regardless of local/network location, I have no issues with HD or my NAS whatsoever, my machine runs smoothly otherwise. I was working a bit longer with a scene yesterday and the freezes have been manageable, but sometimes TG decides to take a little longer for some actions. There's no pattern that I can put my finger on, unfortunately.
One thing I should note, every machine I tested so far has 2 CPUs, this might be important to know. I have a single CPU machine here but not sure when I'm going to be able to test that.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on August 24, 2017, 05:15:18 PM
I am using a 2 CPU machine here quite often and still do not see these issues. Did I understand right that you are working with a NAS? Is it your *primary* storage for Terragen files and data?

archonforest, are you using free version or do you have a license? You should not need an email to download if you have a license. Or maybe you are trying to login but have not *created a new account on our new website yet*? See the "Returning Customers" page (linked in footer) if so.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on August 24, 2017, 05:19:23 PM
Quote from: Oshyan on August 24, 2017, 05:15:18 PM
I am using a 2 CPU machine here quite often and still do not see these issues. Did I understand right that you are working with a NAS? Is it your *primary* storage for Terragen files and data?...
I'm using a NAS, but saving to desktop or any other local path will hang a bit... however, there will be some entries in the 'latest files' menu pointing to the NAS.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on August 24, 2017, 05:39:00 PM
Interesting. I believe we've had some sporadic reports of issues accessing network drives in the past. I save to a network drive on a local machine here and have no issues though... I really wish we could reproduce these things, but unti/unless we can, we aren't really able to diagnose or fix them.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on November 08, 2017, 08:22:29 AM
So I have some further observations to share, maybe it helps.

It seems that the aborting stage of current preview renderings, be it OpenGL or RTP is causing problems - not always, though. Sometimes TG will hang a bit during this stage and since it seems to abort any current calculations when you save it might be what's causing the lags, not the saving or accessing files or network.

Then, TG hangs for me when I try to open from library. I have to test this one a bit more but so far it just hangs for minutes until I kill the tgd.exe process.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on December 11, 2017, 06:14:01 AM
Did you investigate the issue? Just installed 4.1.18 and it just took 1 minute to open a scene of 40kb, saving takes up to 1 minute too. Still, no pattern, it happens sometimes, other times it doesn't lag at all.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: luvsmuzik on December 11, 2017, 10:48:51 AM
Are you viewing objects in bounding boxes, or textured? My unit does not like textured view very well. I often have to disable a population or object if I want to use view as textured. HP 4GIG Win10 latest TG update. I can no longer even open my Louis Fountain file due to last close was in textured view.  >:(
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on December 11, 2017, 12:15:17 PM
Quote from: luvsmuzik on December 11, 2017, 10:48:51 AM
Are you viewing objects in bounding boxes, or textured? My unit does not like textured view very well. I often have to disable a population or object if I want to use view as textured. HP 4GIG Win10 latest TG update. I can no longer even open my Louis Fountain file due to last close was in textured view.  >:(
In my case, it's more or less the default terrain with a cloud layer, nothing else. I'm seeing this on Win7 and Win10. The only thing these machines have in common is that they're all Dual Xeons, that's why I think it's a threading problem.
Your issue could be something entirely different but sounds really frustrating.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: KlausK on December 11, 2017, 01:52:11 PM
I only notice a lag with the 3D Preview window. But opening or saving does not show the symptoms you describe.
If you look at my specs below seems similar to the machines you are working on.
Dual Xeon mainboards mostly have a onboard video graphics chip. Ever took out your Graphic Card perhaps?
Or did you ever try to disconnect and disable anything what has to do with network and NAS completely? Simple offline machine?
Cheers, Klaus
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on December 11, 2017, 02:06:52 PM
Quote from: KlausK on December 11, 2017, 01:52:11 PM
I only notice a lag with the 3D Preview window. But opening or saving does not show the symptoms you describe.
If you look at my specs below seems similar to the machines you are working on.
Dual Xeon mainboards mostly have a onboard video graphics chip. Ever took out your Graphic Card perhaps?
Or did you ever try to disconnect and disable anything what has to do with network and NAS completely? Simple offline machine?
Cheers, Klaus
The thing is this started with either 4.1 or one of the later updates where changes were introduced to CPU threading in general to make RTP more responsive.
Sure, it could be something outside of TG, things like .NET, or drivers, Win updates... then again, I'm not sure which of these would affect both Win7 and Win10 in exactly the same way. But it's not a single machine, and it's happening reproducibly since said update. I should take some time to test this on the single CPU machine, though.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on December 11, 2017, 11:18:13 PM
We are still not able to replicate this issue on our end, unfortunately. Any additional testing or narrowing down of symptoms you can do would be very helpful as we definitely want to solve this if it's something in TG.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on December 12, 2017, 08:11:44 AM
Thanks, Oshyan. I'll test this on the single CPU machine when time allows and will report back.

One factor could be the OS language and decimal point settings, but that's something Matt would have to look into. We're on a german OS setup, so decimal point is set to comma. TG still shows a dot, but I don't know if and how this could affect TG in such a way. Everything else works fine and I'm still super happy with TG4, it's only that the lags are annoying sometimes.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on December 12, 2017, 05:59:53 PM
I don't know why the language setting and different decimal setup would affect UI performance. We have lots of users on non-English OSs, too, and no other major reports of this.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on January 30, 2018, 02:46:15 PM
Sorry for coming back to this but I'm still having the problem.

I just opened an old scene from 2014 (a TG 2.x file probably) and when trying to save the file or a clip file with a few nodes TG will hang for a really long time. The problem is much worse than with files created in TG4, these will hang for 15-20 seconds maybe but this file takes 5+ minutes. FWIW, CPU usage is at 0% and goes up to 0,1% every now and then.
It's really becoming a problem for me since I need to access some older files.

Am I really the only one seeing this?
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Matt on January 30, 2018, 03:13:54 PM
Would you be willing to do a remote desktop session with us? If so, contact me privately and we'll set something up.

Matt
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on January 30, 2018, 03:35:31 PM
Quote from: Matt on January 30, 2018, 03:13:54 PM
Would you be willing to do a remote desktop session with us? If so, contact me privately and we'll set something up.

Matt
Absolutely, I'd be glad to help if it means you can track down the issue. Will PM you tomorrow. Thanks!
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on January 30, 2018, 07:48:21 PM
My system has settled out -- not sure if I'm just more cautious with the preview window (pause it more often and avoid too many population previews -- setting them to hidden when not working on them.)  I don't see it as a problem at this time.  :)
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: jaf on January 30, 2018, 07:49:33 PM
Quote from: pokoy on January 30, 2018, 02:46:15 PM
Sorry for coming back to this but I'm still having the problem.

I just opened an old scene from 2014 (a TG 2.x file probably) and when trying to save the file or a clip file with a few nodes TG will hang for a really long time. The problem is much worse than with files created in TG4, these will hang for 15-20 seconds maybe but this file takes 5+ minutes. FWIW, CPU usage is at 0% and goes up to 0,1% every now and then.
It's really becoming a problem for me since I need to access some older files.

Am I really the only one seeing this?

I'll have to dig out my old file and see.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: ajcgi on February 07, 2018, 05:19:53 AM
I'm getting hanging problems occasionally and think it's due to this thing I'd love to turn off. This is a preview of my displacement. It looks nothing like the real thing renders, but with the 3D preview paused, say at detail 20, this thing continues to run until it's ready. On a heavy scene this is just slowing things down. Can we turn it off? I don't think I ever use it as I don't find it reliable.

Edited with attachment.

Latest release on Windows Fisher Price Special Edition. I mean 10. 10. It's windows 10.

Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on February 07, 2018, 08:19:44 PM
Unfortunately that window cannot be paused or closed currently. It would be nice if it were closeable like the one on the Objects layout... I'll file a feature request.

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: ajcgi on February 08, 2018, 04:56:30 AM
Thanks Oshyan.
I'd consider that a high priority imo. On one of my scenes that preview reaches the highest quality then will start again a while later with the slightest provocation. This is a quick machine with a bonkers 40 threads, but even this is hanging. It's highly frustrating considering that's a window that seems inaccurate and unused to me. Others might use it of course, but the option to kill it entirely would be brilliant.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on February 09, 2018, 11:25:23 AM
For anyone affected/interested.

Finally, I could test if the lag is present on a single CPU machine and it turns out its NOT, loading and saving files and clip files is instant - no lag whatsoever.
Then, I could test another dual CPU machine and it ALSO shows the lag in exact the same way like with my main workstation.

One of the affected PCs runs Win10, the other Win7, since the issue is present on both machines we can probably eliminate Win10 as a possible culprit.

I'd say this pretty clearly points towards CPU threading problems with dual CPUs.
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Oshyan on February 09, 2018, 10:57:49 PM
It's not as simple as that, unfortunately. I have a dual CPU machine and don't have these issues. I think Matt does too, actually. I really wish we knew what was going on here, but it's very hard to track down when we can't replicate it. I'm actually not aware of anyone else having the exact same issue you're having, are you?

- Oshyan
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: Matt on February 10, 2018, 11:07:55 AM
AJ, that screenshot shows there's something wacky with one of the shaders in that scene. Even if the final render looks fine, something like that could really affect render speed. I'd love to see a .tgd that shows that spikey shader preview. I know it's a separate issue from what this thread is about, but I'd really like to know what's causing that weird preview.

Matt
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: pokoy on February 11, 2018, 10:47:01 AM
Quote from: Oshyan on February 09, 2018, 10:57:49 PM
It's not as simple as that, unfortunately. I have a dual CPU machine and don't have these issues. I think Matt does too, actually. I really wish we knew what was going on here, but it's very hard to track down when we can't replicate it. I'm actually not aware of anyone else having the exact same issue you're having, are you?

- Oshyan
Sorry Oshyan, I totally forgot you mentioned that before - you're right, it's probably not that simple. I'll be doing a remote desktop session with Matt soon, let's hope it'll help solving the mystery.
Thanks for your assistance!
Title: Re: TG 4.1.11 - short frequent hangs with TG... CPU threading problems?
Post by: ajcgi on February 12, 2018, 09:21:41 AM
Have mailed you Matt cheers.