LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu Server Won't Use Swap File (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-server-wont-use-swap-file-704787/)

xXCanisLupusXx 02-15-2009 05:57 AM

Ubuntu Server Won't Use Swap File
 
Hi, Basically I'm Still New To Linux, And I Seem To Be Having A Problem With Ubuntu Server Not Using My Swap File(Not Partition), And I Have No Idea Why, Iv Tryed Making A New One And It Still Doesn't Use It,

So I Thought Who Better To Ask Then You Guys =]!
I Know It'l Be Something Small Or Silly.

http://92.13.2.57/871532/swap.png
http://92.13.2.57/871532/ram.png

Thanks In Advance

repo 02-15-2009 06:00 AM

Perhaps it doesn' need to swap, since there is enough memory?

xXCanisLupusXx 02-15-2009 06:14 AM

I Guess But Isn't The Whole Point In A Swap File To Take Information Out Of Memory That Isn't Being Used Very Often?, Or Does It Only Kick In When Its At A Certain Point?.

Forgive Me I'm An Ex-Microsoft User.

reddazz 02-16-2009 09:06 AM

Swap doesn't always get used. I have a system with 768MB ram that I use as a desktop system and the swap is hardly touched.
Code:

free
            total      used      free    shared    buffers    cached
Mem:        775988    461840    314148          0      27576    233800
-/+ buffers/cache:    200464    575524
Swap:      506036          0    506036


repo 02-16-2009 09:24 AM

Hi,

Take a look at
http://www.xenotime.net/linux/doc/swap-mini-howto.txt

metrofox 02-16-2009 09:34 AM

There isn't any need of a swap. :) Don't worry, my swap doesn't do its job, too. It doesn't need to work :D lucky...

Tinkster 02-16-2009 10:20 AM

Quote:

Originally Posted by xXCanisLupusXx (Post 3444110)
I Guess But Isn't The Whole Point In A Swap File To Take Information Out Of Memory That Isn't Being Used Very Often?, Or Does It Only Kick In When Its At A Certain Point?.

Forgive Me I'm An Ex-Microsoft User.

Swap indeed only gets active when the kernel "thinks" it
can make better use of the RAM for other purposes. Not
having active swap is a good thing - it means there's
plenty of RAM for caching/buffering available, and there's
no need to try and make any use of RAM other processes
are still holding on to.

Code:

$ free
            total      used      free    shared    buffers    cached
Mem:      1021100    966832      54268          0    216144    258680
-/+ buffers/cache:    492008    529092
Swap:      996020          0    996020

Mine would eventually grow to a few 100K after a few
days of browsing w/o reboot, and viewing images and/or
watching movies.


All times are GMT -5. The time now is 09:21 PM.