As an effective method for congestion control, Active Queue Management plays an important role in im-proving the Internet QoS. In this paper,we first analyze the properties of RED,then design an effective queue manage-ment algorithm based on gradient descent approach. With the application of this algorithm,routers in IP network ad-just its packet drop probability according to the queue length in the buffer. The main advantage of this algorithm isthat the queue length can keep stable at a low level in a varity of network environments. Simulations show that thisself-tuning queue management algorithm is efficient,stable and outperforms RED queue management algorithms sig-nificantly.