LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-12-2004, 02:02 PM   #1
raid517
Member
 
Registered: Feb 2002
Posts: 393

Rep: Reputation: 30
No swap being used???


Hi, well this is deeply confusing. I made a swap file of 1GB in Mepis Linux - but no matter what I do, it seems Mepis refuses to use it.

Previously (on a prior install) I discoverd that this was due to the Mepis automatic fstab configuration utility messing my partition table up. It had listed the swap partition as /boot the /home patition as swap, the swap partition as /home and so on. A very silly bug in other words.

Fixing this brought my swap partition online - and in the process brough memory management in KDE under control - going from 480MB usage when idle to 90 - 96MB. While all in all is a lot easier to live with.

But this time round, fstab looks OK - yet my swap partition still isn't being used - and I am back up to and stuck at 480MB (of 512MB) for avereage/idle usage.

My Fstab file currently looks like this:

Code:
/dev/hda4 / reiserfs defaults,noatime,notail 0 0
/dev/hda2 none swap defaults 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/hda3 /home reiserfs defaults,noatime,notail 0 0
# Dynamic entries
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/sda1 /mnt/sda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,users,dev,ro 0 0
/dev/floppy /mnt/floppy vfat,ext2,hfsplus noauto,users,dev 0 0[
My guess is that Mepis is doing some kind of dynamic disk mounting stuff - and has pretty much taken to ignoring fstab.

swapon -s reports:

Filename Type Size Used Priority
/dev/hda2 partition 996020 0 -1


So hda2 is recognised as swap. It just isn't being used.

What on Earth I wonder is going on?

GJ
 
Old 10-12-2004, 02:17 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
How much RAM do you have? One must leave the windows mentality behind.

http://www.linuxquestions.org/questi...t=memory+usage

http://www.linuxquestions.org/questi...t=memory+usage
 
Old 10-12-2004, 02:23 PM   #3
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
thats a good thing, 1 gig is a bit large though. swap is slow compared to ram. it's best not to use it at all if possible.
 
Old 10-12-2004, 03:36 PM   #4
raid517
Member
 
Registered: Feb 2002
Posts: 393

Original Poster
Rep: Reputation: 30
I read that pages thanks and understand a little better. Things changed between 2.4x and 2.6x.

But nonetheless there is still no swap useage.

Even if I try for example searching a disk - which will always generally generate some swap useage - I can't see anything at all.

I don't mind if the system want's to use alll my memory for cache - but I think this is confusing two issues. One is high memory usage (Ok I can live with that) and the other is zero swap usage under any conditions. (Which isn't normal).

I literally cannot do anything no matter how intensive to make the system access swap space. Even if I rip a TV show, search a harddisk and start playing some kind of media/music file at the same time, swap is literally never touched.

We are talking about what is the difference between normal and abnormal behavour?

Currently I might as well not have a swap partition - because it is just not being used under any circumstances.

If you can think of a scenario which would normally force it to be used, I would happily try. (Like tell the sytem to try some test swap operation).

I'm open to ideas.

I think focusing on the zero swap usage might be more productive.

GJ
 
Old 10-12-2004, 07:50 PM   #5
raid517
Member
 
Registered: Feb 2002
Posts: 393

Original Poster
Rep: Reputation: 30
Bump...
 
Old 10-12-2004, 09:56 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
you have to think of all RAM as virtual and all of it an abstraction.
for instance when you talk about search harddisk
blocks read from the block device (hard drive) are packed in buffer pages in page cache
now there is never ever any reason to swap that stuff out cause it's already on the disk !
lots of stuff you use in RAM is this way -- it's already backed by something physical on the disk.
all libs and all program binary info is already on disk.
video files, music files are aleady on disk as well.
you are certainly not going to make a copy of the hard disk on the hard disk so you can read it faster than you can read it from the hard disk ??? follow ?
mostly only memory pages mapped to processes are ever even cantidates for swap
so only a process that generates lots of memory pages and then moves on and doesn't use them anymore
will generate cantidates for swapping... (memory leaking or say video or audio editing might do this)
where you have video or audio information that is not on disk or being written to disk. even ripping a tv show is writing it's buffer to disk already no need to swap that stuff.
shared pages are always allocted swap space (added to swap cache) immediately in case they are cleared out but they are not actually written out until they are cleaned up and generally shared pages are being used and don't get into the inactive list.
otherwise old pages are just discarded because they are backed by physical media.
if you look at your process list kswapd is the pageout daemon. (mm/vmscan.c)
so it's running just not being needed
like rshaw said (a la martha stewart, may she stand strong against tyrany)
it's a good thing
 
  


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 - Software

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