PDA

View Full Version : Debian Swap Space



Altec_
09-02-2005, 04:30 PM
F1 works in Linux too ^_^

So, for any like users out there, my swap space is not being used/initialized, heres the fstab entry:


/dev/hda8 none swap sw 0 0
When I run free is says there are 0 bytes in use, though it does identify the size correctly. How o I enable swap in Debian? I found a tut at linux.com that uses swapon but that can't be found, and apt-get install swapon says invalid package.

Any help would be greatly appreciated!

Chilling_Silence
09-02-2005, 04:38 PM
Try the following from a terminal:
su -
[enter root password]
free -m
swapon /dev/hda8
free -m


Dont forget to add the " -" after su. This has to be done as root.

My thinking is it may not be the right partition?

My entry in /etc/fstab:
/dev/hda3 none swap sw 0 0

Cheers


Chill.

Jen
09-02-2005, 05:01 PM
When I run free is says there are 0 bytes in use, though it does identify the size correctly.That might be correct. How much RAM do you have installed?

My free shows this with no swap being used currently:

total used free shared buffers cached
Mem: 1035964 1026416 9548 0 230188 216356
-/+ buffers/cache: 579872 456092
Swap: 722696 0 722696

Altec_
09-02-2005, 05:29 PM
Chill, it's still using 100%, weird thing is, free & free -m give different results. I couldn't find waht the -m switch did in man free.


debian:~# free -m
total used free shared buffers cached
Mem: 503 260 243 0 13 125
-/+ buffers/cache: 121 382
Swap: 698 0 698
debian:~# free
total used free shared buffers cached
Mem: 515944 266472 249472 0 13832 128016
-/+ buffers/cache: 124624 391320
Swap: 714852 0 714852
debian:~#

Jen,

I have 512mb PC3200 install, but hopefully 1gb soon!'

Edit: Memory stats at present are 58% in use of which 31% is cache.

Jen
09-02-2005, 05:44 PM
Chill, it's still using 100%, weird thing is, free & free -m give different results. I couldn't find waht the -m switch did in man free.The -m switch just shows the units in megabytes.

Why do you think your swap isn't being utitilised when it is required? What happens when you run a few resource hungry apps (eg CD ripping/burning, opening large graphics etc) at the same time and then use "watch free" to see if swap is touched during this?

Altec_
09-02-2005, 05:56 PM
debian:~# free -m
total used free shared buffers cached
Mem: 503 483 19 0 19 205
-/+ buffers/cache: 259 244
Swap: 698 0 698

19mb left and still no swap usage :S Something musn't be right. I'm using Gnome 2.8 and kernel 2.6.8.2-k7-smp oh, this is Debian Sarge too.

Is there any app which can defrag memory and/or 'recover' it?

Jen
09-02-2005, 06:06 PM
19mb left and still no swap usage :S Something musn't be right. I'm using Gnome 2.8 and kernel 2.6.8.2-k7-smp oh, this is Debian Sarge too.Well I have 1024 MB of RAM with only 12MB free at the moment and my swap still shows 0 MB usage and yet it is used when required (not that I have checked this recently). Did you try to get the swap used by running a heap of things at once?

[edit]
OK, I just opened about 23 jpgs of about a total of 6MB in size simultaneously in Gimp (23 instances of Gimp also running) and managed to use some swap:

free -m
total used free shared buffers cached
Mem: 1011 1005 5 0 39 102
-/+ buffers/cache: 863 148
Swap: 705 11 694

Chilling_Silence
09-02-2005, 06:30 PM
No, this is right - You're in the mindset of comparing Windows to Linux.

Dont - Its different

Its telling you that you have 205MB of your RAM is just HDD Cache. Basically you can open a ton more applications before you have to worry about SWAP usage. Ive only used my SWAP on my laptop about 3x (512MB Ram). Dont think its ever been used on my Desktop (384MB, but less strained system... I compile less at once).

What you've got is fine - Dont worry about it, everything is normal :)

Altec_
09-02-2005, 10:50 PM
Thanks you two. Chill, yes, I am used to Windows always using the pagefile ALOT. Keep up the great work, I think you both do a great job keeping this forum running smoothly :)

VietSarge
13-01-2006, 11:00 PM
Hello all.

I found this thread as I am experiencing the very same problem as Altec_ has.

I am migrating from Windows to Debian Sarge, too, btw. (Linux 2.6, Sarge, Gnome, pretty much the same as Altec_)

What prompted me to look at memory usage was that as soon as I would try and open a long web page or download any larger file (but should this affect memory usage anyway?), i come down to a crawl.

I have tried to log free memory space and witness caching, but to no avail.

I wonder if there is something else preventing Mozilla from accessing the web OK.

Would you have any clue?

Chilling_Silence
14-01-2006, 07:48 AM
How much RAM do you have in your system?

What comes to a crawl? Your system, or the internet speeds? What else is open at the time?

You could try running "top" from the bash prompt to see if somethings chewing your CPU, or if its something else...

VietSarge
14-01-2006, 11:11 PM
Yes, you are right, Chill, I am not giving the entire picture here:

top does not show me any specific process that would be chewing up the memory, and yes, it is only the web that crawls. And especially downloading documents: up to 2% slowly then basically stop. (Mozilla)

When repeating the experience, i actually started as many things as possible (yet my installation is quite new and I don't have many ideas what to start nor many large picture files to open!)

I used
free -mo -s .5 to monitor and have a fair chance to see something happening. And top in another console.

As I am quite new, there must be a simple thing I overlooked? :help:

VietSarge
17-01-2006, 08:11 PM
Well, seems it was a hardware problem after all. :o