what is the linux swap using?

hi, what is swap and function is linux when start to install linux.y should create a swap in the partition section?


from yap
YapAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ppphexCommented:
The linux swap use as virtual memory. y can only create a swap in one or more independent partitions.
0
TheWeakestLinkCommented:
Swap is a disk area used to hold RAM contents, either when a program's memory requirements exceed available physical RAM size, or when the kernel removes a program from RAM to let another program have a turn, or both.  
Swap can be a separate disk partition (it usually is), or a specially constructed file on an ordinary file system partition; ppphex is not quite correct in what he says (see mkswap and swapon).  It is recommended to always have some swap, especially if you have limited amounts of RAM (<256 or even 512M). Many distros will insist on some swap being present.

Paul
0
willy134Commented:
Most people recommend a swap drive of atleast the same size as your memory.  But for better results create the partition for double your memory.  While runing linux you can type top in a terminal and it will tell you what percentage of physical memory is being used and what percentage of swap is being used.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

TheWeakestLinkCommented:
Willy134 is right - at least 2x RAM is a good size.  

Be aware that "top" can give slightly misleading results.  It polls files in /proc at whatever interval is set, and gives a snapshot of processes at that instant.  

Also be aware that if you look at a linux box which isn't doing much, you will see that a very large percentage of physical RAM is taken by the kernel (I've seen 90 out 128MByte).  This might lead you to conclude that you need more RAM or that the kernel is a memory hog.  This is not necessarily the case - when nothing else is asking for resources, the kernel takes as much as it needs/wants.  When another program asks for the RAM, the kernel reduces it's own requirements accordingly (usually by swapping out parts of itself).

Paul
0
paullamhkgCommented:
Well they all give you the answer, just wanted to point out that the Max size of a swap is 2GB in linux, and most of the linux distro recomment to have 2x your RAM size swap partitions, and yes it's better to have swap partition during your installation.
0
YapAuthor Commented:
how to give the point to them since all are correct?
0
paullamhkgCommented:
I will recommend you to increase your points at lease to 30, and make a point split to Willy134 and TheWeakestLink, since 20 points not allow to split :)
0
YapAuthor Commented:
ok.....then how to split?
0
paullamhkgCommented:
You will find 'Accept' button on the left hand side of each comment, just press it and accept serveral can split :)
0
YapAuthor Commented:
cant make it.......
0
paullamhkgCommented:
Well try to send a request to EE admin and request them to help, just post your request here http://www.experts-exchange.com/Community_Support/ will do
0
paullamhkgCommented:
oh forgot to say post a 0 point request there will do
0
YapAuthor Commented:
oh.......**** ..how i accept the answer already... how to modify it and split to willy??
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.