Understanding VPS Memory

We’ve been really trying to get a handle on some memory issues on our VPS.
Made some progress, but there is something I don’t understand related to the free command.

So, running free -m, under total I’ll see 5690. Which is how much we have allocated and pay for.
However, periodically that number changes, for example right now I see 7112 and I’ve even seen higher.
The number seems to jump after the server runs out of memory and does a restart, but I’m not 100% sure.

So why would that number increase - especially if we aren’t paying for extra RAM? Or does Dreamhost just compensate if we are under allocated and adjust the bills accordingly?

Thanks in advance for any information.
-mrP

Historically, DreamHost have charged for reserved RAM and CPU. If a process requires extra memory or cycles and the system has free resources available then spare resources may be allocated from time to time – but you only pay for your reserved allocation.