0

I'm having a strange problem with a new clean install of Ubuntu 12.10, any disk operations I do, like restoring a backup eats all my 8gb of ram, and it doesn't seen to release the memory, so I'm using swap.

It looks like a memory leak, but I don't know if I'm right.

I don't know where to begin for diagnose this things.

Details: I don't have any applications open, except my backup being restored by ubuntu's backup application (duplicity). I'm monitoring the memory utilization by htop and free. I know there's a lot of cached memory, but the system becomes slow and I'm using swap, so I think the kernel or whatever it is causing this problem is not freeing cache when requested.

bender
  • 1,804
  • 15
  • 24
loop0.brs
  • 1
  • 3
  • How exactly did you find out that disk operations consume all your memory? Do you know that Linux is using all available RAM for I/O caching purposes? This kind of consumption doen't really use up available RAM space, this space is immediately released when an application requests it. See [this](http://stackoverflow.com/questions/599719/how-to-clean-caches-used-by-the-linux-kernel) post for details of how to manually free this part of memory. – bender Jan 16 '13 at 00:26
  • I'm monitoring with htop and I don't have any programs open, only my backup restoring (through default backup application duplicity). The top consuming ram application is using 30mb of resident memory. – loop0.brs Jan 16 '13 at 00:29
  • You will have to be more specific. – psusi Jan 16 '13 at 05:19
  • The problem is: why am I using swap if I have 8gb of ram and no application open? (except backup restoring) Using a fresh install (updated) of ubuntu 12.10. It look like a bug to me. – loop0.brs Jan 16 '13 at 11:59

3 Answers3

1

You can try to run these commands from Terminal:

sudo -s
echo 3 > /proc/sys/vm/drop_caches  

I have used it as well, and my "used mem" in top is ~ 1G again!

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
olserg
  • 11
  • 1
1

I had a similar situation.

It seems that once Ubuntu starts using swap, it doesn't release RAM easily even after the operation is finished.

I found a solution by running two commands after the RAM intensive operation is over. That is: sudo swapoff -a followed by sudo swapon -a. This disables swap during which anything in swap is transferred in RAM and re-enables it.

I would suggest you try to do the restore gradually if possible. Give more details in your question for specific help with this.

To Do
  • 15,172
  • 12
  • 70
  • 116
0

Well my problem is resolved by using a newer kernel, I'm using kernel 3.8 and do not have this problem now.

loop0.brs
  • 1
  • 3