The in-duct ultraviolet germicidal irradiation system (ID-UVs) with ribs has been revealed to be effective in reducing the risk of biological contamination, and optimization of its UV radiation distribution is expected to further improve the inactivation performance. In this study, the Critical Survival Fraction Probability (CSFP) and Maximal Bearable UVC Dose (MBUD) methods were synergistically employed as evaluation indicators, and Computational Fluid Dynamics (CFD) was used to optimize the lamp array, duct shape, liner reflectivity and number of UV lamps. Results indicated that the optimal lamp array was positioned at 0° to the airflow direction, and square-section ducts were preferred over circular-section ducts. Ribs obstructed the transmission of specular reflected radiation, while diffuse reflection helps to overcome the obstruction. Reducing the number of lamps alone from four to one increased the volume-averaged irradiance by 14.4–25.3 % in the main irradiated region. For renovation projects, ID-UVs equipped with one lamp and galvanized steel ribs proved optimal, exhibiting increased inactivation efficiencies of 39.7 % (CSFP) and 239.4 % (MBUD) against highly UVC-susceptible MS2 Bacteriophage (K = 0.038 J/m2), and up to 341.1 % (MBUD) against low UVC-susceptible MS2 Bacteriophage (K = 0.028 J/m2) compared to the ID-UVs without ribs and featuring four lamps. Moreover, in comparison to conventional conditions that provide equivalent air-cleaning levels, the optimal ID-UVs allowed for a 60–70 % increase in air handling capacity while achieving at least an 83.6 % reduction in annual energy costs. These findings contribute towards advancing practical applications of ID-UVs with ribbed duct walls.