HostleloBlog
SavedSearch
Visit Hostlelo

How to Increase VPS RAM: Diagnose, Resize and Verify

Check whether your VPS is short of memory, plan the correct resize and confirm that the operating system and applications can use the upgrade.

The short answer

Increase VPS RAM through your provider's supported resize process or a migration to a larger instance. First confirm memory pressure rather than relying on the Linux free-memory figure alone. Back up the application, check shutdown and disk-resize rules, then verify the new memory and application behaviour. Swap and PHP memory limits do not add physical VPS RAM.

A coral memory module above a purple server while a magnifying glass examines its existing memory, illustrating a measured VPS RAM upgrade.
Reading options

On this page

Before you start

Authorized access to the VPS provider account and operating system, monitoring history, a recoverable application backup and a maintenance window if required. Commands are Linux diagnostic examples; they have not been run on your server.

A VPS that slows down during a backup or stops an application under load may need more memory. It may also have a memory leak, an overly aggressive worker configuration or a limit inside one container. Buying a larger plan before checking the cause can leave the original problem in place.

You increase VPS RAM through the provider's supported resize process, or by migrating to a larger instance. A command inside Linux cannot allocate more physical memory from the host. Start with diagnosis, then make one controlled change and compare the result.

The commands below are inspection examples for a Linux VPS you administer. They are not results from a Hostlelo customer server.

1. Check available memory during the problem

Start with:

free -h
vmstat 1 5

The free manual distinguishes unused memory from available memory. Available estimates how much memory applications can use without swapping, taking reclaimable memory into account. A small number in the free column alone is not evidence that the server needs an upgrade.

The vmstat manual explains that the first report includes averages since boot; subsequent reports cover the sampling interval. The si and so columns show memory moving in and out of swap. Look for sustained activity alongside slow requests and low available memory, rather than treating any nonzero swap use as a failure.

Collect observations during the relevant workload. A quiet server at midnight does not tell you what happens during a lunchtime import. Save the time, workload and symptoms with your monitoring graph so you can compare the same conditions after a change.

2. Find which limit was reached

There are several different memory boundaries:

  • VPS allocation: the memory presented to the virtual machine.
  • Container limit: a memory budget applied to a particular container.
  • Application limit: a runtime setting such as PHP's memory limit or an application heap setting.
  • Concurrency: the number of workers or simultaneous jobs sharing the available memory.

Docker documents hard and soft memory limits. A container can reach its own limit even when the VPS still has capacity. More host RAM does not automatically change that container configuration.

PHP's memory_limit setting limits memory that a script may allocate. Raising it does not add RAM to the server. Giving every worker a higher ceiling can increase total demand, so review concurrency and actual usage together.

Check application and system logs around the failure for evidence of an out-of-memory event. On a system using systemd, an administrator can inspect recent kernel messages with:

journalctl -k --since '1 hour ago' --no-pager

Access and log retention vary. An empty result does not prove no event occurred, and a forced process exit can have other causes. Keep logs private and redact sensitive details before sharing them.

3. Decide whether to tune, resize or separate workloads

Consider a RAM upgrade when the intended workload repeatedly needs more memory than the instance can provide, after checking avoidable demand. Consider an application fix when memory consumption keeps growing without settling or one specific task behaves abnormally.

Other useful changes can include reducing simultaneous imports, adjusting a worker pool or moving a heavy scheduled task away from the busiest time. Test changes against the business requirement: reducing concurrency may protect memory while making a queue take longer to finish.

An illustrative example: a shop runs comfortably most of the day but becomes unresponsive when a large import and a backup overlap. Rescheduling them is worth testing. If the required import still exceeds the available memory by itself, a larger instance or a different import method may be needed. This is a diagnosis example, not a measured customer result.

There is no universal RAM requirement based only on visitors per day. Use our VPS workload-sizing guide to include application, database and background-job demand.

4. Confirm the provider's resize rules

Before approving a resize, ask:

  1. Can this exact plan be resized in place?
  2. Does the operation require a shutdown or restart?
  3. Will CPU, disk, architecture, IP addresses or other allocations change?
  4. Can you choose a memory/CPU change without expanding the disk?
  5. What is the new charge and when does it begin?
  6. What recovery path is available if the instance fails to start?

