Visibroker 5.2.1 callbacks optimization - Object
This is a discussion on Visibroker 5.2.1 callbacks optimization - Object ; Hi
I have a fairly simple Corba server application
that receives the data in a form of a callback
and republishes that data further.
The callback should consume incoming data as soon as possible.
Visibroker allocates thread for every callback.
...
-
Visibroker 5.2.1 callbacks optimization
Hi
I have a fairly simple Corba server application
that receives the data in a form of a callback
and republishes that data further.
The callback should consume incoming data as soon as possible.
Visibroker allocates thread for every callback.
There are around 300 callback Corba objects and Visibroker
runs multiple threads on every object.
I have configured the Visibroker to have a thread pool with 1000 threads.
The code looks something like this:
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(obj);
PortableServer::POAManager_var poa_mgr = rootPOA->the_POAManager();
vector< MyCallback* > myCallback_vec;
for( int i = 0; i < symbols.size(); ++i)
{
myCallback* p_c = new MyCallback;
rootPOA->activate_object( p_c);
myCallback_vec.push_back( p_c);
}
poa_mgr->activate();
// logic for callback subscriptions
orb->run();
I would very much appreciate advice on how to make this faster.
What can I do to have callbacks cosume data faster?
Perhaps, create additional POA's or something else?
Regards,
Ivo
-
Re: Visibroker 5.2.1 callbacks optimization
ivandric@yahoo.co.uk wrote in message news:<5a3f642c.0409140628.30dee9c1@posting.google.com>...
> Hi
>
> I have a fairly simple Corba server application
> that receives the data in a form of a callback
> and republishes that data further.
> The callback should consume incoming data as soon as possible.
> Visibroker allocates thread for every callback.
>
> There are around 300 callback Corba objects and Visibroker
> runs multiple threads on every object.
> I have configured the Visibroker to have a thread pool with 1000 threads.
>
> The code looks something like this:
>
> CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
> CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
> PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(obj);
> PortableServer::POAManager_var poa_mgr = rootPOA->the_POAManager();
>
> vector< MyCallback* > myCallback_vec;
> for( int i = 0; i < symbols.size(); ++i)
> {
> myCallback* p_c = new MyCallback;
> rootPOA->activate_object( p_c);
> myCallback_vec.push_back( p_c);
> }
>
> poa_mgr->activate();
>
> // logic for callback subscriptions
>
> orb->run();
>
> I would very much appreciate advice on how to make this faster.
> What can I do to have callbacks cosume data faster?
> Perhaps, create additional POA's or something else?
>
Setting thread max to 1000 is too high and likely harmful for
performance. Unless the servant operation has high blocking rate (for
instance, operation blocks on remote call to a database, etc. 80% of
the time), large number of concurrent, CPU consumed tasks will only
degrade the performance by unnecessary high rate of context switch.
Therefore, if your servant operation's implementation is non-blocking
and cpu consumed, I would suggest setting thread pool size not too
much higher than the number of available CPU on the host.
The second suggestion is to use a notification service for this kind
of subscribe/publish architecture. A decent notification service (e.g.
Borland VisiNotify) should support typed event and also should have
much better performance (e.g. throughput is 3 to 10 times faster) than
homegrown solutions.
Regards,
Ke
> Regards,
> Ivo
Similar Threads
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 12-08-2007, 01:06 AM
-
By Application Development in forum Fortran
Replies: 3
Last Post: 07-06-2007, 03:14 AM
-
By Application Development in forum Perl
Replies: 2
Last Post: 03-06-2007, 02:49 AM
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 10-25-2005, 05:36 PM
-
By Application Development in forum Java
Replies: 1
Last Post: 09-13-2004, 10:25 PM