POV-Ray : Newsgroups : povray.beta-test : POV-Ray v3.7.beta.6 available : Re: POV-Ray v3.7.beta.6 available Server Time
29 Jul 2024 02:23:56 EDT (-0400)
  Re: POV-Ray v3.7.beta.6 available  
From: Warp
Date: 14 Jun 2005 14:45:14
Message: <42af25ba@news.povray.org>
Chris Cason <nos### [at] deletethispovrayorg> wrote:
> JYR wrote:
> > I'll take care of that! I have a plain AMD Athlon XP 2800+... no multi-cores
> > or multi-CPU here :(

> Note that even in this case, the code will default to running with two threads.

  I'm wondering if it makes any difference in practice.

  One could think, of course, that continually switching between two
threads causes overhead. However, one has to remember that the OS will
be "switching between threads" all the time regardless. If there's only
one cpu-intensive task then it will be "switching" to that continually
(process management will be done regardless of how many cpu-intensive
processes there are running). Thread-switching is a quite light operation
and doesn't take almost any cpu time at all.
  If there are two cpu-intensive threads the OS will naturally continually
switch between the two (at regular intervals), but it will not do any
considerable amount of extra work for this.

  One thing where there might be a difference between "switching" one
single thread and truely switching between two different threads is that
if one of the threads is running a tight loop which takes very long to
execute, the loop code will be flushed from the pipelines each time
the other thread gets cpu time.
  However, from the point of view of povray task switching happens very
rarely. I don't know how often Windows performs task switching, but even
if it does so eg. 200 times per second, that's an eternity from the point
of view of the program (especially in current multi-gigahertz processors)
and probably no loop will last that long anyways.

  One place where running in two threads might actually be beneficial
even with one processor is when rendering to a file: While one thread
is writing to the file the other can keep rendering, thus 100% of the
cpu time is used.
  However, since povray writes to the file very rarely, this probably
would speed up the whole rendering process only fractions of a percent.

-- 
                                                          - Warp


Post a reply to this message

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