LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2005, 02:09 AM   #1
lydgate
Member
 
Registered: Jun 2005
Location: Fullerton, CA
Distribution: Arch 0.7.1 (laptop) / Slack 10.2 (desktop)
Posts: 41

Rep: Reputation: 15
What is the swap for?


Okay, so I have been trying to get suspend2 working on my laptop (eMachines m2352 running Slackware-current, kernel 2.6.13.3), and it panics. But during the process of setting this up, I realized that /dev/hda5, which was set as my swapspace, had never been activated with mkswap, because I was trying to suspend to my swapspace, and it wasn't letting me, saying there was 0 space there.

Anyway, so I ran mkswap /dev/hda5 and swapon /dev/hda5, but I noticed that no matter what I have running (as far as I can tell), top always indicates that 0k of swap is used. So what is it for, and if it's still not getting used, how can I fix this? Let me know what other information I should post.
 
Old 10-05-2005, 02:18 AM   #2
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Run more processes and you can get that swap used (compile a kernel, and open a bunch of X applications at the same time).

Swap is used when you run out of RAM.

It's a GOOD thing that your swap tends to stay at 0.
 
Old 10-05-2005, 11:34 AM   #3
lydgate
Member
 
Registered: Jun 2005
Location: Fullerton, CA
Distribution: Arch 0.7.1 (laptop) / Slack 10.2 (desktop)
Posts: 41

Original Poster
Rep: Reputation: 15
I can't seem to open enough X programs to use any of the swap. It doesn't just tend to stay at 0, I've never even seen a kilobyte of it used, even when I have basically run out of ram . . . But I shouldn't worry about this?
 
Old 10-05-2005, 11:51 AM   #4
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
have you recompiled your kernel? Did you enable swap in the kernel config??
 
Old 10-05-2005, 02:11 PM   #5
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
How much RAM do you have? If you have a bunch (ie: 1gb+) it is likely that you won't touch swap, unless you open every application you own. I stopped putting swap on my machines once I hit 1gb of RAM, even a 512mb system doesn't tend to use swap.
 
Old 10-05-2005, 02:50 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
True: my new toy here at work has 16GB and I haven't
seen it swap yet ... :D


Cheers,
Tink
 
Old 10-05-2005, 04:27 PM   #7
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
nice *toy* you got Tinkster! lol

In the office's computer I have got 784 mb in RAM, it starts to swap when I use a winxp virtual machine which I have for office purposes, though my laptop has 512 RAM and it never swaps even when I'm playing UT2004
 
Old 10-05-2005, 04:37 PM   #8
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Yeah! I think the SWAP partition is becoming less and less needed nowaday's with all the ram available for processes... I still add a half Gig swap to all my particians anyway... Never tried to install a disto with no SWAP partition... I guess it would not matter but don't really know if it is really needed during the install.

KC
 
Old 10-05-2005, 05:05 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
nice *toy* you got Tinkster! lol :D

In the office's computer I have got 784 mb in RAM, it starts to swap when I use a winxp virtual machine which I have for office purposes, though my laptop has 512 RAM and it never swaps even when I'm playing UT2004
Well, I'm certain that once Oracle is up and running on
it I *will* see swapping.


Cheers,
Tink
 
Old 10-05-2005, 05:11 PM   #10
yuchai
Member
 
Registered: Jan 2005
Location: New York, NY
Distribution: Slackware 13.0
Posts: 56

Rep: Reputation: 15
I've seen swap used when running VMWare. Anyhow with the price per GB of hard drives these days, might as well use a 1GB or so swap partition for peace of mind. What's that..like 60 cents USD?
 
Old 10-05-2005, 05:24 PM   #11
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally posted by Tinkster
Well, I'm certain that once Oracle is up and running on
it I *will* see swapping.


Cheers,
Tink
maybe not even with an Oracle instance running lol

we have in the office a SAP / Oracle system with 4 GB RAM (11 GB of swap configured) in unix solaris with around 100 active users and never swaps a bit
 
Old 10-05-2005, 06:02 PM   #12
lydgate
Member
 
Registered: Jun 2005
Location: Fullerton, CA
Distribution: Arch 0.7.1 (laptop) / Slack 10.2 (desktop)
Posts: 41

Original Poster
Rep: Reputation: 15
I have 512 RAM, it's a laptop, I'm not doing anything super intensive but I was just wondering whether it should be getting used at all. Yes, I have recompiled my kernel, I will check in there to see if I disabled it somehow, where exactly is the option?
 
Old 10-05-2005, 06:30 PM   #13
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
This is all, I believe

Code:
shilo@shilo2:~$ cat /boot/config-2.6.13.2 |grep -i swap
CONFIG_SWAP=y
CONFIG_X86_BSWAP=y
 
Old 10-05-2005, 11:37 PM   #14
lydgate
Member
 
Registered: Jun 2005
Location: Fullerton, CA
Distribution: Arch 0.7.1 (laptop) / Slack 10.2 (desktop)
Posts: 41

Original Poster
Rep: Reputation: 15
I get

Code:
CONFIG_SWAP=y
CONFIG_X86_BSWAP=y
along with a few suspend2 things

so i guess i just have enough ram to open a bunch of X apps
 
Old 10-06-2005, 01:57 AM   #15
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
If you really want to see your swap get used, fire up one of the big-dog DEs (KDE/Gnome). Then, install azureus (that seems to use up memory REALLY well (300+MB well, sometimes)). Fire up a couple terminal emulators, a few web browsers (firefox is good for 100+MB), and start browsing. Shouldn't take too long.

I run Azureus, Gnome, Firefox (lots of tabs), Evolution, gnome-terminal, and rhythmbox all at once pretty frequently. With 512MB ram, I can just start swapping a little.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
Swap os2 Linux - General 1 03-18-2005 08:21 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM
Swap punker22 Linux - Newbie 3 10-14-2003 12:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration