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

4
votes
2answers
2k views

swapoff fails when overcommit_memory==2

I've disabled memory overcommitting by setting overcommit_memory=2. Now when I tried to swapoff, I get this error: swapoff: /dev/sda5: swapoff failed: Cannot allocate memory But I in fact have 0 ...
1
vote
1answer
26 views

How to run a process and find how much memory it uses? [duplicate]

I regularly use time to find out how long a process takes. Is there an equivalent command for memory? The usual ways to find out how much memory a process takes (ps,/proc/meminfo, etc.) work fine for ...
38
votes
5answers
15k 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. ...
1
vote
1answer
64 views

Memory not used any more but still allocated

I have something kind of weird going on with memory. I have Ubuntu 14.04 servers with Zimbra 8.6 with kernel (for this one) 3.13.0-37-generic. But I have already seen the problem with other kernels. ...
49
votes
6answers
134k views

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
6
votes
1answer
299 views

Limit the inode cache used by a command

I want to run a task with limits on the kernel objects that they will indirectly trigger. Note that this is not about the memory, threads, etc. used by the application, but about memory used by the ...
1
vote
1answer
244 views

Not using specific memory regions due to errors

I have just installed some new RAM (2x1GB, 667, sticks from 2x512MB, 533, sticks) into an old system (perfectly valid), and all was working fine, until now. I have been having some issues when the ...
74
votes
6answers
97k 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 ...
1
vote
4answers
7k views

kswapd0 takes 99% to 100% CPU in RHEL 6.3

I have 5 systems on which I have just installed RHEL6. System configuration is CPU-i7 HDD-500 GB RAM-2 GB Swap- 4 GB I have installed the same software's and all the configuration as per ...
3
votes
1answer
695 views

Swap appears to not be in use

(I am currently using Ubuntu 14.04 LTS, GNOME environment) tl;dr How can I force more memory swapping (swappiness already at 100)? I have recently been experiencing a lot of system freezes/crashes. ...
3
votes
1answer
56 views

Keep a process in RAM (prevent it from swapping)

I want to keep a process in RAM. It should never go into swap. Is this possible? The process is a Java program. I'm running CentoS 7.
8
votes
3answers
8k views

How to reduce ClamAV memory usage?

I'm running a Ubuntu based web server (Apache, MySQL) on a 512MB VPS. This is more than sufficient for the website it is running (small forum). As I wanted to add some protection against viruses I ...
0
votes
0answers
10 views

How to mmap file w/ HUGE_PAGES to specific memory location (via “memmap=4G$4G”)

Presently working: Device driver to mmap to specific memory location (isolated by boot parameter "memmap=4G$4G") via the remap_pfn_range call. Desired solution: Same/similar outcome using 2M pages ...
1
vote
3answers
132 views

Gentoo Hardened eats 3 GB of memory after running for ~12 hours with very few processes running

I'm running Gentoo Hardened AMD64 using kernel 4.3.3-hardened-r4. With my system only running some basic daemons like wpa_supplicant, cron or DHCP, and with an X session with only Windowmaker, GKrellM ...
0
votes
0answers
20 views

How does disabling data journalling speed up the file system?

How exactly does disabling journalling give a better performance in case of Linux (ext4)?
2
votes
0answers
188 views

Limit system processes using cgroups

My server runs several dozens of processes that are not in my control (mostly monitoring software). According to my application logs, sometimes some of the third party processes try to allocate too ...
0
votes
2answers
74 views

Disk busy 101% all the time

I have an OpenNMS Linux server which is having poor disk performance. The machine is a EC2 inside a VPC. atop shows: iotop shows: How do I reduce the IO numbers and bring down the disk ...
1
vote
1answer
29 views

How to know what exactly is being written or which process is keeping my storage disk busy?

I have a server , which has gone rogue(not really), i ran nmon and saw that its Disk utilization is BAD, its 100% busy writing!! Here is the output : Can someone tell me what is keeping my disk ...
138
votes
7answers
164k views

How to display `top` results sorted by memory usage in real time?

How can I display the top results in my terminal in real time so that the list is sorted by memory usage?
1
vote
0answers
39 views

How can I mount remove /dev/mem to local

This question is relate to this, but more general. Currently I mount remote root by sshfs sshfs -o sshfs_sync,sync_readdir,reconnect,follow_symlinks,direct_io,sync_read root@pi:/ pi /proc is ok, ...
3
votes
3answers
74 views

When interrupting a process, does a memory leak occur?

Lets say I created a program in c/c++, where I manually allocated some variables. Then while running the program, I send an interrupt signal (Ctrl-C). Are those variables freed from memory, or will ...
3
votes
1answer
97 views

free command output: gentoo (redhat?) vs debian

I noticed there is a difference between outputs of free command: On debian: $ free -h total used free shared buffers cached Mem: 4.0G 3.4G ...
7
votes
1answer
32k views

How to check which process is using most memory

When I check free in one of Prod server it showing 70% of memory is being used: total used free shared buffers cached Mem: 164923172 141171860 23751312 ...
2
votes
0answers
37 views

OOM Killer: Processes have a score of over a 1000

