LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 08-22-2007, 04:40 PM   #1
Genestealer
LQ Newbie
 
Registered: Aug 2007
Distribution: Arch
Posts: 8

Rep: Reputation: 0
Linux hangs when swap gets full


So I using Mandriva 2007.1, I have 1Gb of ram, and I set 2Gb Swap partition.
My problem is when I using linux for couple of hours (surfing internet and using some applications) and my swap partition gets to 90% full, applications start to not responding, then everything hangs so i have to push the power off button. ctrl+alt+backspase won't work.

And even if swap is just 20% full, it hangs when I press ctrl+alt+backspace or trying to shut it down, it sounds like hdd is busy (loading or unloading something, maybe removing swap files, idk) but after several minutes still nothing happens, just black screen with not moving mouse pointer on it.

I tried "swapoff /dev/hda4" << my swap partition, but it says invalid argument.

Do you have any ideas what is this and how to make it work properly?

Any help is appreciated.
 
Old 08-22-2007, 05:01 PM   #2
virens
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian GNU/Linux
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by Genestealer View Post
So I using Mandriva 2007.1, I have 1Gb of ram, and I set 2Gb Swap partition.
My problem is when I using linux for couple of hours (surfing internet and using some applications) and my swap partition gets to 90% full, applications start to not responding, then everything hangs so i have to push the power off button. ctrl+alt+backspase won't work.
It`s too suspicious and seems like memory corruption. Can you run memtest86+ on your machine?

Moreover, you system consumes too much swap - try this as root:
Code:
echo "10" > /proc/sys/vm/swappiness
It should tell you system to use less swap.

And do not use reset button - there is magick in you kernel :-) Use SySRq \Printscreen button to sync data (alt+sysqr+s), safely remount partitions as readonly(alt+sysrq+u) and reboot (alt+sysrq+b).
 
Old 08-22-2007, 07:48 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225

Rep: Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790
Swappiness doesn't (directly) affect the usage of swap on your system. It changes the bias between using RAM for applicaion memory or for (disk) cache, so for some workload mixes it may avoid swap being allocated. If something keeps acquiring storage you'll start swapping regardless.

Sounds like the OP has a memory leak somewhere - FF has been a pig until recently. If you have the sysstat package installed (and active), there will be plenty of info there to spot the suspect. Else have a look at top - sorted on VIRT or RES or SWAP would probably show. I tend to run it in the background writing to a file for later analysis, but you might be able to spot your problem on-line.

BTW, the swapoff command will always fail if all the swapped pages can't be fitted back in RAM - this is the system protecting itself.
 
  


Reply

Tags
hangs, linux, mandriva, partition, swap


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
full swap means crash? D!lbert Linux - Newbie 3 02-01-2009 08:26 AM
Full swap make my box super slow tripmix Linux - Newbie 6 12-21-2006 07:41 PM
Adding more swap made system hangs ivanatora Linux - General 6 11-22-2006 03:50 PM
FC4 hangs on swap file. HELP hathmann Fedora 4 08-11-2006 06:42 AM
Partitioning hangs and blames swap paxmark Ubuntu 1 05-04-2005 12:46 PM


All times are GMT -5. The time now is 04:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration