Crankshaft in truck mounted petroleum compressor is constrained by space concerns, design is difficult. In this paper, primary structure design parameters are extracted from the crankshaft design process, and crankshaft stress distribution is calculated under ANSYS, providing a reference for compressor optimization. It is useful to guide the design.