Digital Art Zone

 
   
1 of 2
1
Use less cores when rendering DS4
Posted: 28 May 2012 02:10 PM   [ Ignore ]
New Member
Avatar
Total Posts:  2
Joined  2010-12-31

Trying to render an animation, and want to use less cores on my processor. Does anyone know how to lower the priority, so it’s not using all the resources at the same time on my machine?

Getting crashes and stuff.

I have Win 7, 64 bit sys, 8 core AMD proc. Black Ed.

Thanks, Mike

Image Attachments
Cores.JPG
Profile
 
 
Posted: 28 May 2012 03:45 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
Rank
Total Posts:  169
Joined  2003-10-09

Same system here 8 cores but with an Intel Processor. When I render in DAZ Studio I always first launch the Task manager then in the processes tab I look for DAZStudio.exe and right click on it to set the Affinity. I always uncheck 2 cores so I can do something else while the rendering is going on. This solution works only for the current DAZ Studio session.

I am looking for a more permanent way to set Studio’s processor affinity. It can obviously be done with a manifest file located in the same directory as the exe. I couldn’t find any documentation yet explaining how to do that. I only found some info for the exe to run on one proc while I want it to run on 6 proc. Stay tuned smile

 Signature 

Erdehel’s deviantart page

Profile
 
 
Posted: 28 May 2012 04:09 PM   [ Ignore ]   [ # 2 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2984
Joined  2004-04-14

Try using WinAFC - http://affinitychanger.sourceforge.net/

Download for the program is under the installation section, second link.

 Signature 

My DAZ3D Store
My Free Stuff
My Art @ DeviantART
Ships of the Line - MEGA THREAD
How to use the Poser Format Exporter - **Updated 2013-02-09**

Profile
 
 
Posted: 29 May 2012 04:21 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  16477
Joined  2009-01-22

I get great results by dropping DS to just 6 cores, as far as PC use goes. Does Affinity Changer allow you to save a Preset? Or would I be better of writting a script file?

 Signature 

Exile, Drows Walk: A Tale of Jaderail starts here. Free pulp fiction at its Fantasy best, Updated 2/3/14.
Proud Member of the Bald Wizards Club My stuff at DeviantArt

Profile
 
 
Posted: 29 May 2012 05:08 AM   [ Ignore ]   [ # 4 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6459
Joined  2006-02-20

Would it work to make/run a batch file for low priority?
It works on my WindowsXP.

Creating a batch file to run a program at priority belownormal:
Go to the folder where your DAZStudio.exe resides.
Create a new text document with an Editor (txt) (not Word or something like that, that tends to add formatting).
Write:

start /belownormal DAZStudio.exe

save as DS4Low.txt
Rename to .bat (maybe you have to show file extensions first)
Answer with yes to the are you sure question.
Right click on the bat file to create a shortcut on your desktop.

Instead of using the DS icon on the desktop use the DS4Low icon to start DS.

For Poser it’s the same procedure with
start /belownormal Poser.exe
or
Poserpro.exe
or ...

 Signature 

I like Bryce, DazStudio, Poser and Vue ... in alphabetical order. And I would probably like Carrara too, if I could find the time to become acquainted with it. Peace?
Poser and Daz Studio Free Resources Wiki: https://poserdazfreebies.orain.org

Profile
 
 
Posted: 29 May 2012 07:12 AM   [ Ignore ]   [ # 5 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14

Just make an “Affinity” batch file.

The key bit is that you have to understand that the value following the /affinity switch is a hex mask.  It basically boils down to this:
1 = OFF OFF OFF ON
2 = OFF OFF ON OFF
3 = OFF OFF ON ON
4 = OFF ON OFF OFF
5 = OFF ON OFF ON
6 = OFF ON ON OFF
7 = OFF ON ON ON
8 = ON OFF OFF OFF
9 = ON OFF OFF ON
A = ON OFF ON OFF
B = ON OFF ON ON
C = ON ON OFF OFF
D = ON ON OFF ON
E = ON ON ON OFF
F = ON ON ON ON

Another thing to note is that you need an affinity mask for each 4 CPUs (including hyperthreaded CPUs if you have them).  So if you have a 6 CPU machine with hyperthreading (shows as 12 CPUs on the task manager) you’ll need THREE values for affinity.  The values are from the upper end to the lower end of CPUs in order.  So if you wanted everything but CPU0 dedicated to DAZStudio you’d do:

c:\windows\system32\cmd.exe /c start /affinity FFE c:\program files\daz\studio4\dazstudio.exe 

altering the path to your DAZ Studio executable as needed.  Save that code as a “start_ds.bat” and use that to launch DAZ Studio from now on and it’ll always start using all but one CPU.


If you only have 8 cores, you’d just drop the first affinity mask… If you have 24 cores, then lucky you, and you want to use all but 1 of them for DS, again it’d be FFFFFE for the affinity mask.

Hope that helps.

 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 29 May 2012 01:15 PM   [ Ignore ]   [ # 6 ]
Member
Avatar
Rank
Total Posts:  169
Joined  2003-10-09

Thx Adam. I am gonna try this. Seams reasonable since it doesn’t require to install some special software and only tweaks (messes?) with the system scheduler. I read something about this solution this afternoon on MSDN. I thought it was only available on SQL or IIS servers though.

Does your knowledge have a limit? LOL

 Signature 

Erdehel’s deviantart page

Profile
 
 
Posted: 29 May 2012 03:11 PM   [ Ignore ]   [ # 7 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14

Yeah, it does, but then I go ahead and try things anyway.  Sometimes it works.  Sometimes it doesn’t and I have to get a bigger hammer…


For those who aren’t following this… Basically what you do (in a more step by step fashion) is:

1) Create a new file, call it “start_ds.bat”.  Make sure you have viewing of file extensions enabled.  (Right click, new text document, “start_ds.bat” and answer yes when it asks you if you’re sure you wish to change the extension).
2) Find where DAZ Studio is installed.  Most likely: c:\program files\DAZ 3D\DAZStudio4\ if you’ve installed things with the default file locations.
3) Know how many CPU cores you have (look at the Task Manager and count!)
4) For every Four CPU cores you have determine how many you want to use.  E.g., You have 8, you want to use 6, You have 12, you want to use 11…
5) Use the chart above to determine each bit of the affinity mask.  E.g., to use 6 of 8, you want F and C, to use 11 of 12, you want FFE.
6) Right click on your new start_ds.bat file and select “edit”.
7) copy and paste the line below into the notepad window