All top links when Googling for OOM score seem to indicate that the values must be between -1000 and 1000. I tried to verify that with a simple cat /proc/*/oom_score | sort -n | less and I ...
0
votes
0answers
27 views

Why does .text region of shared libraries is not flagged as VM_SHARED?

When I'm using shmem/mmap to share memory between processes I can see with pmap that it creates virtual memory area that marked as shared. Example: Address Kbytes RSS Dirty Mode ...
8
votes
3answers
5k views

How does stack allocation work in Linux?

Does the OS reserve the fixed amount of valid virtual space for stack or something else? Am I able to produce a stack overflow just by using big local variables? I've wrote a small C program to test ...
0
votes
0answers
26 views

How to calculate the amont of kernel memory allocation on Linux?

My system has 128GB physical memory. However, free -h said I have 125 G total memory. [root@rhel7 ~]# free -h total used free shared buff/cache available Mem: ...
5
votes
1answer
665 views

Finding the source of CoW page faults on OS X

I'm trying to find the source of CoW page faults in some C code on OS X. I would like to use the vminfo DTrace provider, but vminfo isn't available on OS X. On Linux, I can use SystemTap to print a ...
7
votes
2answers
2k views

Memory usage command with syntax similar to the time command

What command shows the memory usage of a program, i am looking for a command that is simple to use and has similar syntax to the time command. I am trying to find the memory usage of a md5 hashing ...
0
votes
1answer
63 views

How do you change the Hugepagesize?

How can I change the pagesize for Hugepages on Linux? I'd like to increase it to 4096 kB or 8192 kB. I'm working specifically with Centos and Amazon Linux. $ grep Hugepagesize /proc/meminfo ...
8
votes
2answers
9k views

How to place / store a file in memory on linux?

I have read somewhere that one can put a file on a linux system into memory, and loading it will be superfast. How do I do this? How do I verify the file is loaded from memory?
0
votes
1answer
41 views

-/+ buffers/cache & Swap

When should the usage of swap get started? or How do I know that my swap is being used? At least some times if not always, considering the default swappiness of 60 Also, why does free offer to omit ...
1
vote
1answer
39 views

vmstat -s command fields meaning, specially “pages paged in” vs “pages swapped in”

Most of the fields are understandable but can someone please explain me the difference between "pages paged in" and "pages swapped in"?. I'm pretty sure that swapping is when the entire process is ...
11
votes
2answers
531 views

awk memory leak?

Base on this I'm running the command < /dev/urandom hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(...
1
vote
1answer
40 views

Eviction of Disk Cache in Memory

Say RAM is 100% used, some by disk-cache and some by applications. There is plenty of swap (on a hard disk available). If Linux decides to evict a page that contains application data, it would be ...
1
vote
1answer
51 views

How to log every memory access in linux of a single program? [closed]

I am trying to analyse the memory usage of a single program and need a list of every access the program made, so basically i need something like Valgrind but with a complete output.
0
votes
3answers
152 views

Understanding and configuring Cache Memory

I have few questions about Cache Memory In my system "free -h" command gave me below output, total used free shared buff/cache available Mem: 7.6G 2.1G 1....
10
votes
2answers
6k 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 ...
1
vote
1answer
90 views

How to debug an Out of memory crash

Recently one of my CentOS6 server crashed because of an Out of memory Error: It seems to be related to the postgres database used by java web-applications (deployed on tomcat). But I cannot find ...
1
vote
1answer
32 views

vm.swappines parameter influence on system without swap partition

I run across following definition of vm.swappines: The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. So, if I have ...
1
vote
1answer
19 views

Why do different instances of the same program use up different amounts of memory?

I simply started 5 instances of the default xterm, doing nothing in them at all. Looking at the output from htop, it appears that these instances use different amounts of RAM: VIRT RES ...
38
votes
8answers
66k 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 ...
0
votes
0answers
23 views

Logging memory issues with Cron

I'm trying to log memory errors/issues using cron, however I'm still unsure how to do this. I'm new to cron, but I entered our system with it already using the tool. We've been having memory issues ...
1
vote
1answer
39 views

Why does OOM-killer sometimes fail to kill resource hogs?

If I type in my shell x=`yes`, eventually I will get cannot allocate 18446744071562067968 bytes (4295032832 bytes allocated) because yes tries to write into x forever until it runs out of memory. I ...
0
votes
1answer
77 views

Convert meminfo kB to bytes [duplicate]

To convert the readings in /proc/meminfo from "kB" to bytes, should I multiply by 1024, or 1000?
4
votes
1answer
183 views

Does /proc/[pid]/status always use kB?

Particularly, does proc always list the VmRSS value in kB? I can't find a solid answer on the documentation, although it appears that it sticks to one unit.
3
votes
2answers
100 views

C++ app. with mmap kills kernel? (kernel panic with mmap)

In my C++ program where intensive disk, network I/O and even CPU computation occur, I am using memory mapped region as an array. With very small data, it works fine. However when I ran the program ...
1
vote
1answer
67 views

What is difference between cached memory and used memory?

In my System Monitor panel applet in Linux Mint 17.3 Cinnamon, it shows me memory usage of used memory and cached memory combined, whereas in the system monitor application, it just shows used memory, ...
3
votes
2answers
2k views

What's the difference between ioremap and file operation mmap?

I'm currently working on a PCI device driver for Ubuntu. I have some example code about PCI driver, but I have difficult on understanding the ioremap and file_operation.mmap. The description of file ...
1
vote
2answers
59 views

What is the default memory allocation for shell process by linux

What is the default memory allocation for shell process by Linux , i mean is there any upper limit for shell process or any process.