A network system for actively controlling congestion to optimize
throughput is provided. The network system includes a sending host which
is configured to send packet traffic at a set rate. The network system
also includes a sending switch for receiving the packet traffic. The
sending switch includes an input buffer for receiving the packet traffic
at the set rate where the input buffer is actively monitored to ascertain
a capacity level. The sending switch also includes code for setting a
probability factor that is correlated to the capacity level where the
probability factor increases as the capacity level increases and
decreases as the capacity level decreases. The sending switch also has
code for randomly generating a value where the value is indicative of
whether packets being sent by the sending switch are to be marked with a
congestion indicator. The sending switch also includes transmit code that
forwards the packet traffic out of the sending switch where the packet
traffic includes one of marked packets and unmarked packets. The network
system also has a receiving end which is the recipient of the packet
traffic and also generates acknowledgment packets back to the sending
host where the acknowledgment packets are marked with the congestion
indicator when receiving marked packets and are not marked with the
congestion indicator when receiving unmarked packets. In another example,
the sending host is configured to monitor the acknowledgment packets and
to adjust the set rate based on whether the acknowledgment packets are
marked with the congestion indicator. In a further example, the set rate
is decreased every time one of the marked packets is detected and
increased when no marked packets are detected per round trip time (PRTT).