On Improving Open Transport Network Application PerformanceStrategies for Producing Fast Network Software
Experience has shown that sucessful implementation of high performance network software is enormously contingent on the right design decisions. Frequently detailed analysis of poor network application performance will reveal that throughput and connection latency shortcomings stem more from improper software design than any deficiencies in operating system or network stack implementation.However the factors that most affect network applications performance can be subtile, often resulting in the misuse of techniques as such lazy evaluation or multiple execution threads. This situatation can be further exarcerbated by the lack of performance oriented documentation and examples.
This has been especially evident on the Mac OS, where traditionaly server software has undeservingly earned a reputation for marginal performance. This is misnomer is unfortunate, since the Mac OS is very capable of providing the server developer with a low overhead execution environment. When an application is properly implemented the added burden of transcending memory spaces or OS execution bounderies can be avoided.
In an attempt to address this problem this Technote offers a number of techniques that a developer can leverage to produce high performance server software. These techniques are based on the following general design principles:
- Understand the evironment - Identify the bottlenecks.
- Avoid obvious waste. - ( unnecessary memory copies )
- Optimize for expected case - ( header prediction )
- Preallocate, Precompute ( static form of workahead ) whenever possible
- Use lazy evaluation for expensive operations or workahead for time-critical operations
- Consider replacing general purpose routines with more efficient specialized ones.
These principles are not limited to Mac OS OpenTransport, but should also prove useful on other OS architectures.
[Prev] p. 1 2 3 4 5 6 7 8 [Next]