Results 1 to 9 of 9

Thread: Swap filling up but not emptying.

  1. #1
    Join Date
    Aug 2011
    Location
    Scotland :)
    Beans
    85
    Distro
    Ubuntu 11.04 Natty Narwhal

    Swap filling up but not emptying.

    Hi all, I've recently noticed that my swap is getting completely full after I've been using my laptop for a short period of time.
    When I look at top with the swap column the numbers reported there are far lower than shown with System Monitor.
    I've only noticed it after Chrome updated to version 27 and extensions kept crashing and pages ran out of memory so I don't know if they're linked. Also when I turned off swap the pages still ran out of memory even when I still had some memory left. Also when I completely close Chrome the swap usage doesn't go down.

    Computer specs: Lenovo Thinkpad T61, Ubuntu 13.04 64bit, 2GB RAM, 500GB hard drive, 2GHz Core 2 Duo T7250, Intel 965GM graphics.

    Does anyone know how to help?

    PS: I don't know if the screenshots I've linked will work so here's the links https://www.dropbox.com/s/aavhqr1j7n...%3A03%3A32.png https://www.dropbox.com/s/6j236fcukd...%3A05%3A37.png
    Where are my eyes? ... Oh there they are.

  2. #2
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Swap filling up but not emptying.

    try
    Code:
    sudo swapoff -a; sudo swapon -a

  3. #3
    Join Date
    Aug 2011
    Location
    Scotland :)
    Beans
    85
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Swap filling up but not emptying.

    I tried that but it says it cannot allocate memory. When you swapoff it tries to put what was in swap into RAM but there's not enough RAM.

  4. #4
    Join Date
    Aug 2011
    Location
    Scotland :)
    Beans
    85
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Swap filling up but not emptying.

    I've tried not using Chrome for a while, using Firefox instead and the same happens so I think I can rule out Chrome.
    Where are my eyes? ... Oh there they are.

  5. #5
    Join Date
    Apr 2007
    Beans
    2,578
    Distro
    Ubuntu

    Re: Swap filling up but not emptying.

    Quote Originally Posted by Henkdroid View Post
    I tried that but it says it cannot allocate memory. When you swapoff it tries to put what was in swap into RAM but there's not enough RAM.
    With 2 GB, that is not quite normal. Close all applications, then try the commands again: if it still says it cannot allocate memory, then definitely there is something wrong. In system monitor, processes tab, try to see what is using the memory (you can sort on memory use by clicking the header of the Memory column).

    In general, it is normal that swap remains in use even if enough RAM has been freed again.

  6. #6
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,869
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Swap filling up but not emptying.

    It sounds like there is a memory leak somewhere. Have you tried running your browsers with all plugins disabled? I think there might be a bug in one of your plugins.

  7. #7
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    2,708
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Swap filling up but not emptying.

    What programs are you running? It definitely sounds like a memory leak, unless you are doing some major graphics or video editing or ripping disks while using tmpfs. The only memory leak I have seen in years was when I was running 11.04 beta and its network manager was leaking.

    I run Ubuntu (although 64-bit 12.04) from a 2 core 1 GHz tablet PC with 2 GB RAM booted from SD card using tmpfs (in RAM) for /tmp without any swap. It cannot hibernate because its SD slot is internally USB connected, so it does not need swap for that.

    My desktop PC (up 20+ hrs) is currently using 765 MB with firefox and a terminal open. The 4.9 GB cached data is from running tf2 game in Steam earlier.
    Code:
    efflandt@xps8100-1204:~$ free -m
                 total       used       free     shared    buffers     cached
    Mem:          7913       5783       2130          0         85       4931
    -/+ buffers/cache:        765       7147
    Swap:            0          0          0
    i5 650 3.2 GHz, 8 GB, nvidia GTX 750 Ti, 32" 1080p | i7-4700MQ, 8 GB, Intel HD 4600/nvidia GTX 765M, 15.6" 1080p | etc.

  8. #8
    Join Date
    Nov 2008
    Beans
    26

    Re: Swap filling up but not emptying.

    2 gigs of RAM is very minimal on a 64 bit system ...???

  9. #9
    Join Date
    Aug 2011
    Location
    Scotland :)
    Beans
    85
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Swap filling up but not emptying.

    Hmm, I got rid of Xorg edgers and it seems to have fixed the problem.
    Where are my eyes? ... Oh there they are.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •