Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-06-2008
spsoni's Avatar
spsoni spsoni is offline
Registered User
 
Name: Sury P Soni
Organization: Next Digital
Project: Unified Messaging Plattform for Inhouse Products
 
Join Date: Mar 2008
Location: Melbourne, Australia
Posts: 31
Competition for server thread for sync and async invocation

Hi there,

I am experimenting on basic performance for message passing.

I have implemented a queueing framework, where ice server receives messages from clients and forwards to workers.

Clients use put (AMI and AMD) operation to put messages onto the server to be forwarded to any workers.

Workers invoke get (synchronous invocation) operation on server to get first in message.

I am using multiple threads for clients(10) and workers(10) to make it look close to real world scenarios. I am also using server thread pool (50).

Now my problem is, clients put_async invocation consume all my server threads very quickly and very few get invocation gets processed while put_async finishes. So, if I am sending 100,000 messages of 1024 bytes untill clients finishes their send, workers are deprived of server threads. Once clients finish, workers get all the messages very quickly.

And my question is, can we reserve few server threads dedicated for sync method invocation and rest for async if invoked.

I hope, i defined my problem precisely.

I am using Freebsd OS for client/worker/ice server. Language used is C++ for server and client/worker in python.

Please advice.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 03-06-2008
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,541
Hi,

Your server could create 2 object adapters with their own dedicated thread pool. This way, requests from workers would be dispatched with threads from one thread pool and requests from clients would be dispatched with threads from another thread pool (see the documentation for the adapter ThreadPool properties for more information on how to configure a dedicated thread pool for an object adapter).

That being said, if your server is just a queuing system, why does it need 50 threads? Do these threads perform IO operations which might block, wait to acquire some resources or perform Ice synchronous invocations? If your server only performs operations that can't block, few threads should be enough (e.g.: 1 thread per processor).

Cheers,
Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Async Subscriber sly596 Help Center 6 03-04-2008 08:01 AM
ICE Server Thread Pool Implementation Issues simondu Help Center 3 10-25-2007 11:52 PM
IcePatch2-Server - how can I kill it from a different thread? Ewgenijkkg Help Center 2 05-11-2007 03:54 AM
Thread dump when Java server is stopped by IceGrid mefoster Bug Reports 1 01-29-2007 06:04 PM
Server-Initiated Async acbell Help Center 7 02-28-2005 05:46 PM


All times are GMT -4. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.