The mechanism for the relaxation of the cosmological constant is studied and elaborated. In the model used for the analysis of the relaxation mechanism the universe contains two components: a cosmological constant of an arbitrary size and sign and a component with an inhomogeneous equation of state. Owing to the dynamics of the second component the universe asymptotically tends to a de Sitter phase of expansion characterized by a small effective positive cosmological constant. An analysis of the asymptotic expansion for a general inhomogeneous equation of state of the second component is made. Several concrete examples are presented and the stability and speed of convergence to their fixed points are analyzed. It is found that the speed of convergence to a fixed point is large whenever the absolute value of the cosmological constant is large.