/me blushes

We really need a list FAQ, some questions just keep re-appearing (like
pingboost explanations and multithreading).

The theory behind parallel processing is that you can do two independent
things at the same time. Things like searching for large prime numbers
parallelise really well because each number in the search space is
independent of every other number.

Some things parallelise with some benefit but not a linear performance
increase. Think of a chess game. Each node in the search tree is
independent, but lots of nodes represent the same board position and so
you benefit from communications between the parallel processes. Adding
"n" new processes to the search won't increase the performance by "n"
because some positions will be calculated twice. You can improve this by
sharing a global cache of positions, but then you are at the mercy of
communication latencies between the nodes, which can be a long time in
CPU time.

Then there is a final class of programs that are entirely serial. Think
of rendering a picture onto your screen. For a classical Z-buffered
display you need to start at the back and work forward. You cannot have
multiple CPU's rendering different parts of the image because they are
all interdependent.


Now, to HLDS itself. The CLIENT can benefit from multi-threading the
graphics/sound/logic components because they are all reasonably
independent of each other (within the timeframes relevant to a CPU). For
a server however you ONLY run the logic code. The logic code takes the
input from the clients and then performs the required operations on them
(based on input and game logic). Now, every entity is very
inter-dependent of every other entity (as they all influence each
other). Due to the amount of communication required between the various
entities multi-threading would have little or no benefit.





Eric (Deacon) wrote:

>>HLDS will *NOT* benefit
>>much at *all* from SMP, even if it were rewritten from scratch with
>>threading in mind
>
>I would tend to disagree. If you rewrite it from scratch, why
>shouldn't you be able to benefit from concurrent execution?


You know who explained it best?  Alfred.  He gave an amazing
explanation, one that I understood but could not reproduce.  And looking
through my own archives, it looks like I've lost it :\

--
Eric (the Deacon remix)

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to