Steve HustonRiverace Corporation
Steve's Networked Programming Newsletter
Making Nets Work
February 2010
Happy 2010! ACE is back in the spotlight this month for a couple of reasons you may be interested in.

First, I'm completing some performance improvements for ACE_Dev_Poll_Reactor on behalf of a long-time customer. How this came to be is illustrative.

Second, Riverace put a new set of ACE support service plans in place for 2010. I'll explain more below, but the short story is we're "kickin' it up a notch."

As always, be sure to forward this note to other people you work with to be sure they know what's happening in the world of networked application development.

In This Issue
Improving ACE_Dev_Poll_Reactor Performance
New, Improved ACE Professional Support Services
Did Your Last Project Run Late? Want to Prevent That?
Improving ACE_Dev_Poll_Reactor Performance: Why? How?

A few weeks ago I got a call from a long-time customer who runs a performance-intensive system based on ACE that relies on high-volume data routing and processing. As demands on the system have grown it has scaled up nicely. However, they recently began to notice a performance limit they believed to be related to ACE_TP_Reactor. This customer wanted me to investigate this issue and help to resolve it.

After studying source code together, I suspected that ACE_TP_Reactor had some fairness issues. Under load with many network connections, ACE_TP_Reactor didn't always service all connections evenly; some got more attention, while others starved. I wrote a test program to verify this suspicion and it was confirmed.

After working to improve the fairness I came to the conclusion that really resolving this issue would probably involve some significant design changes to ACE_TP_Reactor. So I huddled with the customer's team to discuss the best way to resolve the performance problem. This particular system runs on Linux, so we discussed the possibility of using ACE_Dev_Poll_Reactor instead; the concurrency characteristics of the two reactor implementations are the same starting at ACE 5.7, so switching would not involve a programming change in the current event handler design. The questions were then 1) Is ACE_Dev_Poll_Reactor more fair to network connections than ACE_TP_Reactor, and 2) How to resolve a known performance issue with ACE_Dev_Poll_Reactor?

Hooking ACE_Dev_Poll_Reactor up to my new fairness test answered the first question quickly: ACE_Dev_Poll_Reactor showed excellent fairness under load. The performance, however, was a problem. I did some initial work to reduce the number of times the reactor token needed to be acquired while processing notifications. That improved the situation some, but not sufficiently. I then designed more changes to reduce thread thrashing on the reactor token, which is the root cause of the performance problems. You can read more of the technical details in a related blog article. The benefits to my customer will be that 1) their system's performance will increase noticeably, and 2) they'll be certain that the ACE changes really solve their performance issues because I worked with them to verify the results along the way. The rest of the ACE community will also benefit from the improved performance.
New, Improved ACE Professional Support Services

Riverace introduced an improved suite of ACE Professional Support services in January. The new services are designed to improve service by:
  • Lengthening the support horizon for ACE releases from 1 year to 5 years
  • Ensuring that in-demand computing platforms are maintained and developed in a more equitable fashion
  • Allowing Riverace to focus intently on providing improved service levels for customers who rely on Riverace for supporting applications in the field as well as for those developing new, leading-edge systems.
The previous 3-tier (Stream, River, Whitewater) by 2-level (Group, per-developer) service offering is replaced by a 2-tier (Development, Enterprise) arrangement that's delivered by platform rather than by group size. For complete details on the new service offerings, please see
Do You Need Help Designing Your Next System?
Nobody has to tell you that designing a well-formed, efficient, maintainable networked application is hard. You've had to deal with it. The problem is that networking functionality is usually in a supporting role to your system's main purposes, and your skills and experience are much better used to focus on specific business and technology issues. It may make more sense to bring in seasoned expertise to help design a solid networking base in your next system.

I've helped many companies get great networked applications built - I may be able to help you as well. Let's talk and see if I can help take care of the networking, and let you focus on applying your expertise and experience to the business features that'll really help your system stand out.

Call me at 508-541-9180 or email me at [email protected].
If you have any ideas for areas of networked programming you'd like to hear about in future issues, please email me with your suggestions. In the meantime, keep those nets working!

Steve Huston
Riverace Corporation
Join Our Mailing List