How to optimize Nucleus NET

Discussion created by dan_schiro on Aug 6, 2012

Nucleus NET contains various areas that can be tweaked to help  improve throughput.  Nucleus NET will send data at the priority of the  calling task and will receive data at the priority defined by  EV_PRIORITY and TM_PRIORITY in net_cfg.h.   Increasing these priorities  should provide the most improvement on systems with a large number of  tasks.  It is important to keep EV_PRIORITY and TM_PRIORITY at the same  level relative to each other.  It is also important that no task using  NET API's be set at a higher priority at than the afore mentioned  defines.

Chapter 16 - Optimizing Nucleus NET of the Nucleus NET Reference  Manual discusses other areas that can be tweaked to improve  performance.  Two of the optimizations mentioned in this chapter, The  NU_Block_Copy, and Checksum optimizations can be found in TechNotes  MG44758 and MG44810 respectively.

Please note that the TCP_Resource locking semaphore is a commonly  misunderstood design feature of NET that is thought to cause  bottlenecks.  The locking semaphore is crucial to protecting internal  NET data structures to allow multiple users.  Every effort has been made  to ensure the semaphore is held only during global data structure  access to protect the integrity of global variables and ensure the  integrity of the stack.  This design feature should provide little if  any performance degradation and should not be tampered with in any way.