Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [meminfo]

This is one of the more commonly used files in the /proc/ directory, as it reports a large amount of valuable information about the systems RAM usage.

0
votes
1answer
31 views

MemAvailable higher than expected

$ free -h total used free shared buff/cache available Mem: 7.7Gi 4.5Gi 692Mi 305Mi 2.5Gi 2.6Gi Swap: 2.0Gi ...
10
votes
1answer
556 views

Is “Cached” memory de-facto free?

When running cat /proc/meminfo, you get these 3 values at the top: MemTotal: 6291456 kB MemFree: 4038976 kB Cached: 1477948 kB As far as I know, the "Cached" value is disk ...
1
vote
1answer
44 views

What does ShmemHugePages mean?

I'm using grep Huge /proc/meminfo and getting: AnonHugePages: 16384 kB ShmemHugePages: 0 kB HugePages_Total: 33 HugePages_Free: 18 HugePages_Rsvd: 18 HugePages_Surp: ...
4
votes
1answer
77 views

different kernels report different amounts of total memory on the same machine

I have two x86_64 kernels compiled on the same machine against the same code (4.15.0 in Linus' source tree). The config files were produced by running make localmodconfig against that source, using ...
0
votes
1answer
314 views

how to find the right memory size

we have linux machine with 32G we capture the mem as the follwing mem=` cat /proc/meminfo | grep MemTotal | awk '{print $2}' ` echo $mem 32767184 and now we convert it to GIGA mem_in_giga=` echo ...
4
votes
1answer
2k views

How are /proc/meminfo values calculated?

/!\ Current state: Update 3 /!\ Some /proc/meminfo values are a sum or a difference of some other values. However, not much is said about how they are calculated in these two links (just do ctrl-f ...
2
votes
1answer
4k views

How to troubleshoot what eats memory?

I'm trying to figure out why memory consumption started to constantly increase on my server during the last hours. I've tried to find the cause on the application level, but no success. That is why ...
10
votes
2answers
5k views

How can I get the amount of available memory portably across distributions?

The standard files/tools that report memory seem to have different formats on different Linux distributions. For example, on Arch and Ubuntu. Arch $ free total used free ...
2
votes
2answers
442 views

Recover from faking /proc/meminfo

So, without really thinking too much, I ran this script: #!/bin/bash SWAP="${1:-512}" NEW="$[SWAP*1024]"; TEMP="${NEW//?/ }"; OLD="${TEMP:1}0" sed "/^Swap\(Total\|Free\):/s,$OLD,$NEW," /proc/meminfo &...
10
votes
1answer
552 views

What is using 4GB of memory? (Not cache, not a process, not slab, not shm)

We have some EC2 servers that experience a memory leak over days or weeks. Eventually there gets to be many GB of memory that is used (according to tools like free and htop) and, if we don't restart ...
1
vote
0answers
85 views

Investigating Active MemInfo

I am seeing high Active usage when I do a cat /proc/meminfo : MemTotal: 65965328 kB MemFree: 51640992 kB Buffers: 1050332 kB Cached: 8516112 kB SwapCached: 0 kB Active: 11512732 kB Inactive: 1878028 ...
3
votes
0answers
194 views

In meminfo, sometimes Mapped more than Cached

In /proc/meminfo, AFAIK Cached >= Mapped But after /proc/sys/vm/drop_caches, it goes to Cached < Mapped Cached: 66132 kB Mapped: 67792 kB /proc/meminfo contents ...
4
votes
1answer
2k views

When is swap triggered or how to calculate swap_tendency?

I'm trying to use Redis for production services and trying to avoiding swapping, which is bad for performance. I had learn that swap is triggered by swap_tendency which is depending on ...
172
votes
7answers
211k views

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes when you have several gigs of RAM. In Linux, it looks like: And here is how it looks in Mac OS X: Is there a way to display meminfo in ...