LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2004, 01:36 AM   #1
bishal
LQ Newbie
 
Registered: Feb 2004
Location: Nepal
Posts: 25

Rep: Reputation: 15
Angry swap space not being used


Hi,

I just reformat and install with the Redhat 8.0 linux , everything
seems fine.

The problem is with the swap partition, it is NEVER get used, I can
swapoff it, no problem. Just that it's not used at all

-----------------------------------------------------------------------
# more /proc/swaps

Filename Type Size Used Priority
/dev/hda8 partition 522072 0 -2

--------------------------------------------------------------------
#fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 64 514048+ 83 Linux
/dev/hda2 65 5826 46283265 83 Linux
/dev/hda3 5827 7131 10482412+ 83 Linux
/dev/hda4 7132 9729 20868435 f Win95 Ext'd (LBA)
/dev/hda5 7132 8175 8385898+ 83 Linux
/dev/hda6 8176 8828 5245191 83 Linux
/dev/hda7 8829 8959 1052226 83 Linux
/dev/hda8 8960 9024 522081 82 Linux swap
---------------------------------------------------------------
 
Old 05-06-2004, 02:21 AM   #2
dopefish
Member
 
Registered: Nov 2003
Location: Northcliffe, WA
Distribution: Slackware 12.0
Posts: 481

Rep: Reputation: 30
Whats your /etc/fstab say?
Try reformatting it as a swap, my swap stopped working once so i just reformatted it as swap and it was working again
mkswap /dev/hda8
 
Old 05-06-2004, 02:21 AM   #3
newinlinux
Member
 
Registered: Dec 2003
Location: Next to Equator
Distribution: GNU/Linux 2.6.14
Posts: 382

Rep: Reputation: 30
could simply be the RAM of your pc is sufficent for all the services and processes to use. I have only 200MB, I don't get to see it being used very often too.
 
Old 05-06-2004, 06:29 AM   #4
bishal
LQ Newbie
 
Registered: Feb 2004
Location: Nepal
Posts: 25

Original Poster
Rep: Reputation: 15
swap space not used

Hello Dopfish


I try reformating it again as swap "mkswap /dev/hda8" but it didn't worked. Below is my /etc/fstab file

-----------------------------------------------
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr/local/squid /usr/local/squid/cache ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/hda8 swap swap defaults 0 0

------------------------------------------------
 
Old 05-06-2004, 06:55 AM   #5
dopefish
Member
 
Registered: Nov 2003
Location: Northcliffe, WA
Distribution: Slackware 12.0
Posts: 481

Rep: Reputation: 30
How much ram have you got and how much of it gets used?
 
Old 05-06-2004, 10:57 AM   #6
bishal
LQ Newbie
 
Registered: Feb 2004
Location: Nepal
Posts: 25

Original Poster
Rep: Reputation: 15
Hello below is my output of "$cat /proc/meminfo" file.


----------------------------------------------
total: used: free: shared: buffers: cached:
Mem: 259768320 239251456 20516864 0 63852544 70922240
Swap: 534601728 0 534601728
MemTotal: 253680 kB
MemFree: 20036 kB
MemShared: 0 kB
Buffers: 62356 kB
Cached: 69260 kB
SwapCached: 0 kB
Active: 141228 kB
Inact_dirty: 32464 kB
Inact_clean: 44512 kB
Inact_target: 43640 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 253680 kB
LowFree: 20036 kB
SwapTotal: 522072 kB
SwapFree: 522072 kB
Committed_AS: 137788 kB
-------------------------------------------------------
 
Old 05-06-2004, 11:27 AM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
There's nothing wrong with that. You've 256 of RAM and about 50 is being used:

MemTotal: 253680 kB
MemFree: 20036 kB

Meaning you have 200 free. Why would you want swap to be used if the RAM is being used effectively?
 
Old 05-06-2004, 12:29 PM   #8
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
Quote:
Originally posted by Megaman X
There's nothing wrong with that. You've 256 of RAM and about 50 is being used:

MemTotal: 253680 kB
MemFree: 20036 kB

Meaning you have 200 free. Why would you want swap to be used if the RAM is being used effectively?
Think you've maid a small mistake here... 20036 kB = +- 20 Mb != 200 Mb

So I think should start to swap, since 230 Mb is used...
 
Old 05-06-2004, 01:06 PM   #9
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Argh, I've missed an evil zero . Thanks mate!
 
Old 05-06-2004, 01:36 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Its a good thing when swap isn't being used, it does mean your RAM is being used efficiently. Just like on a server, if swap is ever touched, it means something is wrong or you need more physical RAM.
 
Old 05-06-2004, 02:27 PM   #11
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Yes, swap is rarely used unless the machine doesn't have much memory (below 64 MB) or is doing something very intensive.

Swap is an emergency measure, if the system is using it, it is near the red line performance wise.

None of my machines even touch the swap, not even the servers.
 
Old 05-06-2004, 02:33 PM   #12
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
good to leave it turned on anyway, though, some programs behave strangely if they cant find a swap, even if it doesnt need to be used, they just like to know its there, i use two swap partitions (each one on a different disk), and i have 1.5G of ram, never even seen the swap touched, dont worry, thats normal
 
Old 05-06-2004, 04:41 PM   #13
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
true, but if only you run out of ram and don't have any swap to back it up, DAMN! I had it once, don't ask me how it happened, but my swap partition wasn't mounted, well since I have only 128MB RAM, it was SloMo
 
Old 05-06-2004, 07:21 PM   #14
bishal
LQ Newbie
 
Registered: Feb 2004
Location: Nepal
Posts: 25

Original Poster
Rep: Reputation: 15
Looks like no one is going to help how to activate my swap space. As my server is running squid proxy only. SO I need swap to be used by squid.
Any help????
 
Old 05-06-2004, 08:45 PM   #15
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Looks like no one is going to help how to activate my swap space.
Your system will use it when it is needed, there is no way to "activate" it before your system runs out of RAM. You wouldn't want to anyway, since it is much slower than true RAM.
 
  


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
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 07:05 AM
swap space alphisb0t Linux - Software 1 07-05-2004 03:16 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
how much swap space porous Linux - General 9 10-27-2003 08:24 AM
Swap Space bawbag Slackware 6 07-16-2003 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:38 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