-2

In Linux we have a swap memory right. the system will use swap memory if ram memory is full.then what is require of RAM we can use directly swap memory.

closed as primarily opinion-based by Anthon, user79743, slm Feb 8 '16 at 5:11

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • If there is no swap active, you have no right to swap memory into it. Or do you mean "a swap memory to the right" (whatever that may be, my disks are on the left)? – Anthon Feb 8 '16 at 3:18
3

Swap space is located on hard drives, which have a slower access time than RAM.

Also the CPU cannot access/address hard drives directly because there is no direct physical data connection between the CPU and the HDD.

0

CPU cache is far faster than RAM but there is very precious little of it, and so the CPU stores its most needful data which it cannot fit within its own cache in the system's random access memory banks. But RAM soon runs out too, and it is stateless besides and so the system stores data which must survive power loss or else which isn't currently as valuable to it as somewhat else might be on some kind of stateful disk drive, which is generally much slower than the system's RAM banks.

Yes, your system might swap random data to and from its permanent storage device(s) when RAM fills, but it doesn't do so cheaply.

0

Swap space in Linux is used when the amount of physical memory (RAM) is full. 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 is a good thing and its virtual memory used on the hard disk, Linux actually create a disk partition for swap, it should be dubble of your system RAM. When you run out of memory Swap used only for temporary usage.

Not the answer you're looking for? Browse other questions tagged or ask your own question.