What is RAM ?

The RAM is the most important resources while you are opting for the Hosting services. In the technical words, RAM stores the running applications on it. So how bigger is the RAM capacity that fast your server responds. The plans for a different kind of hosting are designed with different RAM capacities. You should analyze your website requirements and then proceed to select the suitable RAM for it. You can take the suggestion of the support team at Hostingraja they will help you analyze it in a better way. Further, you will always have an option to change your RAM configurations.

RAM  (Random Access Memory)  is the memory or information stored in a computer that is used to store running programs and applications to host your website.

How to check how much RAM your server is consuming?

“free -h” is the command used to check how much RAM is consumed by your server. In the shared hosting environment, you can run this command as you do not have an admin access, You can run this command only If you have bought a cloud VPS from HostingRaja.

The below will be an example how you can check and the details will be as below for a server with 8 GB RAM

Eg: server@localhost:~$ free -h

        total   used   free     shared  buffers cached

Mem:   7.8G   3.2G  4.5G   345M    94M    1.4G

Now you can see the system is having RAM free of 4.5GB and the server will be working fine.


When do you need to Upgrade your RAM?

If the free space less than 1GB than its time for you to upgrade your server RAM. Since the online servers or websites may need more resources at any point of time due to high hits or more online connections. This would simply avoid your server crashing down with out of memory.

What is Swap Memory?

Swap memory is used only on the Linux Platform servers.

If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.

How to check how much swap memory you have?

“free -h” will also show you the swap memory for the server.

server@localhost:~$ free -h

        total   used   free      shared buffers cached

Mem:      7.7G   3.4G   4.3G   343M    95M   1.4G

-/+ buffers/cache:   1.8G   5.9G

Swap:     1.0G     0B   1.0G

Here the swap memory is 1GB and you can see that 0 Bytes of swap memory is used.

How much is swap memory recommended ?

Swap memory can normally be double the RAM for small scale servers. But not to relay more on swap memories since that is a partition on the disk and the read-write time is more when compared to RAM.

How can you check which process has consumed more RAM ?

Use the below command on your shell environment and the output will give you all in detail.

ps aux  | awk ‘{print $6/1024 ” MB\t\t” $11}’  | sort -nr | head -n 20

Eg :

962.676 MB    /usr/lib/firefox/firefox

231.684 MB    remmina

180.871 MB    skype

170.207 MB    compiz

52.1367 MB    /usr/sbin/mysqld

You can either of the services or applications that is not required on your server and see if you can cut down the RAM usages. If you see an application that is consuming more RAM and that service is mandatory for your server. Then check if you could do something on the coding part of the application or else the other option would be simply upgrading the RAM.