In the aim to find the simplest and most efficient shape of a noise absorbing wall to dissipate the acoustical energy of a sound wave, we consider a frequency model described by the Helmholtz equation with a damping on the boundary. The well-posedness of the model is shown in a class of domains with d-set boundaries (N − 1 ≤ d < N ). We introduce a class of admissible Lipschitz boundaries, in which an optimal shape of the wall exists in the following sense: We prove the existence of a Radon measure on this shape, greater than or equal to the usual Lebesgue measure, for which the corresponding solution of the Helmholtz problem realizes the infimum of the acoustic energy defined with the Lebesgue measure on the boundary. If this Radon measure coincides with the Lebesgue measure, the corresponding solution realizes the minimum of the energy. For a fixed porous material, considered as an acoustic absorbent, we derive the damping parameters of its boundary from the corresponding time-dependent problem described by the damped wave equation (damping in volume).