{"id":820,"date":"2022-09-06T09:11:20","date_gmt":"2022-07-06T04:38:02","guid":{"rendered":"https:\/\/www.silicloud.com\/blog\/uncategorized\/one-possible-paraphrase-could-be-adding-swap-space-on-rocky-linux-9-step-by-step-guide\/"},"modified":"2024-03-15T12:44:14","modified_gmt":"2024-03-15T12:44:14","slug":"adding-swap-space-on-rocky-linux-9-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/","title":{"rendered":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide"},"content":{"rendered":"<h3>The following is a native paraphrase option for the introduction:<\/h3>\n<p>&#8220;Allow me to commence by providing an alternative rendition of the introduction.&#8221;<\/p>\n<p>To protect against out-of-memory errors in applications, you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to a Rocky Linux 9 server.<\/p>\n<h2>What does Swap mean?<\/h2>\n<p>A portion of the hard drive storage is allocated as swap, which serves as temporary storage for data that cannot fit in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Random-access_memory\">RAM<\/a>. This allows the operating system to store more information in its working memory, but with certain limitations. The swap space on the hard drive is primarily utilized when there is not enough RAM capacity to hold the currently used application data.<\/p>\n<p>Data stored on a hard disk will be noticeably slower compared to data stored in RAM, but the operating system prioritizes keeping application data in memory and relies on swap space for older data. In general, having swap space as a backup when your system&#8217;s RAM is full can serve as a useful safety measure, particularly for systems that do not have SSD storage.<\/p>\n<h2>First, verify the system for swap information.<\/h2>\n<p>Firstly, let&#8217;s see if the system already has any existing swap space. It might have multiple swap files or swap partitions, but typically one should suffice.<\/p>\n<p>To determine whether the system has any configured swap, we can type and check.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">swapon<\/span> <span class=\"token parameter variable\">&#8211;show<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>If you receive no output, it indicates that your system currently lacks swap space.<\/p>\n<p>You can use the free utility to confirm the absence of any active swap.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>total used free shared buff\/cache available Mem: 1.7Gi 173Mi 1.2Gi 9.0Mi 336Mi 1.4Gi <mark>Swap: 0B 0B 0B<\/mark><\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>No swaps are currently active on the system, as indicated in the Swap row of the output.<\/p>\n<h2>In the second step, you will need to assess the amount of storage space that is currently available on the hard drive partition.<\/h2>\n<p>Prior to creating our swap file, we will verify our present disk usage to ensure sufficient space availability. This can be done by entering the following command:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Filesystem Size Used Avail Use% Mounted on devtmpfs 855M 0 855M 0% \/dev tmpfs 888M 0 888M 0% \/dev\/shm tmpfs 355M 9.4M 346M 3% \/run <mark>\/dev\/vda1 59G 1.4G 58G 3% \/<\/mark> \/dev\/vda2 994M 155M 840M 16% \/boot \/dev\/vda15 100M 7.0M 93M 7% \/boot\/efi tmpfs 178M 0 178M 0% \/run\/user\/0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>The disk listed under the &#8220;Mounted on&#8221; column refers to the device in question. In this particular scenario, we have ample unused space (only 1.4G used). However, your usage may vary.<\/p>\n<p>There is a wide range of opinions on the ideal size for a swap space, but it ultimately comes down to your own preferences and the needs of your applications. In general, a good starting point is to have an amount of swap space that is equal to or double the amount of RAM in your system. Another useful guideline is that if you are using swap primarily as a backup for RAM, anything over 4G is likely unnecessary.<\/p>\n<h2>Step 3 involves the creation of a Swap File.<\/h2>\n<p>Once we have determined the amount of hard drive space we have, we can proceed to generate a swap file within our file system. We will designate a file with the desired size and name it as &#8220;swapfile&#8221; in the root directory (\/).<\/p>\n<p>The fallocate program is the most effective method for generating a swap file as it promptly creates a file of the desired size.<\/p>\n<p>In this guide, we will create a file of 2G size to match the RAM capacity of our example server. Make sure to adjust this according to your own server requirements.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> fallocate <span class=\"token parameter variable\">-l<\/span> <mark>1G<\/mark> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>To ensure that the proper space has been reserved, we can verify it by typing:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-lh<\/span> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">-rw-r&#8211;r&#8211;. <span class=\"token number\">1<\/span> root root <span class=\"token number\">2<\/span>.0G Sep <span class=\"token number\">13<\/span> <span class=\"token number\">17<\/span>:52 \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Our document has been generated with the appropriate amount of space allocated.<\/p>\n<h2>Step 4 \u2013 Activating the Swap File<\/h2>\n<p>Once we have a file of the appropriate size at our disposal, our next step is to convert it into swap space.<\/p>\n<p>Initially, it is necessary to secure the file&#8217;s permissions in such a way that solely users with root privileges possess the ability to view the contents. This ensures that regular users are unable to access the file, preventing any potential security risks.<\/p>\n<p>To ensure the file can only be accessed by the root, type:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">600<\/span> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Confirm the change of permissions by typing:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-lh<\/span> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p><mark>-rw&#8212;&#8212;-<\/mark> 1 root root 2.0G Sep 13 17:52 \/swapfile<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>As you can observe, it is only the root user who possesses the read and write flags activated.<\/p>\n<p>To designate the file as swap space, simply type and execute the command:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">mkswap<\/span> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Setting up swapspace version 1, size = 2 GiB (2147479552 bytes) no label, UUID=585e8b33-30fa-481f-af61-37b13326545b<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Once we have labeled the document, we can activate the swap file, thereby enabling our system to utilize it.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">swapon<\/span> \/swapfile<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Confirm that the swap is accessible by inputting:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">swapon<\/span> <span class=\"token parameter variable\">&#8211;show<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>NAME TYPE SIZE USED PRIO \/swapfile file 2G 0B -2<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>To verify our discoveries, we can re-examine the results of the complimentary tool.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>total used free shared buff\/cache available Mem: 1.7Gi 172Mi 1.2Gi 9.0Mi 338Mi 1.4Gi <mark>Swap: 2.0Gi 0B 2.0Gi<\/mark><\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>The swap has been successfully established and our operating system will utilize it when needed.<\/p>\n<h2>Step 5 \u2013 Ensuring the Swap File Remains Permanent<\/h2>\n<p>Our recent modifications have made it possible for the swap file to be used in the current session. Nevertheless, if the server is restarted, the swap settings will not be automatically saved. To rectify this, we can update our \/etc\/fstab file by including the swap file.<\/p>\n<p>Make a backup of the \/etc\/fstab file as a precautionary measure if any issues arise.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">cp<\/span> \/etc\/fstab \/etc\/fstab.bak<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Type the swap file information and append it at the end of the \/etc\/fstab file.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#8216;\/swapfile none swap sw 0 0&#8217;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> <span class=\"token parameter variable\">-a<\/span> \/etc\/fstab<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Afterwards, we will examine certain configurations that we can modify in order to optimize our swap space.<\/p>\n<h2>Step 6 \u2013 Adjusting your Swap Settings<\/h2>\n<p>When working with swap, there are several configurable options that can affect the performance of your system.<\/p>\n<h3>Changing the Swappiness Parameter.<\/h3>\n<p>The swappiness parameter determines the frequency at which your system moves data from RAM to the swap space. It is a percentage value ranging from 0 to 100.<\/p>\n<p>By keeping values near zero, the kernel will only resort to swapping data to the disk if it is absolutely essential. It should be kept in mind that accessing the swap file is time-consuming compared to accessing RAM, which can adversely affect system performance. Therefore, instructing the system to minimize reliance on the swap file usually results in faster overall performance.<\/p>\n<p>In certain scenarios, it may be advantageous for values closer to 100 to allocate more data to swap in order to maintain a larger amount of free RAM space. This can vary depending on your server&#8217;s purpose or the memory requirements of your applications.<\/p>\n<p>To find out the current swappiness value, we can simply type:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">cat<\/span> \/proc\/sys\/vm\/swappiness<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>60<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>A swappiness setting of 60 is reasonable for a Desktop, but if it&#8217;s a server, it&#8217;s recommended to decrease it towards 0.<\/p>\n<p>Using the sysctl command allows us to adjust the swappiness to a different value.<\/p>\n<p>For example, if we t to change the swappiness to 10, we can enter the following command:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">sysctl<\/span> <span class=\"token assign-left variable\">vm.swappiness<\/span><span class=\"token operator\">=<\/span><span class=\"token number\">10<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>vm.swappiness = 10<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>The changes made will remain in effect until the next time the system is restarted. To automatically apply this value upon restart, we can add the line to the \/etc\/sysctl.conf file.<\/p>\n<p>The pre-installed text editor in Rocky Linux 9 is vi. While vi is a very powerful text editor, it can be challenging for inexperienced users. To make editing configuration files on your Rocky Linux 9 server easier, it may be advisable to install a more user-friendly editor like nano.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> dnf <span class=\"token function\">install<\/span> <span class=\"token function\">nano<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>You have the ability to edit the sysctl.conf file using nano.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/sysctl.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>You have the option to add at the bottom.<\/p>\n<div>The configuration file for sysctl is located at \/etc\/sysctl.conf.<\/div>\n<pre class=\"post-pre\"><code>vm.swappiness=10\r\n<\/code><\/pre>\n<p>Once you are done, save and exit the file. In case you are using nano, press CTRL + X to save and quit, then respond with Y and press Enter when prompted.<\/p>\n<h3>Modifying the Cache Pressure Setting<\/h3>\n<p>One additional value that you may consider adjusting is the vfs_cache_pressure. This option controls the priority given to caching inode and dentry details compared to other data within the system.<\/p>\n<p>Obtaining information about the filesystem can be expensive and is often requested, making it highly beneficial for your system to store this data in its cache. To view the current value, you can query the proc filesystem once more.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">cat<\/span> \/proc\/sys\/vm\/vfs_cache_pressure<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>100<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>At its present configuration, our system swiftly eliminates inode information from the cache. To rectify this, we can adjust the setting to a more cautious value such as 50 by entering the command.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">sysctl<\/span> <span class=\"token assign-left variable\">vm.vfs_cache_pressure<\/span><span class=\"token operator\">=<\/span><span class=\"token number\">50<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>vm.vfs_cache_pressure = 50<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is only applicable for our current session. We can modify it by including it in our configuration file, similar to what we did with our swappiness setting.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/sysctl.conf<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Include the line at the end, indicating the new value.<\/p>\n<div>Please provide a native language for paraphrasing.<\/div>\n<pre class=\"post-pre\"><code>vm.vfs_cache_pressure=50\r\n<\/code><\/pre>\n<p>Please save and close the file once you&#8217;re done.<\/p>\n<h2>In summary, to conclude<\/h2>\n<p>By following the instructions provided in this guide, you will create a buffer zone for situations that would typically result in out-of-memory errors. Utilizing swap space can greatly assist in preventing these prevalent issues.<\/p>\n<p>If you encounter out of memory errors or find that your system cannot run the necessary applications, the most effective remedy is to enhance your application settings or upgrade your server.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>More tutorials<\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/the-top-seven-linux-distributions-for-laptops\/\" target=\"_blank\" rel=\"noopener\">The top seven Linux distributions for laptops<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/a-native-guide-to-the-atop-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">A native guide to the atop command in Linux<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/quickstart-guide-for-setting-up-a-new-user-with-sudo-privileges-on-rocky-linux-8\/\" target=\"_blank\" rel=\"noopener\">sudo for new user with privileges on Rocky Linux 8<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/example-tutorial-for-the-strategy-design-pattern-in-java\/\" target=\"_blank\" rel=\"noopener\">Strategy Design Pattern in Java tutorial<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/one-possible-paraphrase-could-besetting-up-a-programming-environment-and-installing-python-3-on-rocky-linux-9\/\" target=\"_blank\" rel=\"noopener\">Python 3 installing on Rocky Linux 9<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/example-tutorial-for-the-strategy-design-pattern-in-java\/\" target=\"_blank\" rel=\"noopener\">Strategy Design Pattern in Java tutorial<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following is a native paraphrase option for the introduction: &#8220;Allow me to commence by providing an alternative rendition of the introduction.&#8221; To protect against out-of-memory errors in applications, you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to a Rocky Linux 9 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-820","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adding Swap Space on Rocky Linux 9 Step-by-Step Guide - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide\" \/>\n<meta property=\"og:description\" content=\"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-06T04:38:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-15T12:44:14+00:00\" \/>\n<meta name=\"author\" content=\"Liam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Liam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\"},\"author\":{\"name\":\"Liam\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/23786905eb7b377f45ddb01c17da7671\"},\"headline\":\"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide\",\"datePublished\":\"2022-07-06T04:38:02+00:00\",\"dateModified\":\"2024-03-15T12:44:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\"},\"wordCount\":1778,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\",\"name\":\"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\"},\"datePublished\":\"2022-07-06T04:38:02+00:00\",\"dateModified\":\"2024-03-15T12:44:14+00:00\",\"description\":\"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.silicloud.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"name\":\"Silicon Cloud Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\",\"name\":\"Silicon Cloud Blog\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"contentUrl\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"width\":1024,\"height\":1024,\"caption\":\"Silicon Cloud Blog\"},\"image\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\",\"https:\/\/twitter.com\/SiliCloudGlobal\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/23786905eb7b377f45ddb01c17da7671\",\"name\":\"Liam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d37ed3e7f770dde8bf069ba0b4298688028c3abaacf1131742fc1352d174ebd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d37ed3e7f770dde8bf069ba0b4298688028c3abaacf1131742fc1352d174ebd?s=96&d=mm&r=g\",\"caption\":\"Liam\"},\"sameAs\":[\"http:\/\/Wilson\"],\"url\":\"https:\/\/www.silicloud.com\/blog\/author\/liamwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide - Blog - Silicon Cloud","description":"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/","og_locale":"en_US","og_type":"article","og_title":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide","og_description":"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to","og_url":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/","og_site_name":"Blog - Silicon Cloud","article_publisher":"https:\/\/www.facebook.com\/SiliCloudGlobal\/","article_published_time":"2022-07-06T04:38:02+00:00","article_modified_time":"2024-03-15T12:44:14+00:00","author":"Liam","twitter_card":"summary_large_image","twitter_creator":"@SiliCloudGlobal","twitter_site":"@SiliCloudGlobal","twitter_misc":{"Written by":"Liam","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#article","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/"},"author":{"name":"Liam","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/23786905eb7b377f45ddb01c17da7671"},"headline":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide","datePublished":"2022-07-06T04:38:02+00:00","dateModified":"2024-03-15T12:44:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/"},"wordCount":1778,"commentCount":0,"publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/","url":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/","name":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/#website"},"datePublished":"2022-07-06T04:38:02+00:00","dateModified":"2024-03-15T12:44:14+00:00","description":"you can preventatively include additional swap space on your server. This tutorial will demonstrate the process of adding a swap file to","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/blog\/adding-swap-space-on-rocky-linux-9-step-by-step-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.silicloud.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Adding Swap Space on Rocky Linux 9 Step-by-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/blog\/#website","url":"https:\/\/www.silicloud.com\/blog\/","name":"Silicon Cloud Blog","description":"","publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.silicloud.com\/blog\/#organization","name":"Silicon Cloud Blog","url":"https:\/\/www.silicloud.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","contentUrl":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","width":1024,"height":1024,"caption":"Silicon Cloud Blog"},"image":{"@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SiliCloudGlobal\/","https:\/\/twitter.com\/SiliCloudGlobal"]},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/23786905eb7b377f45ddb01c17da7671","name":"Liam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d37ed3e7f770dde8bf069ba0b4298688028c3abaacf1131742fc1352d174ebd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d37ed3e7f770dde8bf069ba0b4298688028c3abaacf1131742fc1352d174ebd?s=96&d=mm&r=g","caption":"Liam"},"sameAs":["http:\/\/Wilson"],"url":"https:\/\/www.silicloud.com\/blog\/author\/liamwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/comments?post=820"}],"version-history":[{"count":0,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/820\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/media?parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/categories?post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/tags?post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}