Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

what is the linux swap using?

Posted on 2003-12-07
13
1,798 Views
Last Modified: 2008-02-26
hi, what is swap and function is linux when start to install linux.y should create a swap in the partition section?


from yap
0
Comment
Question by:Yap
  • 5
  • 4
  • 2
  • +2
13 Comments
 

Expert Comment

by:ppphex
ID: 9894866
The linux swap use as virtual memory. y can only create a swap in one or more independent partitions.
0
 
LVL 2

Expert Comment

by:TheWeakestLink
ID: 9896079
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
 
LVL 5

Accepted Solution

by:
willy134 earned 30 total points
ID: 9899318
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 2

Expert Comment

by:TheWeakestLink
ID: 9903134
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
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9910970
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
 

Author Comment

by:Yap
ID: 9917486
how to give the point to them since all are correct?
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9917538
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
 

Author Comment

by:Yap
ID: 9917619
ok.....then how to split?
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9917659
You will find 'Accept' button on the left hand side of each comment, just press it and accept serveral can split :)
0
 

Author Comment

by:Yap
ID: 9917713
cant make it.......
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9917828
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
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9917832
oh forgot to say post a 0 point request there will do
0
 

Author Comment

by:Yap
ID: 9917850
oh.......**** ..how i accept the answer already... how to modify it and split to willy??
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question