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
22 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
29 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
0answers
20 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
23 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
0answers
11 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
21 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
40 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
63 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
13 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
42 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
61 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
65 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
22 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
38 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
23 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
78 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
12 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
49 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, ...
8
votes
0answers
161 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
518 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
2k 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
150 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
21 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
56 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
66 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
44 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
162 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 ...
1
vote
1answer
173 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
49 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
464 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
15 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
214 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
140 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
235 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
54 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?
1
vote
1answer
22 views

Are files always cached in $BLOCKSIZE increments?

Given a 4KB block size, when a 1KB file is read from disk and cached in main memory, is the entire 4KB block that contains the file cached? Similarly, if opening a 100KB file, seeking 50KB in and ...
0
votes
2answers
46 views

Does the bootloader load the kernel fully into memory

I read that the bootloader (Grub, or U-boot etc. ) locates the kernel (from maybe the HDD, or even flash memory if it's an embedded system) and loads it into memory on startup. Now, does this mean ...
1
vote
2answers
40 views

compare memory performance of two machines (low buffers vs high cached)

I'm trying to compare the performance of two machines that I have. I have in both of the machines a database that was installed with the same settings. Both of the machines have the same amount of cpu(...
1
vote
2answers
348 views

How to get value of a memory address using command?

At the memory address, 0x7fffffffeb58 of a program lies a value, I want to find out the value of the address. Is there a way to get the value just by using commands? I've tried dd but to no avail.
0
votes
0answers
36 views

Cache behavior in dd command

I am performing some dd outputs and running in parallel vmstat: With no direct write (i.e. via cache) $ dd if=/dev/urandom of=somefile.txt bs=1M count=200 200+0 records in 200+0 records out ...
2
votes
0answers
173 views

Memory dump on Ubuntu 18.04 failed on too big /proc/kcore/

There are two great articles about how to aquire memory on Linux using linpmem: SANS holdmybeersecurity Trying the approach from holdmybeersecurity I ran into the following issue, which seems to be ...
0
votes
0answers
24 views

Finding usage of “buff/cache” (as mentioned in free)?

When I run free, I see free -h total used free shared buff/cache available Mem: 15Gi 1.7Gi 4.3Gi 149Mi 9.5Gi ...
0
votes
1answer
79 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
3
votes
0answers
48 views

What are the differences between process data segment and resident set size? [duplicate]

I searched how to limit memory usage for a single process and found 3 results,ulimit -d, -m and -v, which stand for data seg size(process's data segment), max memory size(resident set size) and ...