  Block Krylov subspace methods (KSMs) comprise building blocks in many
state-of-the-art solvers for large-scale matrix equations as they arise, e.g.,
from the discretization of partial differential equations. While extended and
rational block Krylov subspace methods provide a major reduction in iteration
counts over polynomial block KSMs, they also require reliable solvers for the
coefficient matrices, and these solvers are often iterative methods themselves.
It is not hard to devise scenarios in which the available memory, and
consequently the dimension of the Krylov subspace, is limited. In such
scenarios for linear systems and eigenvalue problems, restarting is a well
explored technique for mitigating memory constraints. In this work, such
restarting techniques are applied to polynomial KSMs for matrix equations with
a compression step to control the growing rank of the residual. An error
analysis is also performed, leading to heuristics for dynamically adjusting the
basis size in each restart cycle. A panel of numerical experiments demonstrates
the effectiveness of the new method with respect to extended block KSMs.
