• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Add Swap or Virtual Memory on Rackspace Cloud Server (Ubuntu)

By Abhishek Ghosh August 13, 2014 11:18 am Updated on August 13, 2014

Add Swap or Virtual Memory on Rackspace Cloud Server (Ubuntu)

Advertisement

Here is how to add Swap or Virtual Memory on Rackspace Cloud Server Instance running Ubuntu 14.04 LTS. Swap can save instance from complete failure. However, on Rackspace Cloud, it is not recommended to use Swap or Virtual Memory to fight with RAM crisis. This guide to add Swap or Virtual Memory on Rackspace Cloud Server is for “increasing” RAM for temporary period – like that, while upgrading a system. Swapping is a terminology which is used for of Computer Hardware System Components, but here the phrase Swap refers to Virtual Memory. Official documentation about Swap can be found here :

Vim
1
https://help.ubuntu.com/community/SwapFaq

 

Why We Do Not Suggest To Add Swap or Virtual Memory on Rackspace Cloud Server?

 

People can still create swap partitions within their VM, but basically for the sake of Multi-Tenancy, Swappiness of VM is kept to 0 (zero) :

Vim
1
http://www.rackspace.com/knowledge_center/article/changes-to-swap-on-cloud-servers

To make the system more faster, smoothly running, we need to plan for any way of scaling. We can use OpenStack Heat templates ( read Rackspace Deployments ) to get a scalable infrastructure. Rackspace is never a budget saving option – it is for higher quality and higher redundancy. If we increase the RAM, our Networking, virtual cores also will get increased proportionately. A 2 GB server can perform better than an 1 GB server performance 1 flavor. Furthermore, Rackspace uses PVHM virtualization mode.
We can not give warranty whether Auto Scaling, Automated Image Building will work rightly on Rackspace after adding Swap or Virtual Memory.

Advertisement

---

Practically, this option is for web hosts like Digital Ocean where increasing RAM is kind of linear. There, if one uses a 1 GB server, adding 500 MB can do better as simply the cost will remain down and increasing to 2 GB will not provide any better virtual processor. Hostgator like web hosts with no own Data Center can use the infrastructure of Rackspace, possibly they do not use Swap.

One can monitor Swap memory on Cloud Intelligence Graph (beta at the time of publishing this guide). Cloud Intelligence Graph supports Swap’s tracing, but actually we need not use it. 1 GB server will outperform a 512 MB server on Rackspace. This is, in the same way true for Amazon, Azure, Fujitsu etc. leading A grade Cloud IaaS providers. Shared Hosting is also required – we do not need all our domains to have a bigger infrastructure. But basically adding Swap to a 512 MB Instance on Rackspace will not do any good – the cost of 1 GB is not huge, the cost of bandwidth is same for all. Where horizontal scaling with five 1 GB will perform better than one 4 GB server, we can not tell it – you need to talk with Rackspace. It depends on many parameters.

Also, increasing RAM might hide a defect – it is abnormal if a WordPress site demands a 32 GB server. The infrastructure is either not optimized or the Application Server’s instance has issues – like database might need a repair. For high load, we obviously server with cache. Caching at front end can bring disaster. That theory is for old servers, Bare Metal and Dedicated Server.

When we will need to detach the device ( like for going to rescue mode, adding more SSD storage device ), this Swap might create problem. So at least take a Server Image snapshot if you are going to do it for production server.

Add Swap or Virtual Memory on Rackspace Cloud Server (Ubuntu)

 

How To Add Swap or Virtual Memory on Rackspace Cloud Server

 

So the space on the hard drive will be used when RAM is no longer sufficient for running the instance. There are many ways to add Swap. You can read Rackspace’s guide ( read the comments too ) :

Vim
1
http://www.rackspace.com/knowledge_center/article/create-a-linux-swap-file

By default there is no Swap, so if we run :

Vim
1
sudo swapon -s

it will return a blank table :

Vim
1
Filename                Type        Size    Used    Priority

You will get response if you run :

Vim
1
fallocate -l 4G /swapfile

Verify :

Vim
1
ls -lh /swapfile

Proceed :

Vim
1
2
3
chmod 600 /swapfile && ls -lh /swapfile
# run this command separately
sudo mkswap /swapfile

You will get return like “Setting up swapspace version 1, blah blah blah…”. Now you can enable and check :

Vim
1
sudo swapon /swapfile

You can check by running :

Vim
1
sudo swapon -s

This is temporary swap. It will go away on reboot. This is what actually need for emergency.
If you want to make this Swap permanent, you need to follow these steps :

Vim
1
2
3
4
5
6
7
8
9
10
11
sudo nano /etc/fstab
# add this, use tab key to separate properly
/swapfile   none    swap    sw    0   0
# write out with ^ + O , Exit with ^ + X
# check swaminess
cat /proc/sys/vm/swappiness
# it should return a value closer to 0
# this command can change the value
sudo sysctl vm.swappiness=10
# swappiness=10 is set in /etc/sysctl.conf file, we can manually open it
nano /etc/sysctl.conf

Another parameter is cache_pressure, in the same way :

Vim
1
2
3
4
5
6
cat /proc/sys/vm/vfs_cache_pressure
# will return something
# changes the value
sudo sysctl vm.vfs_cache_pressure=50
# vfs_cache_pressure=50 is set in /etc/sysctl.conf file, we can manually open it
nano /etc/sysctl.conf

You should stop where we wrote “This is temporary swap” for production server. With wrong value or even if this Swap is eaten up and for some reason you need to go to rescue mode, you’ll probably forget your fathers’ name. Fix your RAM consumption. VMs are not for adding more virtual…

Tagged With can you increase ram on shared servre in rackspace , optimized memory swamp ububtu , rackspace cloud server memory increase , what is swap for cloud

This Article Has Been Shared 875 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Add Swap or Virtual Memory on Rackspace Cloud Server (Ubuntu)

  • Google F1 : Distributed RDBMS replacement for MySQL

    Google F1, The Fault-Tolerant Distributed RDBMS is targated to be replacement for MySQL. This claimed to be perform better like serving Ads from crap servers.

  • Cloud Computing Benefits for Small Business

    Cloud Computing Benefits for Small Business are not that focused than the providers do to show advantages for the Enterprises. Strategy can make ROI more.

  • GoDaddy Buys Media Temple : Thoughts and Ideas

    GoDaddy Buys Media Temple – four days has been passed since we all know about the acquisition. Thoughts and Helps for the old Clients and technical notes.

  • Technical Aspects of Data Security in the Cloud

    Technical aspects of data security in the cloud is one of the main reason why the companies or the end users thinks to be in the cloud. Here is a discussion.

  • Browser Based Chat, Screen Sharing System With HTML5 WebRTC

    Browser based chat including video chat, Screen Sharing are possible with HTML5 WebRTC. Here are some resources which you can run on Cloud as App.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cutting Out The Coding: Serverless Computing In Action May 24, 2022
  • Types of Blackjack Variants: Discover the Different Versions of the Game May 23, 2022
  • How Cloud, Robotics And Sensor Technologies Are Changing The Business Landscape May 23, 2022
  • Modernizing Your Business With a Hybrid Cloud Strategy May 22, 2022
  • Big Data in Sports May 20, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Add Swap or Virtual Memory on Rackspace Cloud Server (Ubuntu)," in The Customize Windows, August 13, 2014, May 25, 2022, https://thecustomizewindows.com/2014/08/add-swap-virtual-memory-rackspace-cloud-server-ubuntu/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy