Expanding the magnetic flux in terms of the deviation from the magnetic axis, we have studied the MHD equilibrium and localized mode instability of an axial symmetric plasma torus with a small triangular and elliptical deformation on its cross-section. The optimization of the configuration has been analyzed and an optimal factor of the triangular deformation has been given. Our analysis shows that it is possible to strengthen ohmic heating substantially by selecting suitable factors of the triangular deformation.