A compact P-band coaxial relativistic backward wave oscillator (BWO) with only three periods slow wave structure (SWS) is investigated both theoretically and numerically. The characteristics of the coaxial SWS are analyzed when the SWS is changed from the structure with only outer conductor ripple to the structure with both inner and outer conductor ripples. It is found that the existence of the inner conductor ripple can reduce the period length of coaxial SWS to maintain the same operating frequency of the BWO and can largely increase the temporal growth rate and the spatial growth rate of the device. Then, the effects of SWS period numbers on the generation of the microwave in the P-band relativistic BWO are studied by PIC simulations. The results show that three periods SWS cannot only make the device more compact but also has a wide region of single-frequency operation and relatively large efficiency and output power in a wide range of the diode voltage. Typical simulation results show that, with a 585 kV and 7.85 kA electron beam guided by a 0.8 T solenoidal field, the microwave of 1.65 GW is generated at the frequency of 900 MHz, and the interaction efficiency is about 36%. Compared with the conventional P-band coaxial relativistic BWO with five periods SWS, the axial length of the SWS is reduced by about one half, which is only 38.4 cm, and the saturation time of the microwave signal is reduced by about 10 ns.