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

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
20 views

Report memory usage (systemd)

We have several running cronjobs on our linux system (systemd). When I issue the command: systemctl status .service then I see correctly the usage (in this case only the CPU usage (I still need to ...
-1
votes
0answers
27 views

How to display last 48 hour memory history

Is there any way to find out memory history via Linux terminal? I do not have any connections to the physical host or any other monitoring tools like zabbix etc... One of the Database service was ...
0
votes
1answer
12 views

top command, why such a big difference between VIRT and RES, while swap is 0?

I've read some posts that says a process's VIRT = RES + SWAP. But look at the screenshot below, the whole system's Swap is 0 (0 used). So I expect each process's VIRT at least ≈ RES. But as you can ...
2
votes
1answer
22 views

Difference between CONFIG_RANDOMIZE_BASE and CONFIG_RANDOMIZE_MEMORY in Linux kernel config

This page says that RANDOMIZE_BASE is for KASLR and it randomizes the physical AND virtual addresses which is obvious in 32-bit and comprehensible in 64-bit. But what does RANDOMIZE_MEMORY do exactly?...
0
votes
0answers
24 views

Total memory vs memory per CPU vs memory per process

I have troubles understanding memory (RAM) specifications of CPUs. Just as an example, the Xeon Gold 6144 specs give a maximal memory size of 768GB. If I have a mainboard with two CPU sockets and 24 ...
0
votes
1answer
20 views

Why does `dd` map 200M of virtual address space?

sudo atop -R dd if=/dev/zero of=/dev/null # in a background tab In atop, type m for memory details. Type /dd to search for dd. Result: PID TID MINFLT MAJFLT VSTEXT VSLIBS VDATA VSTACK ...
0
votes
0answers
27 views

Limit container resources both using --memory and --cgroup-parent

I'd like to limit both total memory consumption for a group of containers as well as memory consumption for a particular container. Say, a container is allowed to consume not greater than 1Gb and all ...
0
votes
1answer
9 views

whonix qemu/kvm maximum memory usage

I am using the newest Whonix on qemu/kvm. Why is the memory usage always at Maximum for W-Gateway (max 2024 MiB) and W-Workstation (4048 MiB)? I have other VMs (debian) installed as well, and it is ...
0
votes
0answers
11 views

Alternative testing tools to use instead of Chromium DevTools

I'm trying to get statistics about web interface usability on chromium on a system that has limited memory (2GB ram, no swap due to real time kernel constraints). Right now, the UI is barely usable, ...
-3
votes
0answers
62 views

Buffer Overflow exploit in C [migrated]

Given below is the code from file q2.c I need to use memory exploit to read the content of file 'secret' that has no read permission for my group. I tried using ./q2 $(python -c 'print "\xad\xdd\...
0
votes
0answers
22 views

How can I prevent a single CGI script from using all 16gb of RAM?

I'm not very familiar with the code and it's already 15 years old code. It's a CGI script for an image gallery website. Sometimes it runs 50 imageFolio.cgi-processes at the time without problems. ...
1
vote
0answers
10 views

Getting memory usage of a process: comparing pmap to top

I would like to get a process's memory usage and it seems that pmap can do that. However, the value it returns is different from what I see in top command. # pmap 22080 | grep total total ...
0
votes
0answers
12 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
117 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 ...
3
votes
1answer
48 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
62 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
36 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
46 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
101 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
78 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
43 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
72 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
60 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
38 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
36 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
84 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
26 views

Maximum size that can be allocated

Can I allocate more memory than VmallocTotal given in /proc/meminfo ?
3
votes
2answers
72 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
17 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
121 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
154 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
126 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
33 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
153 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
49 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
98 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, ...
1
vote
0answers
24 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
53 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
386 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
600 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
36 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
479 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
22 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
24 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
76 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
149 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 ...