Monday, September 28, 2015

SWAP Q & A PAGE - 1

SWAP  INTERVIEW QUESTIONS AND ANSWERS
PAGE - 1

1..Which partition is used for virtual memory by a Linux system?

swap
2..How to find out the usage of memory in linux?
# free –m
# vmstat –s
# top

3..What is Swap Space?
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.

4..How to create swap partition?
use fdisk  to create a partition for 250 MB change the partition type to swap
ready to use  the new partition  as swap
decide  the UUID,
add the new entry to /etc/fstab
decide the exact size of swap
Check the  and activate  the new swap partition
5..What are  the memory required for  swap space?
System RAM( GB)
Min Swap space ( GB )
up to 4 GB
Minimum 2 GB
4 GB to 16 GB
Minimum 4 GB
16 GB to 64 GB
Minimum   8 GB
64 GB to  256 GB
Minimum 16 GB

6..How to use the swap space?
swapon  /extra−swap
7..How  to  check the swap space?
free -m
8..What you mean  by swapping out?
The kernel keeps track of which memory pages that have not been accessed for a period of time to the swap space area called swapping out

9..Explain demand paging?
Linux implements demand paging, which means that pages are swapped in from disk
as needed, and swapped out to disk when no longer needed
10..How to enable the  swap?
swapon /device
11..How to disable the swap?
swapoff  /device

No comments: