An example of a system for pacing through multiple electrodes in a ventricle includes a sensing circuit to sense cardiac signal(s), a pacing output circuit to deliver pacing pulses, a heart sound sensor to sense a heart sound signal, and a control circuit to control the delivery of the pacing pulses. The control circuit includes a heart sound detector to detect heart sounds using the heart sound signal, an electrical event detector to detect cardiac electrical events using the cardiac signal(s), a measurement module to measure an optimization parameter using the detected heart sounds, and an optimization module to approximately optimize one or more pacing parameters using the measured optimization parameter. The one or more pacing parameters include an electrode configuration parameter specifying one or more electrodes selected from the multiple electrodes in the ventricle for delivering ventricular pacing pulses to that ventricle.