Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [memory]

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

0
votes
0answers
10 views

Find applications accessing certain memory address / trace memory access

Is there some way on Linux or Unix systems to determine if a distinct physical or virtual memory address has been accessed? I know the address or list of addresses but want to know if and what ...
1
vote
2answers
85 views

What's inside the kernel part of virtual memory of 64 bit linux processes?

I came upon this question : What's the use of having a kernel part in the virtual memory space of Linux processes? and based on the answer and the comments on the answer : the kernel memory ...
2
votes
1answer
42 views

How to have memory/cpu limits only for forked children and not for the parent process?

Is there a way to have limits for (let's say) apache2, that limits each forked child worker process to use max X memory, and not the entire process tree (apache2 and all of its forked children) to max ...
3
votes
1answer
21 views

How large are the “watermark” memory reservations on my system?

swappiness This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. A value of ...
1
vote
0answers
30 views

What prevents page migration?

OpenSUSE 42.3, Kernel 4.4.175-89-default Running memory bandwidth intensive applications I realised the following behaviour: The application uses ~55% of the physical memory of a NUMA system with 2 ...
2
votes
2answers
41 views

Script to access remote node and get memory usage

I am running a large simulation on a computer cluster using 50 compute nodes. This solver uses a data structure which grows on the fly and (very) differently for each node. I need to make sure the ...
14
votes
4answers
3k views

If the heap is zero-initialized for security, then why is the stack merely uninitialized?

On my Debian GNU/Linux 9 system, when a binary is executed, the stack is uninitialized but the heap is zero-initialized. Why? I assume that zero-initialization promotes security but, if for the ...
2
votes
2answers
68 views

Why does RHEL use swap even when vm.swappiness = 1?

RHEL 7.2 memory use, per free -m: total used free shared buff/cache available Mem: 386564 77941 57186 687 251435 306557 Swap: ...
-1
votes
1answer
48 views

why it so important do disable THP ( transparent huge pages ) on database servers? [duplicate]

We have hadoop cluster We notice that on many DB servers, that the THPs are disabled ( include HDFS servers ) Can you explain why it is so important to disable THP on DB servers? what could be if ...
0
votes
1answer
39 views

uninitialized pointers dangerous?

I read, that pointers (in C), that are not initialized, could point to an address that contain data or program code from other programs. In the book it says, that this can cause damage. Is this issue ...
0
votes
3answers
43 views

How to find top memory & CPU consuming process for particular time?

I have checked the sar report and found that CPU & Memory is getting utilized much more at particular time (for ex. day ago). Is it possible to find which process was taking much CPU & Mem? ...
0
votes
1answer
46 views

How to understand PBS output “mem” and “vmem” keep the same when the task is x-fold increased with mpirun -np x task

Here is a simple experiment I tried: Given a task called "sim.exe" which doing a model simulation, I then use MPI to launch x "sim.exe" simultaneously on one node (shared memory system). I have tried ...
1
vote
0answers
35 views

Limit memory usage for a single Linux process with only a function?

This is a shell script with a function timeout() to limit the CPU time usage for a single process. Is it possible to limit memory usage for a single Linux process with a similar function? #!/bin/bash ...
2
votes
1answer
23 views

Kernel Logical address

Does Kernel logical address go through MMU when used in load/store instruction? Does MMU handle kernel logical address differently from kernel virtual address? Please give reasons for the same. If ...
0
votes
0answers
22 views

Process only takes 50% of RAM on Debian [duplicate]

I have a program in python which takes lots of ram. My server has 16gb of ram, but when the program reaches ~8gb of ram, the os starts writing on disk which breaks performance. I want the process I'm ...
1
vote
0answers
15 views

Using Systemtap probing Getting the virtual address location of bytes for every read write operation in Linux

Using Systemtap probing tool I got the way to get total amount of bytes read by a file by probing syscall.read and syscall.read.return function. syscall.read.return has returnval() which gives the ...
3
votes
0answers
55 views

Cannot change memory protection

I have a tricky problem with memory protection. I am not able to start some programs because of the problems with some libararies. I run into a "cannot change memory" issue. I mapped the user home to ...
0
votes
1answer
25 views

Maximum size that can be allocated

Can I allocate more memory than VmallocTotal given in /proc/meminfo ?
3
votes
2answers
69 views

Reading and writing data temporarily without using the filesystem

I'm using ansible in a vagrant environment managing a debian box. Due multiple ansible provisioners with vault encrypted data (e. g. database root password) I have to enter the vault password once by ...
2
votes
0answers
14 views

Allocate pools of hugepages separately on each NUMA doamin

On my dual-socket machine, I'm trying to allocated two pools of hugepages (one for each socket), so that the application A, which is pinned on the first socket, uses the first pool, and the ...
0
votes
2answers
64 views

kill deleted files and clean the memory cache

I want to know if kill the delete process , can help to clean the memory cache sometimes we get from lsof many deleted files so does killing them can give more available memory ? example: lsof | ...
0
votes
2answers
88 views

How to limit a process' memory usage while it is running?

On my server, I have a long running batch process, process_a, which have been running for several days now. I don't mind the duration of which the process needs. The problem is how process_a always ...
0
votes
1answer
91 views

Why are there no values for 'shared', 'buff/cache' and 'available' in the swap line of free?

Why are the last columns empty in the swap line? $ free total used free shared buff/cache available Mem: 3912864 2255460 315388 249068 1342016 ...
0
votes
0answers
26 views

Which one to use Cross Memory Attach or ptrace?

I'm trying out ptrace system calls, I just discovered Cross Memory Attach from Christopher Yeoh. I wonder which one is better in term of performance between Cross Memory Attach and ptrace. Thanks in ...
0
votes
0answers
97 views

How to display `top` results sorted by memory usage by a process in KB/MB?

I have known about top command. When I using this command, I got only the memory usage of a process in terms of PERCENTAGE(%MEM) only. Is there any option to get the memory details in terms of Bytes(...
0
votes
1answer
31 views

MemAvailable higher than expected

$ free -h total used free shared buff/cache available Mem: 7.7Gi 4.5Gi 692Mi 305Mi 2.5Gi 2.6Gi Swap: 2.0Gi ...
1
vote
1answer
84 views

Linux 3/1 split and physical map

I'm trying to understand the Linux 3/1 split (or 2/2, 1/3, any) and how mapping to physical memory work. Let's assume x86. What I don't understand in particular is why the kernel's 1GiB in va[3GiB, ...
0
votes
0answers
15 views

How guarantee a responsive Desktop using cgroup memory limit

I would like to setup a system with limited memory (raspberry pi) in such a way that application can't cause the desktop (x11, LXDE, openbox, mouse driver, video card driver) to be unresponsive. When ...
0
votes
1answer
50 views

NVIDIA usable memory 4GB instead of 6GB?

I have an NVIDIA 1060 with 6GB of memory in my laptop. I am on Linux Mint 19.1 Cinnamon 64-bit with NVIDIA drivers version 390 official: You can see for yourself, but I know that from Dell support, ...
9
votes
0answers
265 views

Why can't I “swapoff” when there's plenty of memory?

I've recently noticed that even though there's a lot of memory on my system: # free -m total used free shared buffers cached Mem: 15965 9680 ...
10
votes
1answer
553 views

Is “Cached” memory de-facto free?

When running cat /proc/meminfo, you get these 3 values at the top: MemTotal: 6291456 kB MemFree: 4038976 kB Cached: 1477948 kB As far as I know, the "Cached" value is disk ...
38
votes
6answers
3k views

How do I use swap space for emergencies only?

I have a Debian (Buster) laptop with 8 GB RAM and 16GB swap. I'm running a very long running task. This means my laptop has been left on for the past six days while it churns through. While doing ...
1
vote
1answer
35 views

Flashed image of full debian to larger sd card. System still full [closed]

I have debian running on a 16 GB sd card and it recently ran out of space (/dev/root is a 100%). I bought a 64 GB sd card and flashed my image of debian over to it. Even though it's running on the 64 ...
0
votes
1answer
282 views

cached memory and free command

I have a 2 cpu server running SLES 11.4 x86-64 and it has 1.5 tb of RAM. >free -g total used free shared buffers cached Mem: 1514 284 ...
-1
votes
1answer
19 views

How do I check how much RAM a process consumes like the way `time` is used to measure the elapsed time?

How do I check the maximum amount a RAM a process uses similar to how time works? $ time mvn package real 0m35.796s user 0m32.925s sys 0m1.559s $ maxmem mvn package 688 MB
0
votes
0answers
22 views

Over-allocation of memory in AIX/UNIX

Just finished my research regarding over-allocation's negative impact to VMs (Wintel). Over-allocation - usage is 2vCPU | allocated is 32vCPU I have not found any link regarding any negative impact ...
0
votes
1answer
62 views

Whould someone explain procstat output memory information?

I use the command procstat -r $(pidof myprocess) and I get the following output... PID COMM RESOURCE VALUE 84867 myprocess user time 00:...
1
vote
1answer
99 views

How does the operating system read the page size from hardware?

Books on operating systems usually mentions that the page size is decided by the processor architecture, for example Intel x86 supports 4KB page size. I have a perception that when we were installing ...
1
vote
0answers
50 views

How can you write to the kernel memory? [closed]

During boot the kernel is loaded into memory and also in-memory filesystems like /proc or /sys are created. How can you change values in those filesystems? Or how could you change the dmesg output, ...
1
vote
0answers
30 views

Shell Scripting best practice to make sure script is not over utilizing memory or CPU [closed]

I have been writing shell scripts from long time but I never thought of optimizing script to make sure its not using more cpu or memory .. I am looking out for some suggestions or process with which I ...
2
votes
3answers
174 views

how to know the right swap size for hadoop Linux machines

we are using many hadoop clusters for now we are using swap size - 16G free -g total used free shared buff/cache available Mem: 125 ...
2
votes
1answer
254 views

Why does swappiness not work?

We have a RHEL 7 machine, with only 2G of available RAM: free -g total used free shared buff/cache available Mem: 31 28 0 ...
2
votes
1answer
59 views

Access grab state of evdev device

I need to retrieved the grab state of an evdev device in a program. More specifically, I need to retrieve the state of the grab pointer in the evdev struct seen here: https://elixir.bootlin.com/linux/...
0
votes
1answer
669 views

Compiled kernel 4.19 will not boot: “Kernel panic not syncing : System is deadlocked on memory”

I am compiling kernel 4.19 on Ubuntu 14.04 because I have a assignment to add a system call, but when I try to boot this kernel there's a error: Kernel panic - not syncing: System is deadlocked on ...
0
votes
0answers
17 views

How to measure the memory used by a process at SIGABRT?

I run a long compilation that uses lots of memory. At a point it fails with SIGABRT. I would like to know how much memory is used then, before shutting down the process. I use CentOS. Is it possible ...
0
votes
0answers
235 views

Input/Output error after moving files on external hard-drive

I have an external hard-drive for saving all my photos/memories. I put all the pictures to the folder INTENSO/Handy-Backup/IPhone/DCIM/. Because I resetted my iPhone, I wanted to move all the old ...
0
votes
2answers
186 views

Why /proc/meminfo shows MemAvailable under Kernel Version 3.10?

I've been using CentOS 7 and its kernel version is 3.10. To check Kernel Version, I typed 'uname -r' and command showed 3.10.0-957.1.3.el7.x86_64 As far as I know, MemAvailable metric was introduced ...
3
votes
0answers
404 views

Kernel BUG: unable to handle kernel paging request

So I'm trying to run this kernel module on my laptop, and every time I do so, I get a stack trace that looks like this (all the messages might not be relevant to the module). [17539.035247] EBBChar: ...
2
votes
1answer
56 views

What happens to memory that wasn't freed in a kernel module after unloading?

Suppose I called kmalloc and didn't free that memory before rmmod was called on the module, what happens to that memory? Is it a memory leak and it is completely unusable until restart, or does the ...
0
votes
0answers
7 views

Resources used in sync operation

When we are performing sync operation to transfer buffer cache to disk. What kind of resources will be used the most from CPU, memory or disk? and how?