In this study, we used a two-dimensional fluid model to investigate the argon discharge in Penning ion gauge (PIG) ion source influenced by magnetic field and the structure of ion source. Under fixed anode voltage U and pressure P, the relationships between the axial magnetic field, the structure parameter K, which is the ratio of the distance of two cathodes and the diameter of the anode tube, and the electron density are obtained. For fixed magnetic field B=0.01 T and pressure P=0.5 Torr, the electron density along the central axis has the maximal value when K=0.8. With fixed K=0.8 and P=1 Torr, the maximal electron density was found when B=0.1 T. Our results imply that there are optimal values for magnetic field and K which induce the maximal plasma density.