A systematic study to determine the effect of varying the compression ratio on the performance of a diesel engine is carried out. In this paper the various performance parameters have been studied at various compression ratios and optimum value of compression ratio has been found. At this value the engine performs at its best efficiency and lowest fuel consumption. The entire study was carried out using a simulation software Diesel RK version 4.1.3.143. In order to find out the optimum compression ratio the simulation was carried out at the compression ratios ranging from 17:1- 21:1. The performance parameters considered for the simulation are Indicated mean effective pressure (IMEP), [1] Indicated Efficiency, Brake mean effective pressure (BMEP), Braking efficiency, Specific fuel consumption (SFC) and Exhaust gas temperature. The graphs for these parameters against the engine speed at different compression ratios are plotted. The results shows that engine works best at compression ratio 18.5 for the above stated parameters.