The main aim of the work is to make an analysis and to optimize the size and location of a hole in a pressure vessel cylinder. Stress analysis of a pressure vessel near hole on the surface is performed. For analysis and optimization purpose, three thick-walled cylinders with different internal diameters and having same height and thickness are chosen. Further hole diameter is varied and positioned at the center of each cylinder for hole size optimization, also hole of particular size is placed at five different pressure vessels surface locations. It is found that with the increase in diameter of hole, Von Mises initially decreases and then becomes constant with the hole size.