In computing, memory refers to the state information of a computing system, as it is kept active in some physical structure.

learn more… | top users | synonyms

52
votes
3answers
27k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...
9
votes
2answers
2k views

real memory usage

if I understand correctly, in the following output produced by free, 3535m is the actual free memory available to applications, only 413m is used, is this correct? need some clarification on the ...
18
votes
4answers
3k views

Measuring RAM usage of a program

time is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can measure the max RAM usage of the program and any children. ...
23
votes
6answers
14k views

Correctly determining memory usage in Linux

I'm a bit confused on some of the results I am seeing from "ps" and "free". On my server, this is the result of "free -m" [root@server ~]# free -m total used free shared ...
10
votes
2answers
10k views

How to create a user with limited RAM usage?

So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap ...
13
votes
4answers
4k views

How to re-load all running applications from swap space into RAM?

If my desktop run out of memory and swaps a lot then I free or kill the application wasting my RAM. But, after that, all my desktop/applications have been swapped and are horribly slow, do you know a ...
9
votes
6answers
2k views

Is there a tool that allows logging of memory usage?

I want to monitor memory usage of a process, and I want this data to be logged. Does such a tool exist?
3
votes
2answers
338 views

`free`: output format

I use free to get the amount of free space on some of my servers. Its output is something like: $ free -m total used free shared buffers cached Mem: 374 ...
22
votes
3answers
1k views

How to limit resource usage to save CPU+RAM for a certain process?

I have a dev server on which sshd sometimes stops working because the machine runs out of RAM. Yes we are running low on memory and upgrading is not a feasible choice right now. What I want to do is ...
35
votes
4answers
28k views

Limit memory usage for a single Linux process

I'm running pdftoppm to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. pdftoppm will allocate enough memory to ...
12
votes
2answers
2k views

How to blacklist a correct bad RAM sector according to MemTest86+ error indication?

MemTest86+ (the version included with Ubuntu 13.04) says Failing address: 002f796c48 - 759.5 MB What should I specify in the memmap kernel parameter to bypass this area? I've tried running ...
5
votes
1answer
645 views

Tracking huge buffer usage under Linux

I have a Linux server running under Debian Lenny with 4Go of RAM. It doesn't run much, just: Postfix/spamassassin (daemon mode) Bind9 KVM (one guest - 1Go of RAM for it) Every day at exactly 3:05 ...
4
votes
1answer
660 views

Does kernel: EDAC MC0: UE page 0x0 point to bad memory, a driver, or something else?

kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 0, row 7, labels ":": i3200 UE All of a sudden today, our CentOS release 6.4 (Final) system started throwing EDAC errors. I rebooted, and the errors ...
49
votes
5answers
20k views

What are high memory and low memory on Linux?

I'm interested in the difference between Highmem and Lowmem: Why is there such a differentiation? What do we gain by doing so? What features does each have?
15
votes
1answer
9k views

Getting information about a process' memory usage from /proc/pid/smaps

For a given process in /proc/<pid>/smaps, for a given mapping entry what are: Shared_Clean Shared_Dirty Private_Clean Private_Dirty Is Shared_Clean + Shared_Dirty the amount of memory that ...
13
votes
3answers
3k views

What does the vm.swappiness parameter really contol?

Per the kernel documentation: This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase agressiveness, lower values decrease the amount of swap. ...
8
votes
2answers
707 views

How can I dump the full system memory?

After starting VirtualBox, the computer became sluggish and then hung completely due to OOM. Usually, OOM should be starting killing processes in order to free up some space, but this did not happen ...
5
votes
2answers
1k views

Can I identify my RAM without shutting down linux?

I'd like to price some new RAM for our in-house VMware testing server. (It's a consumer box we use for testing our software on and running business VMs). I've forgotten what kind of RAM it has and I'd ...
6
votes
3answers
2k views

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes while you have several gigs of RAM. In Linux it looks like that: And here is how it looks in Mac OS X: Is there a way to display ...
1
vote
1answer
2k views

htop reporting much higher memory usage than free or top

The following three outputs were taken essentially simultaneously: top: top - 02:54:36 up 2 days, 13:50, 3 users, load average: 0.05, 0.05, 0.09 Tasks: 181 total, 1 running, 179 sleeping, 0 ...
2
votes
3answers
1k views

Human readable system memory reading crom CLI?

On OS X, I get a nice human readable system memory reading like so: printf -v system_memory \ "$(system_profiler SPHardwareDataType \ | awk -F ': ' '/^ +Memory: /{print $2}')" ...
1
vote
2answers
212 views

Viewing virtual memory usage

