A pacing system and method for providing multiple chamber pacing of a patient's heart, and in particular, pacing programmed for treatment of various forms of heart failure. The system utilizes impedance sensing for determining optimum pacing parameters, e.g., for pacing the left ventricle so that left heart output is maximized. The impedance sensing also is used for determination of arrhythmias or progression of heart failure. Impedance sensing is provided for between selected pairs of the four chambers, to enable optimizing of information for control and diagnosis. In a preferred embodiment impedance measurements are obtained for determining the timing of right heart valve closure or right ventricular contractions, and the timing of delivery of left ventricular pace pulses is adjusted so as to optimally synchronize left ventricular pacing with the right ventricular contractions. Impedance sensing in the left heart also provides timing of mechanical contraction, and the pacemaker controls pacing to maintain bi-ventricular mechanical synchronization adjusted for maximum cardiac output.