  We study the thermodynamics of maximally supersymmetric U(N) Yang-Mills
theory on $\mathds{R}\times S^2$ at large $N$. The model arises as a consistent
truncation of ${\cal N}=4$ super Yang-Mills on $\mathds{R}\times S^3$ and as
the continuum limit of the plane-wave matrix model expanded around the $N$
spherical membrane vacuum. The theory has an infinite number of classical BPS
vacua, labeled by a set of monopole numbers, described by dual supergravity
solutions. We first derive the Lagrangian and its supersymmetry transformations
as a deformation of the usual dimensional reduction of ${\cal N}=1$ gauge
theory in ten dimensions. Then we compute the partition function in the zero 't
Hooft coupling limit in different monopole backgrounds and with chemical
potentials for the $R$-charges. In the trivial vacuum we observe a first-order
Hagedorn transition separating a phase in which the Polyakov loop has vanishing
expectation value from a regime in which this order parameter is non-zero, in
analogy with the four-dimensional case. The picture changes in the monopole
vacua due to the structure of the fermionic effective action. Depending on the
regularization procedure used in the path integral, we obtain two completely
different behaviors, triggered by the absence or the appearance of a
Chern-Simons term. In the first case we still observe a first-order phase
transition, with Hagedorn temperature depending on the monopole charges. In the
latter the large $N$ behavior is obtained by solving a unitary multi-matrix
model with a peculiar logarithmic potential, the system does not present a
phase transition and it always appears in a ``deconfined'' phase.
