SV: [Verse-dev] Performance

Martin Schlingmann (tii) martin.schlingmann at tii.se
Wed Jun 8 10:47:55 CEST 2005


Hi.
If you do that, make sure you don't create new threads every time (very
very time and resource consuming) but rather use a thread-pool and a
semaphore for it.
Be aware that every thread in for example windows by default creates a
1mb stack and having too many threads will just consume time with
context switching and critical-section handling.


/martin


-----Ursprungligt meddelande-----
Från: verse-dev-bounces at projects.blender.org
[mailto:verse-dev-bounces at projects.blender.org] För Marcus Hoffmann
Skickat: den 8 juni 2005 09:45
Till: verse-dev at projects.blender.org
Ämne: AW: [Verse-dev] Performance

Hi,

if you are reworking the core code (especially the send mechanism),
could you think of doing it thread safe?

I talked about that to Emil last week. I wrote an approach for the
server, that will ask all connections parallel using a new thread for
every new connection. On the other side I do the sending with another
different thread. The problem is: Verse crashes when having at least 3
connections open.... if you could encapsulate the the callback_update
and send functions in a mutex (this would be the fastest and easiest
way) it would work I hope...

Why I'm trying this:
If the server can ask for the data using many simultaneous running
threads this will boost up performance once more. The only bottleneck in
communication between server and client would (in the end) be the
bandwidth of your network connection. We could connect as many users as
we want - the update speed of every user would (nearly) just depend on
how fast the Ethernet connection is. 
Maybe hard work to do but I think the advantages taken from it would be
worth it. Think of e.g. game servers - most of them handle their
connections with multiple threads, for each connection one thread. 

I'm always working on a small program that will open as much connections
as you want, just by adding a new one with a click. This is based on the
same technology. Opening one thread for one connection and starting to
ask verse for updates.

Maybe you could think about that...

Regards

Marcus


> -----Ursprüngliche Nachricht-----
> Von: verse-dev-bounces at projects.blender.org [mailto:verse-dev-
> bounces at projects.blender.org] Im Auftrag von Eskil Steenberg
> Gesendet: Dienstag, 7. Juni 2005 17:34
> An: verse-dev at projects.blender.org
> Betreff: [Verse-dev] Performance
> 
> Hi
> 
> Emil has been trying to compile Quel, so this week end i havent been
able
> to work on it, so i have done some other stuff like updating my CLUT
stuff
> with a new viewer (see:
http://www.quelsolaar.com/clut/technology.html).
> 
> One thing that have been bothering me for some time is that verse
> bandwidth, isnt realy what it should be. I have feared the moment when
we
> will get Blender, Maya, and Max plugs in to the hands of user who will
> undoubtley push large models over verse. For us developers it havent
realy
> matterd since most of us use very simeple test models. So i had some
ideas
> for what to improve and Brescht had shown me some issiues (thanks!).
So
> last night i re-wrote the verse send code (again) and today i made it
work
> (I think). And let me just say: Holy shit! Maybe its just me but i got
> some significant improvments using large models in Loq. So here is a
patch
> i want you to try, especially if you are working with large data sets
like
> bitmaps. Get back to me if it works or not and if you can see any
> difference in performance.
> 
> The patch is API and protocol compatible with the version in CVS.
> 
> Cheers
> 
> E
> 
> I will try be on #verse, but i have a phone conferance tonight.

_______________________________________________
Verse-dev mailing list
Verse-dev at projects.blender.org
http://projects.blender.org/mailman/listinfo/verse-dev



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.4 - Release Date: 2005-06-06





More information about the Verse-dev mailing list