POV-Ray : Newsgroups : povray.windows : WinXP & intel P4 only 50% used : Re: WinXP & intel P4 only 50% used Server Time
26 Jun 2024 03:02:58 EDT (-0400)
  Re: WinXP & intel P4 only 50% used  
From: Mienai
Date: 1 Feb 2005 04:45:00
Message: <web.41ff4eb9d47b0c5bc4fb1c850@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> regdo <reg### [at] wanadoofr> wrote:
> > Do you mean there is no way for POV to use the whole power of the processor
> > and we have to wait twice the time we should ? Rats !
>
>   Didn't you read what he said?
>
>   P4 is just one processor, not two, and POV-Ray is using (almost) 100% of
> its power.
>   You will not get basically any advantage by rendering in two threads
> because the two threads will mostly be interleaved by the CPU, not run
> in parallel.
>   That is, in other words: Even if you run two instances of POV-Ray,
> each one rendering half of the image, the total rendering time will
> not speed up considerable. One instance is already using the maximum
> capacity of the CPU.
>
>   Now, P4 has this funny thing called hyperthreading which makes the
> processor look like two and can, with some tricks, be used to speed up
> a program (almost as if it was run by two true processors). The trick
> is to create two threads and run eg. integer math in one (calculated
> by the ALU) and floating point math (calculated by the FPU) or MMX math
> (calculated by the MMX processor) in the other.
>   However, POV-Ray can hardly use this trick even if it wanted to because
> most of what it does is floating point math, and there's only one FPU to
> do it. And POV-Ray *is* running through the FPU at full power.
>
>   Windows makes it look like it is only using 50% of CPU because P4 is
> emulating two CPUs and Windows makes a simple (but basically wrong)
> calculation about how much of the two (virtual) processors POV-Ray is
> using. POV-Ray cannot use the "other processor" because there's no
> other processor. It's just a kind of "virtual" processor (which another
> process not needing the FPU could perhaps use).
>
>   So no, if the POV-Ray benchmark is being finished in 30 minutes in
> your P4, there's no way it can finish in 15 minutes no matter what you
> do. That's not what the "two processors" mean.
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -

That's not quite completely correct.  A P4 with hyperthreading is a single
physical processor but two logical processors.  Logical and virtual are not
to be confused.  Long story short while it's true the two logical
processors do share some of their physical resources so it's not true SMP,
it's fairly close in most aspects due to the way the pipeline is designed.
It's more than emulation.  Overall it's a more efficient processor
(assuming you have software that can utilize it).  So when windows is
reporting that it's only using 50% of it resources that's mostly true and
also why you can run other programs without lagging them or POV (POV keeps
utilizing it's full logical processor while the other programs use
resources from the other).

Actual benchmarks have shown that if you run 2 instances of POVRay on a
hyperthreading machine (one instance on each logical processor, each
rendering half your image) you will have the completed image in around half
the time (assuming the two halfs take about the same time to render).

Try SMPov (I use it with my render farms and it works pretty good), it's
fairly easy to set up and run.  The one downside to this sort of thing is
when you're doing radiosity you can get seams where the images were put
together and with photons I'd suggest saving a photon map and loading it to
save on preprocessing time.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.