Rules differ by provider and product. For example, DigitalOcean's resize documentation distinguishes CPU/RAM-only resizing from an option that also permanently expands the disk. It requires the Droplet to be powered off and recommends an orderly operating-system shutdown rather than a hard power-off.

That example is not a guarantee about Hostlelo or another provider. Ask for the procedure for your specific VPS. Do not click a rebuild or reinstall action when you intend to resize; those operations serve different purposes and may replace the system.

5. Prepare a recoverable change

Make an application-consistent backup of the data you need to recover. For a database, use the database's supported backup process or an appropriately coordinated snapshot method. Check that any attached volumes and external databases are covered.

Record the current plan, network configuration, relevant application settings and the expected new allocation. Ensure you can use the provider's recovery console if ordinary SSH does not return.

Choose a quiet window if downtime is required. Pause or drain jobs using the application's supported procedure, and handle incoming orders or writes according to the agreed maintenance plan. Do not power off a busy database simply because a dashboard button is available.

Our backup guide explains why having a backup file and having a usable recovery plan are different checks.

6. Resize using the documented workflow

Use the provider's instructions for the correct instance. Confirm its name or ID, existing plan and intended target before submitting the change.

If a shutdown is required, shut down cleanly and wait for the provider to show the expected state. Start the resize, wait for completion and then start the server as documented. Avoid issuing repeated resize requests while the first operation is pending.

Do not assume that every provider supports memory hot-add, preserves every networking detail or completes within a fixed number of minutes. If the operation fails, record its status and use the support or recovery procedure rather than repeatedly forcing power cycles.

7. Verify the operating system and the application

After the instance is running:

free -h

Compare the total with the expected allocation, allowing for units and memory reserved by the system. If the provider shows the new size but the guest does not, investigate with the provider before changing unrelated settings.

Then check the actual service:

  • Can you log in and reach the important website pages?
  • Are the database and background workers running?
  • Does a representative task finish without the earlier failure?
  • Have container or application caps remained at their old values?
  • During comparable demand, are latency, available memory and error rates better?

Keep the first verification focused. Do not increase every worker limit at the same time: that makes it harder to know what the RAM change achieved.

Swap is not a RAM upgrade

Swap can provide additional virtual-memory backing, but it does not become physical RAM. Its effect depends on the workload and storage. It is not a substitute for sufficient memory in a latency-sensitive application.

Likewise, clearing caches to make a dashboard look emptier does not establish that the server is healthier. Compare useful work completed, request latency and errors.

If you need help, send support the VPS ID, operating system, failure timestamps, affected application and relevant memory observations. Ask them to confirm the resize method, interruption, new price and recovery options before proceeding.

Reader questions

Can I increase VPS RAM from an SSH command?

An ordinary command inside the guest cannot increase its physical allocation. Use the provider's supported resize process or move to a larger instance. An authorized provider API or CLI may initiate that operation from a terminal.

Does increasing PHP memory_limit increase VPS RAM?

No. It changes a script's allocation limit. The VPS still has the same total memory, which must be shared by the operating system, database and application workers.

Will upgrading RAM require downtime?

It depends on the provider and product. Some resize processes require the instance to be powered off. Confirm the exact procedure and plan a maintenance window when needed.

Why is Linux showing little free memory?

Linux uses memory for caches as well as applications. Review available memory, workload trends, swap activity and error evidence together. The free column by itself is not enough to diagnose pressure.

How do I know the upgrade worked?

Verify the new allocation in the guest, then repeat a representative workload and compare memory pressure, errors and response times. Check separate container or application limits if the original problem remains.

Sources & further reading

  1. Debian/procps: free command
  2. Debian/procps: vmstat command
  3. Docker: Resource constraints
  4. PHP: memory_limit
  5. DigitalOcean: Resize Droplets

What changed

Expanded an empty imported draft into a complete Linux VPS memory-upgrade guide. Checked primary documentation, separated physical RAM from swap and application caps, added verification steps, FAQs and original cover artwork.

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close