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 [shared-memory]

The tag has no usage guidance.

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
1answer
114 views

Will swap file engage automatically when I write too much to /dev/shm

Text analytics programming today. My program is going to write about 45 million small temporary files to /dev/shm and their size estimate is 177.0 GB. I'm going to delete them soon after the next ...
0
votes
0answers
3 views

SYSV shared memory object has more blocks allocated than its size? [duplicate]

I found some weirdness in the file size of SYSV shared memory objects, when I was looking at firefox. For some files, blocks * block size is greater than the file size. Isn't this impossible? How ...
3
votes
2answers
928 views

Are sharing a memory-mapped file and sharing a memory region implemented based on each other?

Are sharing a memory-mapped file and sharing a memory region implemented based on each other? The following two quotes seem to say so, and seem a chicken-egg problem to me. Operating System Concepts ...
0
votes
1answer
54 views

calling fsync() on in-memory files

From fsync(2): fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other ...
0
votes
1answer
53 views

Processor not seeing changes to POSIX shared memory?

Context: I am using POSIX shared memory to provide a set of processes with a shared memory space. I have used this scheme for some time now in order to share data, and it's working okay. However, I ...
0
votes
1answer
92 views

Is the shared library object loaded as shared memory for the program?

I was coding some C when I started asking myself about free() inside a shared library and SIGKILL, and so on. Then, after some reading and re-thinking, I came up to this simple question. CONTEXT : ...
1
vote
0answers
110 views

Two processes sharing memory under different privileged users

I have two processes sharing memory (via Boost Interprocess). Each process is run under a different user. The first process is run from one of our privileged users. The second process is ran via a ...
14
votes
1answer
355 views

Is it wrong to think of “memfd”s as accounted “to the process that owns the file”?

https://dvdhrm.wordpress.com/2014/06/10/memfd_create2/ Theoretically, you could achieve [memfd_create()] behavior without introducing new syscalls, like this: int fd = open("/tmp", O_RDWR | ...
0
votes
1answer
340 views

Change ownership of shared memory

When I run ipcs -m, I can see a list of the shared memory segments on the system, like ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status ...
0
votes
1answer
53 views

Programs started to fail suddenly with messages pertaining to shared memory

No idea why this is happening it's the first time I see this error. There seems to be enough space left in ram and drive. First vnc fails now if I don't run it with -noshm option. Second one that ...
1
vote
1answer
1k views

Sharing file descriptors

