Threads rendering with single cpu???

I have an AMD Athlon64 3000+ CPU in my computer.
I have try to set threads on the render/output panel… I have set it to more than one. :slight_smile:
Now the render are faster a bit.
Why??? :-o

Your CPU is hyperthreaded, likely.

J.

Is your computer multithreaded? Say you have 2 threads on one core, with the thread count only one, it uses one thread only. Like 2 cores can use 4 threads and things like that.

I dont know. :slight_smile:

I’ve also noticed that setting the thread count to at least two speeds things up a bit.

btw…i’ve got an athlon xp 2800+ (single core).

you need 2 processors, or hyperthreading, or dual core to make the threading thing really work for you.

just running 2 or more threads on a single CPU shouldn’t be a problem. I just wonder why it is faster, as it has to switch between the two threads and shozuld be slower… Maybe there’s a slightly better ressource management…

Only Pentium 4 CPUs have Hyper Threading (and not even all of them).

You probably just cheat the OS scheduler a bit, i.e. it leaves less CPU cycles for other (background-) processes because you get less context switches to non-rendering threads.
Maybe try raising priority of the blender process instead…

(one reason why) It happens because when one thread is waiting for something from the ram/lower cache/hd, the other thread can continue rendering. The differences will vary from CPU to CPU because of the different ways they work around the base problem. They often do branch prediction, where as it’s waiting for the answer to an “if” kind of statement, it runs one of the answers, hoping it’s correct and it hasn’t wasted it’s time.

Software threading can’t really react to cache or RAM latency, it’s waaaaay to coarsly scheduled for that. For example the linux scheduler works with intervals between 10ms and 1ms (configurable to 100, 250 or 1000Hz), and main memory access is in the order of 100ns, that’s about 10000 times less even for a complete cache miss. And context switching doesn’t come for free either…
That’s exactly what Hyper Threading did, use CPU ressources for a second thread that were available due to Pipeline stalls in the first one. You don’t need a context switch because the CPU has registers for both threads, the OS just sees both threads executed simultaneously. But since the P4 is such a narrow CPU, the speedup was rather unimpressive…

I/O wait can be somewhat hidden by software threading, but you don’t need the HD during rendering, at least if you have enough RAM.

Ah makes sense. I’ve only studied threading at the cpu design level.

ETA - Could have sworn I’d written “or if you’re unlucky, the hd” rather than “hd”. Odd.