{"id":8694,"date":"2020-06-17T04:59:47","date_gmt":"2020-06-17T08:59:47","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=8694"},"modified":"2021-12-04T08:48:44","modified_gmt":"2021-12-04T08:48:44","slug":"add-swap-space-ubuntu-20-04-lts","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/","title":{"rendered":"How to Add Swap Space in Ubuntu 20.04 LTS"},"content":{"rendered":"\n

Here you will learn how to add swap in Ubuntu<\/a> 20.04 LTS. This will help you out of-memory errors on your server if you find they are occurring. Swap space may not be the best solution above properly optimizing your server<\/a> or increasing RAM.<\/p>\n\n\n\n

Swap space is a portion of your hard drive to store persistent data that is not accessed as frequently and to keep RAM free for other apps that are active. Swap is significantly slower than RAM so it is not ideal for the operating system to use it for running programs.<\/p>\n\n\n\n

Your server may resort to using swap as a RAM fallback when the latter is depleted and this is why we want to reserve some hard disk space for the server whenever the need arises.<\/p>\n\n\n\n

Warning: It is important to note that using swap space on SSDs is not recommended as it can cause degradation of the disk over time. Therefore swap is only recommended on systems with traditional spinning hard disk drives. Again you want to prioritize optimizing your server services to suit the hardware you have otherwise you may benefit more from adding additional RAM onto the server.<\/em><\/p>\n\n\n\n

Adding Swap Space in Ubuntu 20.04 LTS<\/h2>\n\n\n\n

Step 1: Check if Swap is Already Enabled<\/h2>\n\n\n\n

The first thing you will want to do is to check if swap space has already been added to your system. This can be done by running the command below:<\/p>\n\n\n\n

$ sudo swapon --show<\/code><\/pre>\n\n\n\n

If you do not get any output it means your system does not have swap space otherwise you will get something similar to this:<\/p>\n\n\n\n

NAME      TYPE      SIZE   USED PRIO\n\/dev\/dm-1 partition 1G \t364M   -2<\/code><\/pre>\n\n\n\n

You can also use the free utility to check for active swap space.<\/p>\n\n\n\n

$ free -h<\/code><\/pre>\n\n\n\n

The output will look something similar to this:<\/p>\n\n\n\n

              total        used        free      shared  buff\/cache   available\nMem:          981Mi       129Mi       640Mi       0.0Ki       211Mi       714Mi\nSwap:            1G      364M          0B<\/code><\/pre>\n\n\n\n

Step 2 \u2013 Check for Available Space on the Hard Drive Partition<\/h2>\n\n\n\n

Swap has to be created on the physical disk so it is important that you make sure the space exists in the first place. Run the following command to check for available space:<\/p>\n\n\n\n

$ df -h<\/code><\/pre>\n\n\n\n

Your output will look something similar to this:<\/p>\n\n\n\n

Filesystem      Size  Used Avail Use% Mounted on\nudev            474M     0  474M   0% \/dev\ntmpfs            99M  932K   98M   1% \/run\n\/dev\/vda1        40G  1.4G   38G   3% \/\ntmpfs           491M     0  491M   0% \/dev\/shm\ntmpfs           5.0M     0  5.0M   0% \/run\/lock\ntmpfs           473M     0  491M   0% \/sys\/fs\/cgroup\n\/dev\/vda15      104M  3.9M  101M   4% \/boot\/efi\n\/dev\/loop0       56M   55M     0 100% \/snap\/core18\/1705\ntmpfs            99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n

You are interested in the root device identified by “\/<\/strong>” in the “Mounted on<\/strong>” column. Ideally, that is where you will want to reserve your swap space. You also have to be careful about how much space you have available so that you leave some space for the normal operating system<\/a> and data storage needs.<\/p>\n\n\n\n

A good starting point to the amount of swap you want is usually the same amount as RAM or double the amount but not exceeding 4G. If you need 4G of swap it might be a sign that you need to add physical RAM to your system instead of adding such a large amount of swap.<\/p>\n\n\n\n

Step 3: Add the Swap Space<\/h2>\n\n\n\n

Seeing it is possible to have multiple swap files or swap partitions, we will not be featuring such a setup. In this guide, we will stick to one swap file.<\/p>\n\n\n\n

We are going to use the fallocate<\/strong> program to create a swap file called swapfile in the root “\/<\/strong>” directory.<\/p>\n\n\n\n

In this example, we are creating a 2G file by running this command.<\/p>\n\n\n\n

$ sudo fallocate -l 1G \/swapfile<\/code><\/pre>\n\n\n\n

Next, we verify that the correct amount of space was reserved by typing:<\/p>\n\n\n\n

$ ls -lh \/swapfile<\/code><\/pre>\n\n\n\n

The output should be similar to this depending on the size you chose.<\/p>\n\n\n\n

$ -rw-r--r-- 1 root root 1.0G Jun 10 11:14 \/swapfile<\/code><\/pre>\n\n\n\n

Step 4: Enable the Swap File<\/h2>\n\n\n\n

Before we actually turn the file into swap space, we need to restrict permissions to the space to users with root privileges.<\/p>\n\n\n\n

$ sudo chmod 600 \/swapfile<\/code><\/pre>\n\n\n\n

Next, we mark the file as swap space by running the following:<\/p>\n\n\n\n

$ sudo mkswap \/swapfile<\/code><\/pre>\n\n\n\n

The following is the output:<\/p>\n\n\n\n

Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)\nno label, UUID=ce45582-0a2a-450f-cdd4-527e54026db7<\/code><\/pre>\n\n\n\n

