In this study MHD flow around and through porous cylinder is numerically investigated. The governing equations are developed in polar coordinate arrangement in both porous and non-porous media on the basis of single-domain technique. The equations are solved numerically based on finite volume method over staggered grid structure. Nusselt number and drag coefficient are selected as two key parameters describing performance of this system. By applying response surface methodology the sensitivity of these parameters to main factors of the problem, including Stuart number, Darcy number and Reynolds number are quantified. RSM is also utilized to perform an optimization process to find the best condition in which the lowest drag force and highest heat transfer rate occur simultaneously. The CFD analysis is carried out for variant Reynolds numbers (10 ≤ Re ≤ 40), Darcy numbers (10-6 ≤ Da ≤ 10-2) and Stuart numbers (2 ≤ N ≤ 10). Streamlines and isotherms are presented to indicate the impacts of such parameters on heat and fluid flow. It can be seen that, Drag coefficient and Nusselt number increase by augmenting magnetic field strength. Beside, Darcy number and Reynolds numbers have a direct and inverse effect on Nuave and Cd, respectively. Results of optimization process show that Nuave and Cd are more sensitive to Reynolds and Stuart numbers, respectively, while they less sensitive to Darcy number. Moreover, it is revealed that the optimum condition occurs at Da = 10-2, Re = 38.1 and N = 4.49.