I started 700+ threads from a single program And my /proc/[PID]/status file shows the following output. VmPeak: 7228104 kB VmSize: 7228104 kB VmLck: 0 kB VmHWM: 3456 kB VmRSS: ...
10
votes
1answer
4k views

What does the Virtual kernel Memory Layout in dmesg imply?

While going through the "Output of dmesg" I could see a list of values which i am not able to understand properly. Memory: 2047804k/2086248k available (3179k kernel code, 37232k reserved, 1935k ...
13
votes
6answers
4k views

Is there a way to limit the amount of memory a particular process can use in Unix?

I need to test a process for memory management. I do not have the source, so I need to do all the testing from the OS side. I want to be able to say something like limitmemory 400k -p <pid> ...
10
votes
2answers
3k views

Why does my system show only 3.2 GiB of RAM when I definitely have 4.0 GiB

I have 2x2 GiB sticks of RAM installed. Running memtest86 from the grub boot menu confirms this.. memtest86 reports no errors. However every which way I check my available memory in a running ...
1
vote
2answers
675 views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
6
votes
3answers
6k views

Swap usage too high?

I have a debian sid box, freshly installed about a month ago, with no desktop apps running at the moment. Any command I try to run (via ssh) makes the hard disk work very hard. The system worked ...
5
votes
1answer
3k views

Why does Linux show both more and less memory than I physically have installed?

I know about swap - this question isn't about that. In dmesg, the Linux (x86-64) kernel tells me this about how much memory I have: [ 0.000000] Memory: 3890880k/4915200k available (6073k kernel ...
4
votes
5answers
418 views

Unpredictable memory explosions

The main server at my company has recently been having a lot of downtime. For reasons that neither I nor the other admins can determine, it has random (VERY sudden) explosions in memory. It becomes ...
3
votes
1answer
418 views

Does segfaults mean bad memory

This is a brand new server with a new install and fresh compile of Apache/PHP with nothing crazy. Just a WordPress site hosted and I get the following. Could this just mean bad RAM? If so how can I ...
3
votes
1answer
897 views

/proc/meminfo MemTotal =?

What elements of /proc/meminfo sum up to MemTotal? Example of tee /tmp/proc/meminfo < /proc/meminfo MemTotal: 1279296 kB MemFree: 164092 kB Buffers: 62392 kB Cached: ...
2
votes
1answer
2k views

Mathematical connection between SZ RSS and VSZ in ps o/p?

I wanted to know what mathematical connection is there between the SZ, RSZ and VSZ output in ps output e.g. ps -p 2363 -o sz,rss,vsz
2
votes
1answer
104 views

Is there any method to mount a block of memory as a filesystem in linux?

I have a question,in linux, is there any method to mount a block of memory as a filesystem? For example, in X86 architecture, when power on, I reserve a block of memory about 8 Mbytes, and then when ...
7
votes
7answers
897 views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
7
votes
2answers
553 views

What governs the limits of shell brace expansion?

In this example I refer to the expansion of a sequence of integers, but perhaps(?) the limits would be relevant to all aspects of brace expansion.. This more general view is also of interest to me. ...
6
votes
2answers
1k views

An oom killer thats baffling me

I am not able to understand why would kernel issue this oom killer when I see enough memory is available: Also why are there so many kernel cache pages allocated? I say enough memory is available ...
4
votes
2answers
292 views

Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?
3
votes
1answer
1k views

What is the buffers column in the output from free?

These questions briefly list the format of the free command, noting that buffers is kernel memory that must be written out to disk and cache is file data that does not need to be written disk. On my ...
2
votes
2answers
210 views

Monitor single process to logfile perodicly

Based on this question, I would like to log the performance of a specific process, with a frequency of say one second, to a csv (comma separated value) log file. Something like: ...
2
votes
2answers
567 views

RAM usage doesn't add up? (Free+used < total)

Lately I've been noticing that my monitoring script which reads from /proc/meminfo and /proc/<pid> has been showing odd readings, where several hundred MB seem to be missing. htop is showing the ...
1
vote
1answer
282 views

Linux empty buffer cache command permission denied

I'm using the following commands to flush cache: # sync; echo 3 > /proc/sys/vm/drop_caches # sync; echo 2 > /proc/sys/vm/drop_caches # sync; echo 1 > /proc/sys/vm/drop_caches When I use ...
1
vote
2answers
173 views

Swap bash script pins htop's memory usage

I deployed a hack to add swap space to a VPS that otherwise didn't allow me to use swapon to create a file. Prior to adding and executing the script, I followed the steps outlined here. and ...
0
votes
2answers
87 views

are daemon tmpfs executables copied unencrypted to memory upon execution? (prevent if so?)

When a daemon is executed, is the executable copied to memory? If so, can it be copied encrypted? If not, is there a way to prevent the executable from being copied to memory? The executable is ...