c:\windows\system32\cmd.exe /c start /affinity <value5> <value2>\dazstudio.exe 

8) Replace the <value5> and <value2> entries with the appropriate answers as determined in steps 2 and 5.
9) Save and close the file.

Try it. smile

 

ETA:  For what it is worth…
Answer2: c:\program files\daz 3d\DAZStudio4
Answer3: 8
Answer4: 6
Answer5: FC

Result:

c:\windows\system32\cmd.exe /c start /affinity FC c:\program files\daz 3d\DAZStudio4\dazstudio.exe 

Answer2: e:\daz\studio4.64
Answer3: 12
Answer4: 11
Answer5: FFE

Result:

c:\windows\system32\cmd.exe /c start /affinity FFE e:\daz\studio4.64\dazstudio.exe 

 

 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 29 May 2012 11:11 PM   [ Ignore ]   [ # 8 ]
New Member
Avatar
Total Posts:  2
Joined  2010-12-31

Thanks all, some interesting stuff, but Erdehel hit it on the head, don’t really need to go into the bowels of the system. Going into Task Mgr. took care of it.
I appreciate everyone’s input. Thanks again.
Mike

Profile
 
 
Posted: 02 June 2012 04:27 AM   [ Ignore ]   [ # 9 ]
Power Member
Avatar
RankRankRank
Total Posts:  1287
Joined  2008-03-30
Kerya - 29 May 2012 05:08 AM

Would it work to make/run a batch file for low priority?
It works on my WindowsXP.

Creating a batch file to run a program at priority belownormal:
Go to the folder where your DAZStudio.exe resides.
Create a new text document with an Editor (txt) (not Word or something like that, that tends to add formatting).
Write:

start /belownormal DAZStudio.exe

save as DS4Low.txt
Rename to .bat (maybe you have to show file extensions first)
Answer with yes to the are you sure question.
Right click on the bat file to create a shortcut on your desktop.

Instead of using the DS icon on the desktop use the DS4Low icon to start DS.

For Poser it’s the same procedure with
start /belownormal Poser.exe
or
Poserpro.exe
or ...

thanks Kerya, going to make life easier this is, i tend to forget otherwise, till I start rendering wink

 Signature 

[Join the little green box collection party!]
Ianz Place
Daz 3D Documentation
Daz 3D on YouTube
Daz 3D Forum Archive

Profile
 
 
Posted: 11 September 2013 11:21 AM   [ Ignore ]   [ # 10 ]
New Member
Avatar
Total Posts:  1
Joined  2013-02-05

I had been searching for an answer online for days until I stumbled on this thread. 
Im not sure why, what, or how,  but since I started using the 4.6 beta things changed for me during renders.

Before I could set the renderer and leave it in the background while I surfed the net, watched streaming videos, muck around in after effects or photoshop as the frames were rendered….then nothing.  Id set the render and the computer basically lags out only responding to input during the few seconds after completing a frame render before moving to the next (i only render image series)

So after reading this thread I learned I could set affinity.  I have the 8 core black amd as well.  I set it to use only 6 cores and ho lee fuk,  not only could I use my computer again,  but the actual render time of each frame dropped nearly 40% (5 minutes a frame to 3)

Not sure if its something on my end,  or a bug in the 4.6 public beta,  but im back baby…chugging out the frames while listening to NFL network stream online,  doing postwork in AE and not lagging a bit.

thanks!!

Profile
 
 
Posted: 01 November 2013 03:17 AM   [ Ignore ]   [ # 11 ]
Member
Avatar
Rank
Total Posts:  103
Joined  2013-09-24

I’m trying to make this works, but no result, the bat can’t find the program

My Daz is installed in D:\DAZ 3D\DAZStudio4\
so I wrote this :

c:\windows\system32\cmd.exe /c start /affinity C D:\DAZ 3D\DAZStudio4\DAZStudio.exe

But no luck, I always got “Windows can’t find D:\DAZ”

Oh, just for confirmation, must I used affinity mask “C” or “3” for 4 Cores CPU and only want use 2, still pretty confusing for me

Thank you

 Signature 

My Deviantart : http://seumda.deviantart.com/

Profile
 
 
Posted: 01 November 2013 04:27 AM   [ Ignore ]   [ # 12 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2566
Joined  2007-12-07

At a guess it’s down to the file name in the path, put quotes around the full path:

c:\windows\system32\cmd.exe /c start /affinity C "D:\DAZ 3D\DAZStudio4\DAZStudio.exe" 
 Signature 

Some writings by a friend:
http://www.lizardsofthehost.co.uk/11.html
http://www.lizardsofthehost.co.uk/13.html
http://www.lizardsofthehost.co.uk/7.html

Profile
 
 
Posted: 18 November 2013 10:47 PM   [ Ignore ]   [ # 13 ]
Member
Avatar
Rank
Total Posts:  103
Joined  2013-09-24
SimonJM - 01 November 2013 04:27 AM

At a guess it’s down to the file name in the path, put quotes around the full path:

c:\windows\system32\cmd.exe /c start /affinity C "D:\DAZ 3D\DAZStudio4\DAZStudio.exe" 

Grrrr, I didn’t get email notif for the reply in this thread, sorry for the very late reply. I see, I’ll try that out, thank you Simon

 

 Signature 

My Deviantart : http://seumda.deviantart.com/

Profile
 
 
Posted: 04 May 2014 01:15 AM   [ Ignore ]   [ # 14 ]
Active Member
Avatar
RankRank
Total Posts:  267
Joined  2011-08-02

To make it works with windows 7, I had to do small changes:

ex for the ds beta with 6 of my 8 threads (i7):

C:\Windows\System32\cmd.exe /c START "DAZStudio.exe" /affinity 3F "C:\Program Files\DAZ 3D\DAZStudio4 Public Build\DAZStudio.exe" 

and to answer the first question you can do the same with /<priority> instead or in add to the /affinity

replace <priority> by the wanted one:

  Realtime
  High
  AboveNormal
  Normal
  BelowNormal
  Low

ex:

C:\Windows\System32\cmd.exe /c START "DAZStudio.exe" /AboveNormal "C:\Program Files\DAZ 3D\DAZStudio4 Public Build\DAZStudio.exe" 

but I prefer less threads to lower priority

 Signature 
Profile
 
 
Posted: 04 May 2014 03:45 PM   [ Ignore ]   [ # 15 ]
Active Member
RankRank
Total Posts:  551
Joined  2009-04-14

Thanks for the info on this topic. I was hoping that there would be some kind of setting within DS itself that would tell it how many cores to use, and it’s disappointing to discover that there isn’t. I have a fairly modest machine (Win7 64-bit, 8 GB RAM, i7 quad-core, nVidia 2 GB), and multi-tasking while DS is rendering is difficult bordering on forget about it, and rendering with Lux via Reality is even worse. Any chance of getting a throttle feature (letting the user choose how many cores DS can use at any one time) added to DS 5?

Profile
 
 
   
1 of 2
1