Requirements for record

Forum for questions and support relating to the 1.31.x releases only.
Locked
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Requirements for record

Post by jamigf »

Hi, I install zoneminder 1.31.X on a asus eeepc with Intel Atom and 1Gb of RAM.
I configure 2 Ip Cam with 128X720 and 1120X840 resolutions.
If I use the cameras as Monitors all work but If I configure it to record the /dev/shm go to 100% and I see the images from just one camera.

I don't know much of the DVR and NVR but I not think the commercial NVR has much more than 1Gb of RAM so why with just two cameras the RAM go to 100%??

Thanks
Eradicator
Posts: 41
Joined: Tue Jan 24, 2017 5:58 am

Re: Requirements for record

Post by Eradicator »

This is my test server. 4 FullHD 15fps cameras:

Code: Select all

file system   size           used  avaiable       used%    mounted at
tmpfs           1,5G          1,1G  411M           73%        /dev/shm

              total        used        free      shared  buff/cache   available
Memory:     3073524      357672       88672     1118316     2627180     1395748
Swap.   :     1974268      211968     1762300
What about yours?

Code: Select all

df -h

free
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

My results are this:

Code: Select all

File system     Dim. Usati Dispon. Uso% Montato su
tmpfs           495M  356M    140M  72% /dev/shm

            total        used        free      shared  buff/cache   available
Mem:        1012676      327080       86380      512420      599216       56552
Swap:       2097148      319844     1777304
Eradicator
Posts: 41
Joined: Tue Jan 24, 2017 5:58 am

Re: Requirements for record

Post by Eradicator »

jamigf wrote: Mon Mar 05, 2018 6:19 pm My results are this:
What about fps?
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

I have two Ipcam with 30fps
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

I update the /dev/shm to 1Gb and now the situation is this:

Code: Select all

File system     Dim. Usati Dispon. Uso% Montato su
tmpfs           1,0G  356M    669M  35% /dev/shm

            total        used        free      shared  buff/cache   available
Mem:           988M        306M         66M        367M        616M        181M
Swap:          2,0G        254M        1,8G
but I don't know if it is correct to update the /dev/shm....
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Requirements for record

Post by bbunge »

Your system with 1 GB RAM is hardly enough. Most Linux systems use half of the RAM for tmpfs. You may be able to run those cameras but set the res down to 320x240 and see how that works.
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

Thankyou for answer. So If I want to use 5 cameras with 1920*1080P 15fps how much RAM I need??
I want the 5 cameras works in record mode.

Thanks
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Requirements for record

Post by rockedge »

do you require such High Def at constant recording? Perhaps using 2 streams per camera 1 at low res to monitor motion and then record when activated a second High Def stream. That way you may not need the biggest RAM increase. Although there is a formula to calculate the amount of RAM you will need.
viewtopic.php?p=68653#p68653
https://wiki.zoneminder.com/Math_for_Me ... o_optimize
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

Ok so I need minumun 2Gb of RAM....
so I don't understand why is need to much memory....
If I buy a cheap NVR with 8 channels I don't think it has 2Gb of RAM....
So why ZM need more memory???

Thanks for answers
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Requirements for record

Post by rockedge »

NVR record video......ZM can do that but also ZM does motion detection analysis which when the streams supplied are in high resolution will require more RAM to fit the frames needed to do this function.
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

Ok so if I want use zoneminder to just record video like NVR do? Can I set ZM to do this?
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Requirements for record

Post by bbunge »

Most Linux distros use 1/2 of the RAM for tmpfs which includes the /dev/shm folder. Zoneminder creates a file in /dev/shm for each camera. For my cameras set to 640x480 the size of each file is 59 MB. The higher the camera resolution the larger the file. You also need to keep in mind the memory required to run the database server. The more events the more RAM MySQL will use. MySQL may also need to use more RAM for more connections as you add cameras.
You should start with one camera and check the usage of tmpfs or /dev/shm. Lower the resolution by half, restart Zoneminder and see how much space in /dev/shm you gain. You are not creating HD movies so 640x480 at 5 FPS should be great to catch motion.
You can play around with the drive settings to give more of your RAM to tmpfs but you will in the long run be better off to stick with Linux defaults. You can also change things to the point where your PC becomes a brick and you have to reinstall the OS. Yes, you can run Zoneminder on a Linux server system with 1 GIG of RAM with maybe two low res cameras.
Your netbook is not very powerful and has a small - slow hard drive. If I remember correctly the processor will only go up to 2 GIG RAM. You would be better off to find an old Pentium 4 desktop in a recycle bin somewhere.....
jamigf
Posts: 13
Joined: Mon Mar 05, 2018 10:31 am

Re: Requirements for record

Post by jamigf »

Thank you for your exaustive answer.
So if I want to use zoneminder to not do motion capture but just record the video from cameras it also require more than 2 Gb with 4-5 HD cameras?
Locked