AbstractA broad consensus of neutralizing the carbon dioxide emissions facilitates the transition to the renewable energy power system. Meanwhile, the concerns about the volatility of renewable energies are growing as the rotational inertia of power system becomes inadequate. To maintain the frequency stability of power system, some studies for configuring inertia energy storage systems (ESSs) are carried out, mainly focusing on the allocation of virtual inertia from grid‐forming ESS. In contrast, the allocation of virtual inertia from grid‐following ESS has not been well elaborated and the differences in virtual inertia provided by these two modes are yet to be revealed. Based on ‐norm and Kron reduction, firstly, the state‐space model of post‐disturbance system is established, together with the transient performance evaluation. Then the inertia characteristics of both grid‐forming and grid‐following devices are formulated, followed by the unified gradient descent optimization method for allocating virtual inertia. A modified IEEE 39‐bus system and its time‐domain simulations help in the verification of the contribution of this paper. Through the comparative analysis of corresponding optimal results, the conclusions from two aspects are drawn: in terms of transient frequency support, the grid‐forming devices can provide no less than better inertia support; with the higher power capacity and similar energy capacity, the grid‐forming devices can relieve the response pressure of other generators by approximately .