A bstract We investigate the dynamics of four-dimensional N=2\mathcal{N}=2 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> mml:miN</mml:mi> mml:mo=</mml:mo> mml:mn2</mml:mn> </mml:math> SU(2) super Yang-Mills theory on an AdS background. We propose that the boundary conditions that preserve the AdS super-isometries are determined by maximizing the real part of the AdS partition function F AdS = −log Z AdS . At weak coupling Λ L ≪ 1 the maximization singles out the Dirichlet bo