/dev/shm

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

/dev/shm

Post by alabamatoy »

How big should /dev/shm be?

Under normal circumstances, how full should it be? Mine seems to run around 72%, but when I start viewing monitors live, it tends to grow, 88% or more. Its actually hit 100% recently, which of course caused all sorts of unpleasantness. It also did not clear itself upon stopping ZM, so I went in there with a machete and cleaned it out.

If I want to resize /dev/shm (make it bigger) how do I do this? Just a moment ago, it showed Size 3.83 GiB Free 490.31 MiB

BTW, I cannot seem to find anything in the documentation about /dev/shm The conf files seem only to prescribe it as the swap file, but I cannot find any size configuration anywhere.
jperkins
Posts: 50
Joined: Sat Jan 23, 2021 11:08 am

Re: /dev/shm

Post by jperkins »

This is how my /etc/fstab is setup to devote eighty percent of my memory to shared memory. I think by default fifty percent is allocated. Also thought this is partially covered in some zoneminder docs.

Code: Select all

tmpfs /dev/shm tmpfs defaults,noexec,nosuid,size=80
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: /dev/shm

Post by alabamatoy »

jperkins wrote: Fri Jan 29, 2021 3:34 am Also thought this is partially covered in some zoneminder docs.
Well, it kinda is, here. My real question is, what should I shoot for as far as a usual ZM displayed percentage? When I open a couple of monitors, I'm seeing 88%-92%...the documentation doesnt say anything about what that actual consumption should be.

And if I change the fstab, does that require a reboot? Even this doesnt seem to clearly address that.
jperkins
Posts: 50
Joined: Sat Jan 23, 2021 11:08 am

Re: /dev/shm

Post by jperkins »

I'm gonna say yes to the reboot. you could probably google a solutions that doesnt require a reboot, but I just rebooted.

My /dev/shm is reported at 57% and doesnt seem to change just by opening a monitor. However I am running in mocord mode with h264 passthrough feeds.

I was getting errors and was told to increase the 'Image Buffer Size (frames)' . probably because I was analyzing at too much fps. so that is why I turned up my shared memory. Cant give you an exact number to shoot for
VicThor
Posts: 39
Joined: Tue Oct 13, 2020 8:47 pm

Re: /dev/shm

Post by VicThor »

add this to fstab to be persistent across reboots (this is for 8G)

none /dev/shm tmpfs defaults,size=8G 0 0

and so you do not reboot this time do:
mount -o remount,size=8G /dev/shm
Post Reply