This paper proposes a novel and optimal battery sizing procedure for the primary frequency control (PFC) of islanded microgrid (MG). The Battery Energy Storage System (BESS), Photovoltaic (PV) systems and LED Lighting Loads (LEDLLs) are coordinated to quickly intercept frequency deviation in the stage of PFC. The PVs decrease their power generation in the case of surplus of power generation. The LEDLLs decrease their power consumption in the case of power shortage. The BESS participates in PFC in both cases by injecting/absorbing power. Some batteries with overloading characteristics are capable of fast discharge/charge for a short period, which can be used to reduce the required battery size for PFC application. The conventional overloading characteristics is based on constant power discharge/charge, but the BESS power varies in response to frequency deviation. To overcome this problem, a modified overloading characteristic is presented based on variable power discharge/charge, which is used to propose a battery sizing algorithm. The Genetic Algorithm is used to optimally determine the frequency controllers' coefficients of the BESS, PVs and LEDLLs to minimize the required battery size while maintaining the MG frequency within safe operational limits. The proposed battery sizing procedure is evaluated on the CIGRE low voltage benchmark system using simulation in MATLAB/Simulink software. The results show that beside the overloading characteristics of the battery, the participation of PVs and LEDLLs in PFC also reduces the required battery size, because their participation reduces the share of BESS participation in PFC.