0

Hello there i have 4 gigabyte of ram installed in my system but only 1.5 gigabyte is used and other ram sapace is in the form of swap space. But i want to use those also. Is it possible?

             total        used        free      shared  buff/cache  available
Mem:           3847        1547         104         231        2194        1810
Swap:          2047         156        1891

I am new to UBANTU so i have this doubt.Please help

  • You do not have RAM as swap. all your RAM, - some reserved by BIOS and kernel, is available for your use. As of your snapshot, you are only using 1.547 Gigs. – Doug Smythies Nov 16 '19 at 15:17
  • How can i use it fully can you explain please... – Manas Ranjan Pati Nov 16 '19 at 16:46
  • It will be used automatically and as required. If, for some reason you want to forcibly use it all, then see [here](https://askubuntu.com/questions/1188024/how-to-test-oom-killer-from-command-line). – Doug Smythies Nov 16 '19 at 17:29

2 Answers2

2

Your memory is being fully utilized.

If you look at:

             total        used        free      shared  buff/cache  available
Mem:           3847        1547         104         231        2194        1810

note the columns shared and buff/cache... this is currently unused memory that is used for file and disk buffers/cache.

This line:

Swap:          2047         156        1891

indicates that swap is also being used. Swap is used by the system to store recently unused active memory pages. Swap is not RAM space.

heynnema
  • 68,647
  • 15
  • 124
  • 180
0

Note that there is a difference between RAM and swap. Swap Space is Linux is nothing but a Virtual Memory composed of Hard Disk space used as Main Memory. In case, if RAM is not sufficient to handle the processes, this swap memory will be used.

Modern computers, nowadays, may not need Swap space at all, as we got to get at least 4GB RAM which is enough to handle most of the tasks. But Earlier days (15 years ago), the RAM would be usually a maximum of 1GB, so Swap space play a role in computing.

Memory will be used depending on the type of application. If you use text editor such as gedit, it will use less RAM. But instead of it you use chrome, it will use a lot of memory.

Tejas Lotlikar
  • 2,875
  • 5
  • 16
  • 26
  • 1
    re: "Swap Space is Linux is nothing but a Virtual Memory composed of Hard Disk space used as Main Memory."... not **exactly** correct... it's **not** used as "Main Memory"... it's used to store **recently unused active memory pages**. – heynnema Nov 16 '19 at 21:00
  • I have tried to explain him in very simple terms without going into technicals – Tejas Lotlikar Nov 17 '19 at 01:19
  • Well, you might as well explain accurately. – heynnema Nov 17 '19 at 03:36
  • postnote: **all** computers need swap, irrespective of how much RAM is installed. – heynnema Nov 17 '19 at 15:07