The flow and design of fuel injector nozzles have a considerable influence on the spray and combustion characteristics of a diesel engine. In-cylinder combustion, atomization, and primary breakdown are all highly influenced by the cavitation and turbulence in the fuel injector nozzle. In this paper, the effect of the nozzle geometry parameters, wall roughness parameters, and pressure difference on the swirl number, mass flow rate, turbulent kinetic energy, and vapor volume fraction is explored. U-type nozzle hole geometry, a well-known benchmark for the injector nozzle flow, is used to evaluate mesh independence and model validation. Large-eddy simulations are performed to provide a precise presentation of the flow structures and turbulent eddies inside the nozzle. Multiphase flow is studied using the mixture model, whereas cavitation is studied using the Schnerr–Sauer model based on the Rayleigh–Plesset equation. We find that the wall roughness parameters have an exciting impact on the discharge coefficient, swirl number, and vapor volume fraction. Due to the non-monotonic dependence of nozzle flow characteristics on the pressure difference and the wall roughness parameters, we can always find such values of these input parameters that render optimal nozzle flow characteristics. In this way, these parameters provide good control of spray formation and consequently on the quality and rate of combustion in the diesel engine.