An optimization study is carried out for a silencer consisting of two side-branch, rectangular cavities covered by membranes highly stretched in the direction of the duct axis. Stopband is defined as the range of frequency where the transmission loss is everywhere higher than the peak value of that in an expansion chamber which occupies three times as much cavity volume as does the present silencer. The logarithmic bandwidth is optimized with respect to the length-to-depth ratio of the cavity, the mass and the tension of the membrane. For two cavities each with a dimensionless volume of 5 (the duct height being the length scale), the optimal cavity aspect ratio is 6.6, and the lower stopband frequency is 0.09 times the first cut-on frequency of the rigid duct. This is compared favourably with the traditional duct lining modelled as an equivalent fluid. As the membrane mass increases, the stopband shifts to lower frequencies but it also narrows. The widest stopband is around 1.6 octaves for a massless membrane. The membrane tension plays a delicate role of setting the intervals between adjacent spectral peaks.