Slackware - Installation This forum is for the discussion of installation issues with Slackware. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-03-2006, 03:47 AM
|
#1
|
Member
Registered: Aug 2003
Distribution: Slackware
Posts: 72
Rep:
|
how much swap do i have?
So I installed slackware and when I ran 'top', the line where it displays my Swap was:
Swap: 0k total, 0k used, 0k free, 148404k cached
did I somehow forget to setup a swap space? Or is it supposed to be like that? how do i check how much swap space I have?
So if I don't have a swap, how do I set one up now?
|
|
|
02-03-2006, 04:44 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
It sounds like you don't have any swap setup. You can use fdisk to see whether any of the partitions on your hard disk/s are set up as swap with /sbin/fdisk -l /dev/hda or /dev/hdb, etc. If you have a swap partition, you can run mkswap and swapon on it and add it to /etc/fstab with something like:
Code:
/dev/hda10 swap swap defaults 0 0
Alternatively, you can use a swap file instead of a swap partition. All of this depends on how much RAM you have and what you're using it for. Have a look at http://www.redhat.com/docs/manuals/l...ap-adding.html and http://www.tldp.org/HOWTO/Partition/....html#SwapSize while keeping in mind there's a lot of debate about how useful swap is these days given how much RAM is in a typical system.
|
|
|
02-03-2006, 04:57 AM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
Hi,
To check how much swap space you have, the command "swapon -s" will show something like that:
Filename Type Size Used Priority
/dev/hda5 partition 2104472 3108 -1
You need to have an unpartitioned space on one disk or you may install an old disk from your pile of trash :-) This is exactly my case. I have installed a old 10GBytes as a slave drive on the secondary IDE just for swap !
Anyway, use fdisk to create a partition for swap. Mark this partition as type 82 (Linux swap).
Them, "mkswap -c /dev/whatever" will create the swap structure on the specified partition.
The "-c" option is important for old disks because it will test the integrity of space.
How much space you need ? Well, there are several factors to take in account, but for personal systems with 512MBytes or less, 1G will be nice. Some people have the opinion that personal systems with 1G don't need swap at all.
Don't create a swap space very big, let say, >1G. It's better to have several smaller swap spaces rather than a multi-giga swap space. This is specially true if the swap space are in different disks. Again, I am talking about personal systems in regular hardware.
To activate the swap right now, issue the command "swapon /dev/whatever".
To activate the swap space at the next reboot, add the following line to your /etc/fstab file.
/dev/whatever swap swap defaults 0 0
|
|
|
02-03-2006, 01:59 PM
|
#4
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
Quote:
Originally Posted by marozsas
How much space you need ? Well, there are several factors to take in account, but for personal systems with 512MBytes or less, 1G will be nice. Some people have the opinion that personal systems with 1G don't need swap at all.
|
I have a 1 gig swap partition on mine, and I RARELY use more than 10% of it....And thats only when I have 2-3 Xserver sessions going at once (And I only have 256MB of memory, shared with my video...lol)
|
|
|
All times are GMT -5. The time now is 09:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|