In this paper we aimed to determine the gap distance between a horn and an aluminum part that ensures the highest cavitation erosion rate in a homogeneous delaminated area and provides the minimum energy consumption. For this purpose, a sonotrode device, which is capable of generating cavitation bubbles in the laboratory and enabling the evaluation of the cavitation resistance of parts with different parameters, was used in experiments. An optical microscope was used to visualize the surface delamination area where the cavitation erosion occurs, and a high-precision scale was used for measuring the total mass loss due to the cavitation erosion for each test. A high-speed camera was used to visualize the shape and behavior of the flow characteristics below the sonotrode. From the experimental results it is clear that the delamination area decreased with the increasing gap distance due to the impact region of bubble structures on the part surface. The gap distance clearly had a great effect on the cavitation erosion rate that must be determined while considering the energy consumption, test time and maximum homogeneous delaminated area in a specific cavitation test. The optimum distance was obtained as 3.5 mm, by considering the maximum cavitation erosion rate and using minimum power.