A bi-level pressure support system (30) and method of treating disordered breathingthat optimizes the pressure delivered to the patient during inspiration andexpiration to treat the disordered breathing while minimizing the deliveredpressure for patient comfort. The pressure generating system (32) generatesa flow of breathing gas at an inspiratory positive airway pressure (IPAP) duringinspiration and at an expiratory positive airway pressure (EPAP) during expirations.A controller (50)monitors at least one of the following conditions: (1) snoring,(2) apneas, (3) hypopneas, or (4) a big leak in the pressure support system andadjusts the IPAP and the EPAP independently based on the occurrence of any oneof these conditions.