In this paper, an algorithm for simulation based parameter optimisation over discrete sets using the basic Simultaneous Perturbation Stochastic Algorithm (SPSA) has been developed. The objective function to be minimised is itself the long run average of certain objective functions whose noise estimates are obtained via simulation. Arrivals follow a Markov Modulated Poisson Process (MMPP) while the service times are generated exponentially. Application of this algorithm for the Dynamic Allocation of Servers has been studied and its authenticity has been checked for varying parameter values. Certain modifications have been introduced for the specified case for speedy convergence of results and study of the sensitivity of the algorithm with respect to its parameters and step-size. The results have been presented and verified to fall along the expected line.