15

The currently accepted answer from 2009 is out-of-date. It is important to make sure that the information you are getting is correct and matches the version of free (distributed in the Debian package procps or equivalent in your distribution). It is also helpful to look at the output of man free, and also man 5 proc, which contains information about /proc/...


10

If you're on Ubuntu 15.10 or greater, this may actually be the result of a bug, especially if your system is a virtual machine lacking a swap partition (e.g., AWS EC2). The problem exists on other distributions, but, as of writing, it's unclear if the same fix works universally. A temporary workaround: sudo ln -s /dev/null /etc/udev/rules.d/40-vm-hotadd....


9

The problem is explained here: Jun 19 21:29:49 server-name kernel: [17009377.877956] bash invoked oom-killer: gfp_mask=0x26000c0, order=2, oom_score_adj=0 And here: Jun 19 21:29:49 server-name kernel: [17009377.878115] Node 1 Normal: 50883*4kB (UME) 133*8kB (UM) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 204596kB The kernel ...


6

Im coming back here to answer my own question! The issue is caused when you have multi cpu's (not multi core) eg 2 cpus each with x cores vm.zone_reclaim_mode=0 fixes this.


6

I was looking for more clear description about buffer and i found in "Professional Linux® Kernel Architecture 2008" Chapter 16: Page and Buffer Cache Interaction Setting up a link between pages and buffers serves little purpose if there are no benefits for other parts of the kernel. As already noted, some transfer operations to and from ...


5

Nonpaged pool is kernel memory which can't be paged out into the pagefile when Windows runs out of free physical memory. It is used by drivers to allocate memory which they need. Post some pictures of taskmgr, when you into the issue. If the usage is too large, use poolmon to find the causing driver of the leak.


4

Explained by RedHat: Cache Pages: A cache is the part of the memory which transparently stores data so that future requests for that data can be served faster. This memory is utilized by the kernel to cache disk data and improve i/o performance. The Linux kernel is built in such a way that it will use as much RAM as it can to cache information from your ...


4

Is there some way to set this for only the container that is recommending it? No. vm.overcommit_memory is a Linux kernel tunable, at the host level, not the container level. Value of 0 is a more cautious overcommit than 1. Redis's reasoning for recommending 1 is their background save mechanism. Big in memory database processes forks itself to save a copy, ...


3

In bash if we do command -V ulimit we find ulimit is a shell builtin, so we can do help ulimit which says -m the maximum resident set size so we are setting the RSS. To see what system call bash is actually using, we can try $ strace bash -c 'ulimit -m 10000' setrlimit(RLIMIT_RSS, {rlim_cur=10000*1024, rlim_max=10000*1024}) = 0 and then see in ...


3

This ended up being an overly aggressive disk read-ahead. The well performing servers had a read-ahead of 128 kB. The poorly performing servers had a read-ahead of 2 mB. Wasn't able to track down why exactly the read-ahead was different, but the most likely cause was that the new machines had LVM in front of the software raid and the older machines were ...


3

According to this article, for Server 2016 System Managed pagefiles are sized according to the following: 3 × RAM or 4 GB, whichever is larger. This is then limited to the volume size ÷ 8. However it can grow to within 1 GB of free space on the volume if required for crash dump settings. For Server 2008 it states: 3 × RAM or 4 GB, whichever is larger ...


3

The biggest thing to watch are page faults. On most Linux systems, running ps -o min_flt,maj_flt will give you some cumulative statistics, but real-time isn't always good enough. SAR is probably your biggest friend when it comes to checking out overall health of the system, including memory, processor, network, etc... Check out the man page for sar for ...


3

