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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-22-2007, 04:40 PM
|
#1
|
|
LQ Newbie
Registered: Aug 2007
Distribution: Arch
Posts: 8
Rep:
|
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.
|
|
|
|
08-22-2007, 05:01 PM
|
#2
|
|
LQ Newbie
Registered: Aug 2007
Distribution: Debian GNU/Linux
Posts: 11
Rep:
|
Quote:
Originally Posted by Genestealer
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).
|
|
|
|
08-22-2007, 07:48 PM
|
#3
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:05 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|