|
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.
|