The coupling of electron spin and nuclear spin through spin-exchange collisions compensates for external magnetic field interference in the spin-exchange relaxation-free (SERF) comagnetometer. However, the compensation ability for magnetic field interference along the detection axis is limited due to the presence of nuclear spin relaxation. This paper aims to enhance the self-compensation capability of the system by optimizing the pressure of the noble gas during cell filling. Models are established to describe the relationships between the nuclear spin polarization, the polarizing magnetic field of nuclei, the magnetic field suppression factors, and the pressure of the noble gas in the K-Rb-21Ne atomic ensemble. Experiments are conducted using five cells with different pressure. The results indicate that in the positive pressure area, the nuclear spin polarization decreases while the equivalent magnetic field experienced by the noble gas increases with increasing pressure. The magnetic field suppression factor for transverse fields increases as the pressure increases, leading to a decrease in the ability to suppress low-frequency magnetic field interference. Moreover, at the cell temperature of 180°C and a transverse residual field gradient of 4.012 nT/cm, the system exhibits its strongest capability to suppress transverse magnetic field interference when the pressure of 21Ne is around 0.7 atm.