[ace-users] Reactor/SysV MQ design question
Andrew Roark
andrewjroark at yahoo.com
Sun Sep 2 12:27:40 CDT 2007
Hello,
ACE version: 5.3.1
Platform: Linux 64-bit (deployed to 4 CPU machines)
I've completed a nifty application using ACE and although it works ok, some performance issues lead me to think I've made some design errors.
The application is an event driven publisher/broadcaster. It is designed something like this (excuse the ASCII art):
SysV MQ message from external App
--> [ MyApp ]
--> Client 1
--> Client 2
...
--> Client n
Most of the time there will be 1, 2 or 3 listeners.
Within "MyApp" I'm using a reactor in one thread and a MQ receiver in
another thread. The MQ thread notifies the socket (reactor) thread via threadsafe queues of
lightweight (enum) command messages.
Something like:
[MyApp]
MQReceiverThread --> (received MQ msg)
--> ReactorThread --> (builds network msg)
--> publishes to listeners in a round-robin fashion
The problem: in practice I'm seeing some significant performance
glitches. Like, sometimes one thread will dominate over another; other
times the publishing takes significantly longer than it should. Given enough volume and time, the swap daemons go to 99% across all CPUs, impacting the performance of all applications on the machine. [ACE 5.3, Linux 64-bit]
I have a number of questions, but, to start somewhere, can I put the MQ
receiving logic into the reactor somehow, instead of in a separate
thread?
Thanks for your guidance :)
Andrew
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
More information about the Ace-users
mailing list