Hot answers tagged memory
Per the gawk manual, which is a good general awk language reference: An important aspect to remember about arrays is that array subscripts are always strings. That is, awk arrays are always associative, and numeric keys are stringified. Only the keys that are in use are stored in the array (and maybe some extra space for the future). Numeric indices ...
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 ...
There are several reasons a piece of RAM would not be used by Linux: If Linux detects it as belonging to a hardware peripheral. Most computers need RAM for the display, and thus reserve some RAM for the graphics card. It's also possible for the graphics card to contain its own RAM; as graphics cards have relatively high memory requirements, they tend not ...
The manufacturer sold you the 2GB USB stick as 2 Gigabytes, meaning 2000000000 bytes. Your computer is showing the stick in units of Gigibytes. 1 Gigibyte is 1024 x 1024 x 1024 bytes, which is 1073741824 bytes. If you divide your 2000000000 by 1073741824 you'll end up with 1.86264514923095703125 or, rounded to two decimal places 1.86 GiB. In other words, ...
If you are using a LVM, you can allocate/create a new Logical Volume a format it as a swap space. lvcreate -n swap2 -L ##G VG_NAME mkswap /dev/VG_NAME/swap2 swapon -a
As far as I know that's not possible. And I think it is a much more complicated problem to solve than it looks at first if we take the complexity of memory management into account. It may be even hard to clearly write down what it means to "set 50MB aside". But in Linux, there is something that may well solve your problem much more elegant: The OOM killer - ...
Your swap area is highly undersized. A large part of the RAM reported to be free is in fact currently unusable because it serves as a backing store to other programs memory reservations. Just add some swap, it can be a simple file, and you'll be able to launch your JVM.
You can have available RAM but still run out of swap. I believe this could be what you are experiencing. Investigate with swap -s. As a second idea the problem may be due to the fact that there isn't enough contiguous memory available although it would seem fairly odd if the OS cannot find 10 GB contiguous free memory when there seems to >100 GB free.
With gawk, from its man page about arrays, you can read a details explanation. In most other languages, arrays must be declared before use, including a specification of how many elements or components they contain. In such languages, the declaration causes a contiguous block of memory to be allocated for that many elements. Usually, an index in the ...
Arch Linux' kernel has the swap accounting disabled by default (cf. the kernel config file). You can enable it by booting with swapaccount=1 in your kernel cmdline (cf. the kernels Kconfig documentation.
On your question 2 (defragmenting memory), quoting from https://www.kernel.org/doc/Documentation/sysctl/vm.txt : compact_memory Available only when CONFIG_COMPACTION is set. When 1 is written to the file, all zones are compacted such that free memory is available in contiguous blocks where possible. This can be important for example in the ...
Only top voted, non community-wiki answers of a minimum length are eligible