Planetside Software Forums

General => Terragen Discussion => Topic started by: garin2 on December 02, 2010, 03:02:28 AM

Title: cpu usage
Post by: garin2 on December 02, 2010, 03:02:28 AM
hi

i have 16core mac machine.

i attached two files.
when i render 'test5b' my 16 cpus use its full power but for 'v2_01' it only uses 30% power.
both mini/max threads and size of subdiv cache are same.

know how to ensure TG uses full power of all the available cpus?

thanks,

hb

p.s. how to define the size of subdiv cache? i just put some high number.
Title: Re: cpu usage
Post by: dhavalmistry on December 02, 2010, 10:16:52 AM
just a little off topic.....16 core machine  :o :o :o

sorry I cant help you with your cpu usage issue....I am learning TG2 myself...
Title: Re: cpu usage
Post by: jo on December 02, 2010, 07:22:52 PM
Hi,

I have an 16 core Mac as well. Well, 8 cores with Hyperthreading making 16 cores for TG2, which would be the same as  your Mac.

I tried your files and see the same CPU usage behaviour. I had a quick look and couldn't find what in particular was allowing test5b to better utilise the CPU. I'm interested though because it's not very often I see a scene which gets such high CPU usage.

Generally speaking you won't be able to make TG2 utilise 100% CPU on a 16 core machine. For one thing TG2 doesn't scale as well as the number of render threads gets higher. The Mac versions scales a little worse than the Windows version as well, this is down to some issues with the OS. OS X 10.6 has the best performance. Generally speaking for most scenes I've found 8 threads to be the sweet spot on the Mac. Sometimes up to 12 threads is a bit quicker, but usually only by a smaller percentage than you might expect.

In the case of your scenes I tried v2_01 with both 16 threads as you'd set it and 8 threads. 16 threads took:

6 mins 25s

8 threads took:

3 mins 30s

You can see that using 8 threads is dramatically faster.

If you will be rendering your scene a lot, for example test renders or an animation, it's worth experimenting with the number of threads until you find the fastest setting.

As to setting subdiv cache, if you do a search for that you should find plenty of information. I will say that setting it to 3200 MB is too much though. You only have a theoretical memory limit of 4GB with the 32 bit version. Telling TG2 it can use 3.2 GB is too much, although it would be worse if you'd said to preallocate it because that would have left only up to 800 MB available for everything else. In your relatively simple scenes this might not be an issue but as your scenes get more complex it could be problematic. When using 8 threads and up I usually set to 100 multiplied by the number of threads i.e. 8 threads x 100 MB = 800 MB.

Regards,

Jo
Title: Re: cpu usage
Post by: garin2 on December 02, 2010, 08:20:02 PM
thanks for the info.

i have same computer - dual 8core
another thing i found yesterday is that when i increase the render size to 2k(2048x1152), even 'v2_01' file uses full power of all cpus. but for 720x405 size it only uses half of cpu power.

hb.
Title: Re: cpu usage
Post by: RArcher on December 02, 2010, 10:55:15 PM
I think that is easily explained.  With a smaller image and standard settings it is likely that it takes less than 16 render buckets to completely render the image, so it will only use as many threads as needed to render everything.  You can of course now adjust your bucket settings manually to make sure all 16 cores are doing something.
Title: Re: cpu usage
Post by: garin2 on December 03, 2010, 04:31:12 PM
that's what i thought, too.

but the other file, even with small size it uses full power of all cpus.
Title: Re: cpu usage
Post by: RArcher on December 03, 2010, 04:56:23 PM
In the "Bucket Controls" window there are parameters for Max Bucket Size and also a checkbox for "Allow Auto Reduction"  If that is checked it automatically adjusts your bucket size based on the AA value.  Your test 5b render has the AA set to 4 which may reduce the bucket sizes enough so that all 16 cores have something to work on.  The other file has the AA set to 3 which may keep the buckets large enough that only a few cores are being used.

All this is theoretical musings on my part though as I don't have a 16 core machine to test with, but I am fairly sure this is what is going on with the cpu utilization anyway.

You should be able to test fairly easily though.  Simply unckeck the "Auto allow" box and then change the max bucket size to be something like 32 x 32 or 64 x 64 and see if all your cores are used.