View previous topic :: View next topic |
Author |
Message |
enchong Tux's lil' helper
Joined: 31 Oct 2004 Posts: 97
|
Posted: Mon Nov 29, 2004 3:41 pm Post subject: how do i enable swap? |
|
|
hi guys!
how do i enable my swap?
i just noticed that on KDiskFree there is no swap entry. all it shows is:
/dev/cdroms/cdrom0
/dev/cdroms/cdrom1
/dev/fd0
/dev/hdc2
/dev/hdc4
i made a swap partition on /dev/hd3
here is my /etc/fstab:
Code: |
/dev/hdc2 /boot ext2 auto 1 2
/dev/hdc3 none swap sw 0 0
/dev/hdc4 / ext3 auto 0 1
none /proc proc defaults 0 0
none /proc/bus/usb usbfs defaults 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,user 0 0
/dev/cdroms/cdrom1 /mnt/cdrom1 auto noauto,user 0 0
|
what do i do to enable swap? i rember doing a "swapon /dev/hdc3" when i was installing gentoo. now it does not work
thanks! _________________ it's all in the mind... |
|
Back to top |
|
|
zecora l33t
Joined: 17 Aug 2004 Posts: 627 Location: Minneapolis, MN
|
Posted: Mon Nov 29, 2004 3:44 pm Post subject: |
|
|
ok so /dev/hda3 is your swap correct?
if so this is how i enable mine.
Code: | mkswap /dev/hda3
swapon /dev/hda3 |
That is with the livecd in.
type df and post that, next type top. When you do that there should be a swap line see if that is being used. |
|
Back to top |
|
|
markkuk Guru
Joined: 29 Nov 2002 Posts: 446
|
Posted: Mon Nov 29, 2004 10:17 pm Post subject: Re: how do i enable swap? |
|
|
enchong wrote: | how do i enable my swap?
i just noticed that on KDiskFree there is no swap entry.
|
Right, KDiskFree doesn't show your swap space because it's not a mounted filesystem. See your /etc/fstab, if it has an entry for your swap partition then everything is OK. You can also use "cat /proc/swaps" to see if swap is in use. |
|
Back to top |
|
|
enchong Tux's lil' helper
Joined: 31 Oct 2004 Posts: 97
|
Posted: Tue Nov 30, 2004 10:58 am Post subject: |
|
|
hi guys!
thaks for your quick replies!
here is the result of "cat /proc/swaps"
Code: |
Filename Type Size Used Priority
/dev/ide/host0/bus1/target0/lun0/part3 partition 4120664 0 -1
|
so i guess its in use then. but how come my system is still slow? they say gentoo is fast. is it because i did a stage 3 install? and compiled the gentoo kernel instead of my own kernel configuration?
i have a P4 1.7 ghz, 512sdram and i forgot how big the swap space was thinks it was like 256mb? i dunno. how do i know the size of my swap?
thanks again! _________________ it's all in the mind... |
|
Back to top |
|
|
BoGs Tux's lil' helper
Joined: 24 Nov 2004 Posts: 88 Location: Canada Ehhh...!?!
|
Posted: Tue Nov 30, 2004 12:59 pm Post subject: |
|
|
you should make your swap 2x the amount of ram
ex. i have 512 meg so i made my swap 1024meg from a 8 gig drive it hurt
and i think you can put the live cd in let it boot then cfdisk or something along there and show all your partitions that program shows you the size of the partition unlike the fdisk shows the blocks i think...... REMEMBER DONT COMMIT ANYTHING or it might screw it up _________________ 'It is the mark of an educated man to teach without a thought.' - Aristotle
Linux Registered User #: 381920 |
|
Back to top |
|
|
Lotu Tux's lil' helper
Joined: 12 Sep 2004 Posts: 106 Location: Finland
|
Posted: Tue Nov 30, 2004 1:01 pm Post subject: |
|
|
enchong wrote: | so i guess its in use then. but how come my system is still slow? they say gentoo is fast. | There could be a million reasons. Give the command 'top' to console and see if some process takes large amounts of process time and/or memory. Other reasons might be that you don't have dma enabled* on your drives or you're running something really bloated. (Like KDE )
Quote: |
is it because i did a stage 3 install? and compiled the gentoo kernel instead of my own kernel configuration? | Probably not. The point of stage 3 and Gentoo itself is to compile stuff specifically to your hardware. Same with kernel - you exclude stuff you don't need.
EDIT: Sorry, I mixed up stages 1 and 3. No, stage 3 isn't slow. The others are marginally faster. And stage 3 "becomes" stage 2 in time, because the programs are recompiled when updated.
Quote: | i have a P4 1.7 ghz, 512sdram and i forgot how big the swap space was thinks it was like 256mb? i dunno. how do i know the size of my swap?
| The size of the swap is the size of the partition which is used for swap. In this case probably /dev/hda3.
But what you really need is a line in /etc/fstab to mount swap automatically. Like this:
Code: |
/dev/hda3 none swap sw 0 0 |
You don't need mkswap and swapon commands if this line is correct.
*) Search the forums for hdparm. _________________ In a world without walls and fences, who needs Windows and Gates?
I'm an evil homosexual communist. |
|
Back to top |
|
|
|