Tag Info

New answers tagged

1

To address the "DirectMap" issue: the kernel has a linear ("direct") mapping of physical memory, separate from the virtual mappings allocated to each user process. The kernel uses the largest possible pages for this mapping to cut down on TLB pressure. DirectMap1G is visible if your CPU supports 1Gb pages (Barcelona onwards; some virtual environments ...


4

It may be possible that your program used shared memory and didn't clean that up. There are three variants of shared memory on linux: 1.) POSIX shared memory (the one implemented by glibc) is accessible via files on the tmpfs pseudo-filesystem and are usually mounted by the system on places like /dev/shm, /run, /run/shm or /run/lock. The best way to find ...


3

Try using this command instead: dd if=/dev/urandom of=sample.txt bs=1M count=1024 dd will only write assign the data to be written to disk when it got all of the bs size in its memory. Here is the output of ps for a dd of 128mb just before the output was written to disk: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root ...


3

So, I did this thing in testing and, yeah, it consumes a lot of memory. I pointedly used a smaller number as well. I can imagine that bash hogging those resources for days on end could be a little irritating. ps -Fp $$; : {1..10000000}; ps -Fp $$ UID PID PPID C SZ RSS PSR STIME TTY TIME CMD mikeserv 32601 4241 0 3957 3756 4 ...


0

No. Bash will never return memory it allocates for any purpose to the operating system. (But please correct me if I'm wrong.) However, bash will re-use the memory for other purposes if necessary, and if not, the kernel will swap it out, so it won't actually be in RAM.


4

If your memory is exhaustively used up by the processes to the extent which can possibly threaten the stability of the system, then the OOM killer comes into picture. It is the task of the OOM Killer to kill the processes until enough memory is freed for the smooth functioning of the rest of the process. The OOM Killer has to select the best process to ...


2

In linux, it's normal that RAM is full. See the output of cat /proc/meminfo: MemTotal: 2051700 kB MemFree: 74376 kB Buffers: 0 kB Cached: 1562336 kB ... As you can see in my example output, I have a total of 2GB RAM and only 74MB is free. That's normal. But, see the value of Cached: from the official Linux kernel ...


3

The “missing” memory is serving as cache (mentioned in the top output at the end of the line that starts with the swap). You can use free to see this in a different form: $ free total used free shared buffers cached Mem: 1048576 640072 408504 0 0 533872 -/+ buffers/cache: 106200 ...


0

free -m will allow you to check how much the overal RAM usage fluctuates on your system. However, to monitor the memory and CPU usage of a particular process, I would recommend top (or htop) and ps. With htop, you can monitor the RES column of a process to get an accurate estimation of how much physical memory space is taken by running the application (it ...


0

You can use pmap which shows the memory map of a process: pmap -p pid For more information about it see the man page man pmap or have a look at pmap(1): report memory map of process - Linux man page.


3

Try: pidof bash | xargs ps -o rss,sz,vsz To find the memory usage of your current bash shell (assuming you're using bash). Change bash to whatever you're investigating. If you're after one specific process, simply use on it's own: ps -o rss,sz,vsz <process id> From the man page: RSS: resident set size, the non-swapped physical memory that a task ...



Top 50 recent answers are included