If file descriptors are specific to each process (i.e. two processes may use the same file descriptor id to refer to different open files) then how is it possible to share transfer file descriptors (e....
3
votes
0answers
375 views

Why does `/dev/shm` on an EC2 instance have I/O throughput comparable to an EBS drive?

I recently learned about the convenient "shared memory" file system at /dev/shm. I wanted to see if I could use this to speed up a sometimes-disk-bound program that writes to and reads from a ...
1
vote
0answers
69 views

What happens when a process dies after attaching a common shared segment, while other processes are accessing the shared segment

consider 3 processes, proc1 proc2 proc3 accessing a shared memory based ring buffer. Let these 3 processes attach that memory segment. My question is, what happens when proc1 is chrashed or died? In ...
0
votes
1answer
151 views

Issues due to independent concurrent writes to shared memory

Actually I would like to know the issues caused by independent concurrent writes to shared memory. To be more elobarote, consider we have three processes (proc1, proc2, proc3). These 3 processes are ...
1
vote
1answer
203 views

Interpetation of /proc/sys/kernel/shmall

Unless I am wrong. the value of /proc/sys/kernel/shmall indicates the the total amount of shared memory, in bytes, that can be allocated to the system. I am on a t2.micro ec2 debian instance, and I ...
-3
votes
1answer
167 views

2GB of shared memory used as shown in free [closed]

OS: Ubuntu 16.04 free output indicated about 2GB of shared memory. The shared memory was still allocated after a logout, and no particular process from top list was occupying it. ipcs -m did not ...
8
votes
1answer
6k views

Understanding MMAP

I was going through documentation regarding MMAP here and tried to implement it using this I have a few doubts regarding its implementation. Does MMAP provide a mapping of a file and returns a ...
8
votes
2answers
4k views

Where does Linux set the default values for SHMMAX?

I'm just wondering where these values are being set and what they default to? Mine is currently 18446744073692774399. I didn't set it anywhere that I can see. $ cat /proc/sys/kernel/shmmax ...
2
votes
2answers
1k views

How is memory corruption handled by Linux when the process terminates?

There are many questions on Stack Overflow asking about how a system handles memory leaks and what happens on abnormal termination. Examples: https://stackoverflow.com/questions/6727383/dynamically-...
1
vote
0answers
118 views

How to fetch semaphores and sharedmem objects for a specific apache instance when more than one apache instances run with the same app id on the box

Not sure if the question is pertinent for this forum. We have a server with 3 apache instances running with the "same" app/functional ID These instances communicate with their corresponding ...
1
vote
1answer
539 views

Across systems, How a process communicate with other process?

I have learnt below IPC mechanisms, BSD style half-duplex pipes SYSV style message queues SYSV style semaphore sets SYSV style shared memory segments BSD style sockets Half-duplex pipe can be used ...
3
votes
1answer
2k views

How to know shared memory between two processes?

I need to know the amount of memory shared between two processes, that is, the intersection of their shared memories. Any ideas? Thanks!
1
vote
0answers
53 views

The same program which uses 'mmap' behaves differently on the different machines

I am running an application which uses a huge memory mapped file on two different machines (CentOS 7). I found that the same program's performance is significantly different when it's running on two ...
4
votes
1answer
2k views

How can i calculate the size of shared memory available to the system

According to the rhel document, the total amount of shared memory available on the system equals to shmall*PAGE_SIZE. After I completed the installation of RHEL6, the value of the shmall kernel ...
1
vote
0answers
502 views

Discrepancy between shared memory from /proc/meminfo and ipcs

Running free -hm outputs: total used free shared buffers cached Mem: 15G 15G 389M 321M 169M 11G -/+ buffers/cache: ...
0
votes
0answers
201 views

How do you install Oracle on Linux when you get the error “ORA-27101: shared memory realm does not exist”?

I am installing Oracle 11 on CentOS 7.2. I have installed it before on servers with less RAM. I get this error: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist ...
1
vote
1answer
1k views

Limit memory usage of a user

I have a computing cluster of 44 cores and 256GB memory running Ubuntu and I'd like to limit the number of CPUs and memory used by certain users. Limiting memory usage would be more important. So for ...
3
votes
1answer
6k views

Kernel parameter SHMALL and SHMAX [closed]

I am using Red Hat Enterprise Linux Server release 5.11 (Tikanga) as OS and rdbms is 11gR2 software. I have created a database with memory_target=3 GB and physical RAM=7 GB. My DB service is getting ...
1
vote
1answer
654 views

Unix Domain Socket with VM

Is it a true statement that, shared memory does not work between a host OS and guest OS, but a Unix Domain Socket (specifically udp) can communicate between the two? An in depth explanation would be ...
2
votes
1answer
590 views

non-reentrant libraries in shared memory?

I found this Q&A saying shared libraries can be shared between processes using shared memory. It seems like it would be impossible, though, to share code between processes without some pretty ...
1
vote
0answers
625 views

Extremely high shmem usage

I'm trying to debug the issue that's periodically taking down my work machine. It's an OOM-type problem, and based on this /proc/meminfo output: Total: 32902608 kB MemFree: 4054100 kB ...
1
vote
1answer
957 views

determine the actual memory usage of several processes that share a large memory segment

I just took a look at the output of top and it showed me (amongst other processes) the following: As once can see I have ten processes consuming approx 10GB each so 100GB in total. The computer ...
1
vote
0answers
588 views

Opcache and shared memory issue

I installed zend_opcache on my server box , but I can not increase opcache.memory_consumption over 1600 . (example : 2048) . after increase following error occur in server : Fatal Error Fatal Error ...
5
votes
1answer
4k views

Memory layout of dynamic loaded/linked library

when loading a shared library in Linux system, what is the memory layout of the shared library? For instance, the original memory layout is the following: +-----------+ |heap(ori) | +-----------+ |...
2
votes
1answer
364 views

Why does the clock need a shared memory segment?

This is a combination of programming and Linux question but I think it suits better here. I am writing an application that works with ipcs (shared memory segments) and after each running I am ...
0
votes
1answer
54 views

attaching to Unix shared segment

Can a UNIX program running as root attach to a shared memory segment created by another user with permissions allowing access only to creator?
7
votes
1answer
935 views

File backed, locked shared memory and disk interaction

Varnish, a HTTP accelerator, uses a ~80MB file backed SHM log that is mlock()ed into memory. The Varnish docs recommend to store the file on tmpfs to avoid unnecessary disk access. However if the ...
3
votes
1answer
99 views

Grsecurity subject mode x

I am conducting some research on Grsecurity on Hardened Gentoo, see http://en.wikibooks.org/wiki/Grsecurity. To be more specific, I am trying to find an example where subject mode x makes a difference....
14
votes
3answers
8k views

On system memory… specifically the difference between `tmpfs,` `shm,` and `hugepages…`

I've been curious lately about the various Linux kernel memory based filesystems. Note: As far as I'm concerned, the questions below should be considered more or less optional when compared with a ...
4
votes
1answer
5k views

can not create /dev/shm

I need to create /dev/shm on an embedded ARM system. From "Installed The Latest Changes to Current and......". I see that it can be created with mkdir /lib/udev/devices/shm, but I'm wondering what ...
5
votes
1answer
4k views

Resize / remount /dev/shm not working

I've got a linux box dedicated to playing host to an Oracle server installation. It's got 4Gb RAM and by default, 50% (2Gb) has been allocated to /dev/shm. I want to change this to 3Gb, but I am ...
3
votes
2answers
4k views

Hugepages in linux - how to make sure that java process will start using hugepages

I'm running java server on Red Hat Enterprise Linux Server release 5.9. Recently I started to use HugePages as it has some advantages I would like to use. System was configured correctly (as many ...
7
votes
1answer
7k views

operation in /dev/shm causes overflow

I am repeating tens of thousands of similar operations in /dev/shm, each with a directory created, files written, and then removed. My assumption used to be that I was actually creating directories ...
8
votes
1answer
7k views

use `/run/shm` (formerly `/dev/shm`) as a temp directory

Is it good practice to create a directory in /run/shm (formerly /dev/shm) and use that like a temp directory for an application? Background: I am writing black box tests for a program which does a ...
1
vote
0answers
254 views

Viewing shared segments created by shmget

I'm trying to "visualize" shared memory between two processes. I've created a little server-client example where the client writes some data to a shared memory location and the server reads from it. I'...
0
votes
2answers
327 views

Why is there no critical section in the pipe?

Why is there no critical section in the pipe? For example, as in shared memory. In pipe have general data, which in common use in joint processes, but in the shared memory also have general data, ...
7
votes
1answer
3k views

What is “SYSV00000000”?

In my dmesg this appeared when my window manager (xfwm4, part of XFCE) crashed: xfwm4[3936]: segfault at 7f3c7c523770 ip 00007f3c7c523770 sp 00007ffffea1ee28 error 15 in SYSV00000000 (deleted)[...
0
votes
2answers
519 views

Linux - get shared memory values from Perl script

I'm trying to get shared memory information from a linux box. I'm looking for shmmax, shmmni, shmall, msgmax, msgmni, semmsl, semmns etc. How to get all those values from a Perl script. any help is ...
5
votes
5answers
7k views

Share memory between a virtual machine and the host

Through shmget and shmat, I am able to access the data stored in one program from another program. Here's the gist of the code: key=ftok("shared.c",'c'); shmid=shmget(key,1024,0644|IPC_CREAT); data=...