A circular sector has fixed perimeter, but the central angle $\theta$ and radius $r$ are allowed to vary.

[asy]
unitsize(2 cm);

pair A, B, O;

A = (1,0);
B = dir(110);
O = (0,0);

draw(A--O--B);
draw(arc(O,1,0,110));

label("$r$", (O + A)/2, S);
label("$r$", (O + B)/2, SW);
label("$\theta$", (0.1,0.15));
[/asy]

Which central angle $\theta$ maximizes the area of the circular sector?  Give the answer in radians.

Note: The arc length of the sector is $r \theta,$ and the area of the sector is $\frac{r^2 \theta}{2}.$
Let $P = 2r + r \theta,$ the perimeter of the circular sector.  By AM-GM,
\[P = 2r + r \theta \ge 2 \sqrt{(2r)(r \theta)} = 2 \sqrt{2r^2 \theta}.\]Then $P^2 \ge 8r^2 \theta,$ so
\[\frac{r^2 \theta}{2} \le \frac{P^2}{16}.\]Equality occurs when $2r = r \theta,$ or $\theta = \boxed{2}.$