Coder Social home page Coder Social logo

Misestimated free RAM about earlyoom HOT 6 CLOSED

rfjakob avatar rfjakob commented on August 20, 2024
Misestimated free RAM

from earlyoom.

Comments (6)

rfjakob avatar rfjakob commented on August 20, 2024

Hmmm, could you please post /proc/meminfo ? Old "free" versions misaccount tmpfs!

Edit: Recent "free" has an extra column "available" - equivalent to "MemAvailable" in /proc/meminfo. And it has dropped the "-/+" row because it is inaccurate on modern kernels due to tmpfs.

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7841        2243        2597        1175        3000        4066
Swap:          1023         499         524

from earlyoom.

rfjakob avatar rfjakob commented on August 20, 2024

from earlyoom.

kernc avatar kernc commented on August 20, 2024
$ cat /proc/meminfo
MemTotal:       32359008 kB
MemFree:         2657452 kB
MemAvailable:    6309220 kB
Buffers:          339344 kB
Cached:         16948472 kB
SwapCached:            0 kB
Active:         23319752 kB
Inactive:        3883036 kB
Active(anon):   21424576 kB
Inactive(anon):  2613048 kB
Active(file):    1895176 kB
Inactive(file):  1269988 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               392 kB
Writeback:             0 kB
AnonPages:       9915012 kB
Mapped:          2453228 kB
Shmem:          14122652 kB
Slab:             876384 kB
SReclaimable:     712060 kB
SUnreclaim:       164324 kB
KernelStack:       14240 kB
PageTables:        83920 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    16179504 kB
Committed_AS:   30452072 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:     1738240 kB
DirectMap2M:    30167040 kB
DirectMap1G:     2097152 kB

Indeed, I have a large tmpfs

$ df -h | grep tmpfs
tmpfs           6.2G  162M  6.1G   3% /run
tmpfs            16G  9.8G  5.7G  64% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
tmpfs           9.3G  2.6G  6.8G  28% /tmp
tmpfs           3.1G  4.0K  3.1G   1% /run/user/120
tmpfs           3.1G  628K  3.1G   1% /run/user/1000

VirtualBox was assigned some 3GB.

So you are saying I need more RAM?

from earlyoom.

rfjakob avatar rfjakob commented on August 20, 2024

The line

MemAvailable:    6309220 kB

tells us that you have 6.3 GB available. Once this drops below 3.1 GB earlyoom will start killing processes. What you can do:

  1. Deleting the files from /tmp will make the memory available.
  2. Start earlyoom with -m 5 so it will start killing processes when 5% of memory are free (default is 10%)
  3. Add a few GB of swap

from earlyoom.

rfjakob avatar rfjakob commented on August 20, 2024

But yes, this box is close to running out of memory.

from earlyoom.

kernc avatar kernc commented on August 20, 2024

Ah, indeed, I had lots of stale data in /dev/shm which my DE's memory monitor widget oddly doesn't seem to count. Thanks!

from earlyoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.