Finally, we enable the swap file so that our system can use it:<\/p>\n\n\n\n

$ sudo swapon \/swapfile<\/code><\/pre>\n\n\n\n

Once again verify that the swap is available:<\/p>\n\n\n\n

$ sudo swapon --show<\/code><\/pre>\n\n\n\n

The output should look something similar to this:<\/p>\n\n\n\n

NAME      TYPE  SIZE USED PRIO\n\/swapfile file 1024M   0B   -2<\/code><\/pre>\n\n\n\n

Using the free<\/strong> utility:<\/p>\n\n\n\n

$ free -h<\/code><\/pre>\n\n\n\n

Here’s the confirmed output:<\/p>\n\n\n\n

              total        used        free      shared  buff\/cache   available\nMem:          981Mi       115Mi       652Mi       0.0Ki       213Mi       714Mi\nSwap:         1.0Gi          0B       1.0Gi<\/code><\/pre>\n\n\n\n

Step 5: Make the Swap File Permanent<\/h2>\n\n\n\n

The above commands will create the swap file which will be valid for the current session until the system is rebooted. We need to add the swap file to our “\/etc\/fstab<\/strong>” file to make the configuration permanent.<\/p>\n\n\n\n

First thing, as a good practice, when doing any configuration changes, back up the “\/etc\/fstab<\/strong>” file.<\/p>\n\n\n\n

$ sudo cp \/etc\/fstab \/etc\/fstab.bak<\/code><\/pre>\n\n\n\n

Add the swap information to the tail end of your \/etc\/fstab using this command:<\/p>\n\n\n\n

$ echo '\/swapfile none swap sw 0 0' | sudo tee -a \/etc\/fstab<\/code><\/pre>\n\n\n\n

Step 6: Optimize your Swap Settings<\/h2>\n\n\n\n

You will need to change the swappiness parameter which determines how often your system swaps data out of RAM to the swap space. The default is 60. This is a percentage anywhere between 0 and 100.<\/p>\n\n\n\n

For values closer to zero, the system will not swap data to the disk unless absolutely necessary. Values that are closer to 100 put as much data as possible into swap in an effort to keep more RAM space free. You can test your swappiness by running the following:<\/p>\n\n\n\n

$ cat \/proc\/sys\/vm\/swappiness<\/code><\/pre>\n\n\n\n

By default it will output:<\/p>\n\n\n\n

60<\/code><\/pre>\n\n\n\n

The general rule is for Desktop flavors of Ubuntu, a swappiness setting of 60 is a good value. For a server environment values closer to zero are ideal. Around 10 is recommended as a good starting point.<\/p>\n\n\n\n

You can change swappiness by running the following:<\/p>\n\n\n\n

$ sudo sysctl vm.swappiness=10<\/code><\/pre>\n\n\n\n

With the successful output being:<\/p>\n\n\n\n

vm.swappiness = 10<\/code><\/pre>\n\n\n\n

This value is only valid for the current session until the server is rebooted. To make it more permanent you need to edit the \/etc\/sysctl.conf<\/strong> file by running:<\/p>\n\n\n\n

$ sudo nano \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n

Then add this line at the end of the file:<\/p>\n\n\n\n

vm.swappiness=10<\/code><\/pre>\n\n\n\n

Save and close the file to make the changes permanent. Now, that is how to add swap in Ubuntu 18.04 LTS.<\/p>\n\n\n\n

Adjusting the Cache Pressure Setting<\/h2>\n\n\n\n