According to the community wiki (https://help.ubuntu.com/community/32bit_and_64bit), Ubuntu itself is limited to about 1TB of memory. I would assume this means that it has trouble assigning more memory than that to a guest OS.


3

It's possible that this is a bug in SQL: When you run a Full-Text query that uses compound words in Microsoft SQL Server 2008 or in Microsoft SQL Server 2008 R2, you receive the following error message in the Error log file: Date Time spidID Error: 701, Severity: 17, State: 123. Date Time spidID There is insufficient system memory in ...


3

You want few things. First you want to reduce swappiness sysctl -w vm.swappiness=10 This will save some disk IO; because last thing you need is additional writes to disk when kernel tries to page out some stuff from mem. Goal is to tune things so as little swapping is needed. However don't turn off swappiness by setting it to 0 or disabling. I would ...


3

Since your question is about process inside Docker container, it is worth checking if you are not missing vm.overcommit_memory=1 configuration as described here: Node using swap memory instead of host memory By default, Docker recommends using a value of vm.swappiness=0 for Docker environments, which prevents swapping except in the case of an OOM (...


3

Citing rather old manuals "This file is used primarily for diagnosing memory fragmentation issues". There's no such thing as "allocating from buddyinfo" at all. As to "higher order memory" — I suppose you're talking about what could be referred these days as "legacy memory layout" which was valid for x86. Nowadays it's mostly gone. It's actually gone long ...


3

On Linux, Committed_AS is a user space commit estimate. If you add kernel stuff, Cached, Slab, KernelStack, and PageTables, that accounts for most of the "missing" few hundred MB. Programs don't use all of their allocations. So the kernel plays clever overcommit games, and hopes it doesn't go bankrupt if everyone fills theirs with actual data. On many ...


3

I prefer Advanced ECC. Optimized mode supports Single Device Data Correction (SDDC) only for memory modules that use x4 device width. It does not impose any specific slot population requirements. Advanced Error Correction Code (ECC) mode extends SDDC from x4 DRAM based DIMMs to both x4 and x8 DRAMs. This protects against single DRAM chip failures during ...


3

You first paragraph isn’t clear as it seems to be contradictory. On IBM Z you have the hardware and then the operating system. The hardware has a set of features that allow for separate address spaces and the virtual storage of each is protected from other users accessing the data. There are some caveats as IBM Z hardware uses a storage protection key to ...


2

You may need to increase your Pagefile size, to be able to handle intermittent spikes in the memory commit size. We have this issue often in Azure compute where Pagefile is set WAY too low by default for memory-intensive apps. You can read more here: http://mvolo.com/low-pagefile-can-cause-503-service-unavailable-on-azure-web-roles/ This will not solve the ...


2

You can lock the pages into memory in later versions of libvirt:- http://libvirt.org/formatdomain.html#elementsMemoryBacking Careful: This doesn't appear when using Fedora 19 as a hypervisor, nevertheless according to the changelog for the latest RPM (I can find) for EL6.5 libvirt this exists; Thu Jul 18 2013 Jiri Denemark - 0.10.2-21 conf: ...


2

If you have heavy writes, you'll be constrained by not having a write caching layer available to your system. Two disks and software RAID make that difficult. Usually, this is a feature of hardware RAID. What you have now is not the right hardware configuration for your workload. In order to provide better answers, we would need specifics about what your ...


2

All of the pagefile parameters are stored in the registry. Have your script manipulate the values in the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management For instance, the PagingFiles entry is a multi-valued string, with each different paging file on a separate line. The numbers following the filename ...


2

To allow windows to manage the pagefile size but only use the S: (swap) dedicated volume: Uncheck the "Automatically manage paging file size for all drives" check box. Highlight the "C:" volume, and select the "No paging file" radio button and click the "Set" button Highlight the "S:" volume and select the "System managed size" radio button and click "...


2

The unused initialization code will be freed as soon as the memory is needed for other purposes. (It will be backed by files from which it is read.) The memory paging mechanisms on Linux are well designed and have been tested for years. It is rare you would want to swap any process out of memory. This would result in heavy paging activity any time the ...


2

Use the source! Searching Debian source code for the phrase "invoked oom-killer" finds mm/oom_kill.c which has the 9 columns header it is supposed to print. * Dumps the current memory state of all eligible tasks. Tasks not in the same * memcg, not in the same cpuset, or bound to a disjoint set of mempolicy nodes * are not shown. * State information ...


2

Modern operating systems typically implement their virtual memory in terms of small chunks called pages, including swapping out to disk. This is an improvement over needing to swap out entire programs, as was done in early UNIX System V. Several have emphasized that paging is distinct from the old swapping, including in Understanding the Linux Virtual ...


1

You can upgrade to a newer kernel. I thought there is a change that improves compaction around file system allocation, but I don't have the commit handy. That looks like Ubuntu, so you can try Bionic. For more detail on fragmentation in zones, see Matthew's answer from a few years ago: Linux oom situation. You may be able to tune vm.extfrag_threshold or ...


Only top voted, non community-wiki answers of a minimum length are eligible