How Compute Hours Accrue

In this guide, you'll learn how your running environments accrue Compute usage, and how that usage maps to your plan.

What is a Compute Hour?#

Cloud measures Compute usage in vCPU-hours. One vCPU-hour is the equivalent of one virtual CPU core running for one hour.

Cloud meters Compute for the processes that run your Medusa application: the server and worker processes of each environment. The environment's Compute usage is the sum of these processes' usage.


How Compute Hours Accrue#

Compute hours are based on the CPU allocated to your environment, not on the CPU your application uses at any moment:

  • Cloud samples the CPU allocated to each of your running environments every hour.
  • Cloud multiplies the allocated CPU by the time the environment runs to calculate the compute hours consumed in that hour.
  • An environment accrues compute hours even when it's idle. As long as it's running, its allocated CPU is billable. Traffic levels don't change the accrual, but keeping the environment online does.
  • An environment with no running processes, such as a suspended environment, doesn't accrue compute hours.

Example: Calculate Compute Hours#

Consider a production environment whose server has 1 vCPU allocated and runs continuously:

  • 1 vCPU × 24 hours = 24 vCPU-hours per day.
  • Over a 30-day month, that's roughly 720 vCPU-hours per month for that environment. This is the standing cost of keeping it online around the clock.

If the same environment also runs a worker with 1 vCPU allocated, the worker adds its own ~720 vCPU-hours per month. So, the environment's total is ~1,440 vCPU-hours per month.

Each additional environment adds its own compute hours. For example, four always-on environments of ~1 vCPU each consume around 2,880 vCPU-hours per month.


How Compute Hours Map to Your Plan#

Your plan includes a monthly amount of compute hours, applied across all projects in your organization. The Plans & Pricing page lists the included amount for each plan.

  • Your plan covers usage up to its included amount.
  • Compute usage beyond the included amount is Flex Usage. Cloud bills it on your next invoice, as explained in the Billing guide.

You can monitor your Compute usage over time, along with forecasted usage, in the Usage settings. Forecasts focus on your production and long-lived environments, since preview environment usage is sporadic.


Reduce Compute Usage#

To reduce your organization's Compute usage:

  • Suspend environments you don't need running. Suspended environments don't accrue compute hours.
  • Right-size your environments. Since billing follows allocated CPU, an environment with more CPU allocated accrues proportionally more compute hours.
  • Consolidate projects. Each always-on environment in the organization adds to the total Compute usage.
Was this guide helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