We may now optionally modify is the vfs_cache_pressure <\/strong>setting which configures how much the system will choose to cache inode and dentry information over other data.<\/p>\n\n\n\n

vfs_cache_pressure<\/strong> is basically access data about the filesystem which is very costly to look up furthermore it is very frequently requested. This is a good example of data you want your system to cache. You can see the current value by querying the proc filesystem again:<\/p>\n\n\n\n

$ cat \/proc\/sys\/vm\/vfs_cache_pressure<\/code><\/pre>\n\n\n\n

Output<\/p>\n\n\n\n

100<\/code><\/pre>\n\n\n\n

The default 100 may not be ideal as it tells our system to remove inode information from the cache too quickly. We can set this to a more conservative setting like 50 by typing:<\/p>\n\n\n\n

$ sudo sysctl vm.vfs_cache_pressure=50<\/code><\/pre>\n\n\n\n

Output<\/p>\n\n\n\n

vm.vfs_cache_pressure = 50<\/code><\/pre>\n\n\n\n

We now need to make the change permanent by adding it to our configuration file like we did with our swappiness setting:<\/p>\n\n\n\n

$ sudo nano \/etc\/sysctl.conf<\/code><\/pre>\n\n\n\n

At the bottom, add the line that specifies your new value:<\/p>\n\n\n\n

vm.vfs_cache_pressure=50<\/code><\/pre>\n\n\n\n

Save and close the file when you are finished.<\/p>\n\n\n\n

Conclusion<\/h2>\n\n\n\n

The steps above should drastically reduce if not totally get rid of out-of-memory exceptions. Swap space, though useful, should be avoided on SSD-based storage in favor of optimizing your application configurations or upgrading your server RAM.<\/p>\n","protected":false},"excerpt":{"rendered":"

Here you will learn how to add swap in Ubuntu 20.04 LTS. This will help you out of-memory errors on your server if you find they are occurring. Swap space…<\/p>\n","protected":false},"author":1,"featured_media":8695,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,16],"tags":[184,354,431,433,449,531,573,591,598,636,643],"yoast_head":"\nHow to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)<\/title>\n<meta name=\"description\" content=\"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)\" \/>\n<meta property=\"og:description\" content=\"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-17T08:59:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-04T08:48:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"How to Add Swap Space in Ubuntu 20.04 LTS\",\"datePublished\":\"2020-06-17T08:59:47+00:00\",\"dateModified\":\"2021-12-04T08:48:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\"},\"wordCount\":1095,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg\",\"keywords\":[\"Debugging\",\"Linux\",\"Operating Systems\",\"Optimization\",\"Performance\",\"Server\",\"Systems Administration\",\"Tools\",\"Ubuntu\",\"Web Applications\",\"Websites\"],\"articleSection\":[\"Articles\",\"Guides\",\"How To\",\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\",\"url\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\",\"name\":\"How to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg\",\"datePublished\":\"2020-06-17T08:59:47+00:00\",\"dateModified\":\"2021-12-04T08:48:44+00:00\",\"description\":\"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg\",\"width\":1200,\"height\":630,\"caption\":\"Swap Space Ubuntu 20.04 LTS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Swap Space in Ubuntu 20.04 LTS\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/twitter.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)","description":"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors","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":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)","og_description":"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors","og_url":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2020-06-17T08:59:47+00:00","article_modified_time":"2021-12-04T08:48:44+00:00","og_image":[{"width":1200,"height":630,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"How to Add Swap Space in Ubuntu 20.04 LTS","datePublished":"2020-06-17T08:59:47+00:00","dateModified":"2021-12-04T08:48:44+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/"},"wordCount":1095,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg","keywords":["Debugging","Linux","Operating Systems","Optimization","Performance","Server","Systems Administration","Tools","Ubuntu","Web Applications","Websites"],"articleSection":["Articles","Guides","How To","Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/","url":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/","name":"How to Add Swap Space in Ubuntu 20.04 LTS (Focal Fossa)","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg","datePublished":"2020-06-17T08:59:47+00:00","dateModified":"2021-12-04T08:48:44+00:00","description":"This guide will show you how to add swap space in Ubuntu 20.04 LTS (Focal Fossa) to optimize memory usage and avoid lack of resources errors","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2020\/06\/swap-space-ubuntu-20.04.jpg","width":1200,"height":630,"caption":"Swap Space Ubuntu 20.04 LTS"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/add-swap-space-ubuntu-20-04-lts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"How to Add Swap Space in Ubuntu 20.04 LTS"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/twitter.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/8694"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=8694"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/8694\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/8695"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=8694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=8694"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=8694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}