Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have turned off swapping on my Ubuntu setup - it was causing heavy I/O and slowing things down. I'm okay working without the swap and using only the 4GB of RAM I have (computer doesn't support more than that).

My problem is that when the system runs out of memory, it finds the biggest memory hog (the browser - chrome or firefox) and asks it to kill a child. The process of doing this takes 20-30 minutes during which the computer is unusable and the HD is working like crazy.

Is there a way to still allow this to happen but for the child killing to take only a few seconds with no HD activity? What is causing the HD activity?

bonnie++ results on the HD:

Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
somenam-Satel 7344M   158  95 58280  24 21731  10   891  96 40872  12 137.0   7
Latency               118ms    1479ms    4195ms   23834us    1314ms    1219ms
Version  1.96       ------Sequential Create------ --------Random Create--------
somenam-Satellite-L -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  9326  43 +++++ +++ 15957  55 14409  60 +++++ +++ 16212  58
Latency             12778us    2074us   10070us     607us      98us    1096us
1.96,1.96,somenam-Satellite-       L500,1,1341321752,7344M,,158,95,58280,24,21731,10,891,96,40872,12,137.0,7,16,,,,,9326,43,+++++,+++,15957,55,14409,60,+++++,+++,16212,58,118ms,1479ms,4195ms,23834us,1314ms,1219ms,    12778us,2074us,10070us,607us,98us,1096us
share|improve this question

2 Answers 2

The system is not designed to run without a swap partition. You could reduce system swappiness by adding vm.swappiness = 10 to /etc/sysctl.conf but you should enable at least as much swap as you have physical memory. See here.

share|improve this answer
    
Doesn't swappiness = 0 mean no swap? –  Yon Jul 3 '12 at 10:42
    
It does. But that is not the same as just removing the swap partition. Rereading the OP, I see that he didn't just remove the swap partition as I thought he did (I've actually seen someone do this). I will revise my answer. Thank you Yon. –  dotancohen Jul 3 '12 at 10:45

I think you need to look at the wider issue here

I have turned off swapping on my Ubuntu setup - it was causing heavy I/O and slowing things down

Swap isn't that intensive - this may point at other issues on the system.

I'm okay working without the swap and using only the 4GB of RAM I have (computer doesn't support more

This would indicate its an older system - maybe hard drive issues? Can you run some tests ? bonnie++ or hdpharm may be good options for benchmarking, and smartmontools for general health issues.

What is causing the HD activity?

You can probably monitor this with iotop - this is in the ubuntu repos.

That said, its wierd that you're running out of ram with 4 gigs as well. Running a lighter WM may be an option.

share|improve this answer
    
Added bonnie++ results. During the bonnie run my entire computer froze. Is it possible the HD activity is impacting the OS that badly? iotop is useless during the times of high HD activity because I can't even switch a window. –  Yon Jul 3 '12 at 14:34
    
What do you mean by lighter WM? –  Yon Jul 3 '12 at 14:35
    
lighter window manager - say openbox or lxde. I'm really starting to think the hard drive is reacting badly to loads tho. I'll need to try this on one of my ubuntu systems as a comparison. –  Journeyman Geek Jul 3 '12 at 14:42
    
Switched to openbox, nice WM but I don't believe this will impact anything. –  Yon Jul 4 '12 at 5:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.