Local entropy generation is derived from the second law of thermodynamics, which can directly identify the source of irreversible dissipation and learn more about the physical mechanism of performance degradation. Zwart cavitation model is modified to clarify the rapid head drop of a cavitation flow within a test centrifugal pump, and it is used to simulate the cavitation flow. Local entropy generation method is used to analyze the cavitation flow with varying net positive suction head. The magnitude of entropy generation in different types and regions is compared. Spatial distribution of turbulent and near-wall entropy generation are analyzed. Results show that the modified Zwart cavitation model can better capture the cavity morphology and its evolution. Turbulent and near-wall entropy generations, which mainly concentrate on the impeller, have a large proportion of total entropy generation. The rapid increase in fluctuating velocity entropy generation near the impeller blade pressure side and near-wall entropy generation near the trailing edge of the impeller blade are the main reasons for the rapid head drop within a test centrifugal pump. The sources of turbulent and near-wall entropy generation are vortex and shear stress, respectively.