A model for intergranular glassy film (IGF) at grain boundaries in Si3N4 is proposed. The model agrees well with experimental information available. Although it has periodicity, atomistic simulations using the model enable to elucidate the rationale for the presence of the IGF. Amorphous models obtained by molecular dynamics based on the crystalline model enable atomistic simulations to address further issues related the IGF: it is found that the IGF plays an important role to relieve the strain due to misorientation of adjacent Si3N4 grains, that equilibrium IGF thickness is determined by the balance between the strain relief and energy penalty of silicon oxynitride constituting the IGF, and that both O and N are needed in the IGF to provide flexibility of networking structure of the IGF as well as to minimize chemical mismatch between adjacent Si3N4 grains and the IGF. Equilibrium IGF composition is successfully estimated for the first time.