{"id":6074,"date":"2021-01-23T11:22:04","date_gmt":"2021-01-23T05:52:04","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6074"},"modified":"2026-11-27T12:52:45","modified_gmt":"2026-11-27T07:22:45","slug":"increase-ram-in-openvz-container","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/increase-ram-in-openvz-container\/","title":{"rendered":"How to Increase RAM in OpenVZ Container: 5 Easy Steps"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Post Date:<\/strong> January 23, 2021<br><strong>Last Updated:<\/strong> November 27, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">OpenVZ is a container-based virtualization technology that allows hosting providers to run multiple isolated virtual private servers (VPS) on a single physical server. Each container is allocated specific system resources, including RAM, swap memory, CPU, and disk space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As applications grow and server workloads increase, the existing memory allocation may become insufficient, resulting in performance issues, slow application responses, or memory-related errors. In such situations, increasing the allocated RAM helps improve the performance and stability of the VPS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we will explain how to <strong>increase RAM in OpenVZ container<\/strong> using the <code>vzctl<\/code> command-line utility. We will walk through five simple steps, starting with identifying the container ID and stopping the VPS, followed by updating the RAM and swap allocation, restarting the container, and verifying the changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide is useful for system administrators and hosting providers who manage OpenVZ-based VPS environments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before proceeding with the process to increase RAM in an OpenVZ container, make sure you have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Root access:<\/strong> SSH access to the physical server running OpenVZ with root privileges.<\/li>\n\n\n\n<li><strong>OpenVZ environment:<\/strong> A working OpenVZ virtualization environment.<\/li>\n\n\n\n<li><strong>Container ID (CT_ID):<\/strong> Identify the VPS container whose RAM allocation needs to be increased.<\/li>\n\n\n\n<li><strong>Available server memory:<\/strong> Ensure that the physical server has sufficient free memory to accommodate the additional RAM allocation.<\/li>\n\n\n\n<li><strong>Maintenance window:<\/strong> Plan a maintenance window because the container needs to be stopped and restarted during the configuration process.<\/li>\n\n\n\n<li><strong>Backup:<\/strong> Take a backup of important VPS data before making resource configuration changes.<\/li>\n\n\n\n<li><strong>Resource allocation details:<\/strong> Decide the required RAM and swap sizes before applying the configuration.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The commands in this tutorial use the traditional OpenVZ <code>vzctl<\/code> management syntax. Make sure your OpenVZ version supports the specified RAM and swap options. Resource parameters may differ between OpenVZ versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Increase RAM in OpenVZ Container<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps below to increase RAM in an OpenVZ container using the <code>vzctl<\/code> command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check the List of Running OpenVZ Containers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, connect to the physical OpenVZ server through SSH with root privileges. Execute the following command to list all running containers.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzlist<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command displays the list of currently running containers along with their container IDs, hostnames, IP addresses, and other details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Identify the container ID (CT_ID) of the VPS for which you want to increase the RAM allocation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Stop the OpenVZ Container<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before modifying the RAM allocation, stop the target VPS container.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl stop &lt;CT_ID><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl stop 104<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>104<\/code> with your actual container ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Stopping the container ensures that the VPS is not running while you apply the resource configuration changes. Please schedule this operation during a maintenance window because the VPS will experience temporary downtime.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Increase RAM and Swap Memory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the container has been stopped, execute the following command to increase its RAM and swap allocation.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl set &lt;CT_ID> --ram &lt;Size> --swap &lt;Size> --save<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl set 104 --ram 4096M --swap 1G --save<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>104<\/code> \u2013 Container ID of the target VPS.<\/li>\n\n\n\n<li><code>--ram 4096M<\/code> \u2013 Sets the RAM allocation to 4096 MB (4 GB).<\/li>\n\n\n\n<li><code>--swap 1G<\/code> \u2013 Sets the swap allocation to 1 GB.<\/li>\n\n\n\n<li><code>--save<\/code> \u2013 Saves the updated configuration permanently so that the settings persist after a container restart.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that the requested memory allocation is within the physical server&#8217;s available resources and the limits supported by your OpenVZ version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Need Help with VPS RAM Configuration?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Managing OpenVZ containers, increasing VPS RAM, and configuring server resources can sometimes require technical expertise. Our team can help you with VPS memory upgrades, OpenVZ container management, server optimization, Linux administration, and infrastructure management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Need help managing your VPS server?<\/strong> <a href=\"https:\/\/pheonixsolutions.com\/contact\/\">Contact Pheonix Solutions<\/a> for expert assistance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Start the Container and Check Its Status<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After successfully updating the RAM and swap configuration, start the VPS container using the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl start &lt;CT_ID><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl start 104<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To verify whether the container has started successfully, execute:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">vzctl status &lt;CT_ID><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output should indicate that the container is running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Verify the RAM Allocation Inside the VPS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, connect to the VPS through SSH and execute the following command to check the available memory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">free -h<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command displays the total RAM, used memory, free memory, shared memory, cache, and swap allocation in a human-readable format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the <code>Mem<\/code> and <code>Swap<\/code> sections to confirm whether the updated memory allocation is reflected inside the VPS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the expected RAM and swap values are displayed, the configuration has been applied successfully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The actual memory visible inside the container can depend on the OpenVZ version, container resource limits, and host-level memory management. If the expected values are not displayed, check the container configuration and applicable memory limits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Increasing RAM in an OpenVZ container is a straightforward process when using the <code>vzctl<\/code> command-line utility. By identifying the correct container ID, stopping the VPS, updating the RAM and swap allocation, and restarting the container, system administrators can allocate additional memory resources based on application requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we covered how to increase RAM in an OpenVZ container and verify the updated memory allocation using the <code>free -h<\/code> command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before making any resource changes, always ensure that the physical server has sufficient available memory and that the new configuration is supported by your OpenVZ version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For professional assistance with VPS management, server administration, and virtualization solutions, contact the Pheonix Solutions team.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. How to increase RAM in an OpenVZ container?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can increase RAM in an OpenVZ container using the <code>vzctl set<\/code> command. First, stop the container using <code>vzctl stop &lt;CT_ID&gt;<\/code>. Then execute <code>vzctl set &lt;CT_ID&gt; --ram 4096M --swap 1G --save<\/code> to configure 4 GB RAM and 1 GB swap. Finally, restart the container and verify the memory using <code>free -h<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Which command is used to check running OpenVZ containers?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>vzlist<\/code> command is used to display the list of running OpenVZ containers. It provides information such as container IDs, hostnames, IP addresses, and container status.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Is it necessary to stop the OpenVZ container before increasing RAM?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, for the procedure described in this tutorial, you should stop the container before modifying its RAM allocation. This helps apply the configuration changes safely. It also causes temporary VPS downtime.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. What is the purpose of the &#8211;save option in the vzctl command?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>--save<\/code> option permanently saves the updated container configuration. Without saving the configuration, changes may not persist after the container is restarted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. How can I verify the RAM size after increasing it in OpenVZ?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to the VPS through SSH and execute the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">free -h<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command displays the total, used, and available RAM along with swap memory in a human-readable format.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Documentation<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/openvz.org\/\" target=\"_blank\" rel=\"noopener\">Official OpenVZ Documentation<\/a> \u2013 OpenVZ virtualization documentation.<\/li>\n\n\n\n<li><a href=\"https:\/\/manpages.ubuntu.com\/manpages\/jammy\/man8\/vzctl.8.html\" target=\"_blank\" rel=\"noopener\">vzctl Command Manual<\/a> \u2013 Reference for vzctl commands and options.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-create-a-container-in-openvz-server\/\">How to create a container in OpenVZ server<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-restore-openvz-virtuozzo-7-disaster-recovery-dr\/\">How to restore OpenVZ \/ Virtuozzo 7 (Disaster Recovery \u2013 DR)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Assistance?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Managing OpenVZ containers, increasing VPS RAM, and configuring server resources can sometimes require additional technical expertise. Our team can help you with OpenVZ container management, VPS resource allocation, server optimization, virtualization, Linux server administration, server security, and infrastructure management.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Need assistance with your VPS server?<\/strong> Please feel free to <a href=\"https:\/\/pheonixsolutions.com\/contact\/\">contact the Pheonix Solutions team<\/a>. We will be happy to assist you with your VPS management and server administration requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explore <a href=\"https:\/\/pheonixsolutions.com\/\">Pheonixsolutions<\/a> to learn more about our hosting, cloud infrastructure, and DevOps services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explore our services to learn more:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/pheonixsolutions.com\/devops-cloud\/\">DevOps and Cloud Infrastructure Services<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/pheonixsolutions.com\/vps-hosting\/\">VPS Hosting Services<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/pheonixsolutions.com\/dedicated-hosting\/\">Dedicated Hosting Services<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/pheonixsolutions.com\/security\/\">Server Security and Maintenance Services<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/\">Knowledge Base<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: January 23, 2021Last Updated: November 27, 2026 Introduction OpenVZ is a container-based virtualization technology that allows hosting providers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14027,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[435],"class_list":["post-6074","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers-kubernetes","tag-openvz","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1zY","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/images-16.png","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6074"}],"version-history":[{"count":4,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6074\/revisions"}],"predecessor-version":[{"id":14074,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6074\/revisions\/14074"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media\/14027"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}