i have 4 cards with 4 channels each one, totalizing 16 cameras.
its capturing at 0.80 fps, and have image buffer of 15 images...
i thinks its very low, but zmc uses a lot of memory, something like 60 % - 70 %..
i have 256 of ram and 256 of swap, now, 251 MB of ram and 160 MB of swap is used...
there is any way to getting this lower ? i had many out of memory problems and my solution was to grown my swap to 256... but its still an agressive use.... what can i do ?
Why is zmc using so much memory ?
- victor_diago
- Posts: 245
- Joined: Wed Jan 21, 2004 2:44 pm
- Location: Brazil, sao paulo
- Contact:
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Why is zmc using so much memory ?
Hi Victor,
This is addressed in the Troubleshooting section of the README as well as in various other threads here but in essence the amount of shared memory required is as follows
M = ((Ih * Iw * Id) * Br) + Oh
where Ih is image height, Iw is image width, Id is colour depth (usually 3, colour images), Br is the ring buffer size you defined for your monitor (default 100) and Oh is an additional small overhead. So if you have a colour image of 640x480 and have the default 100 as your buffer size then you would need around 92Mb per camera. The easiest way to reduce this is to either capture smaller images or to reduce the ring buffer size. So long as the RBS is say double the pre-event buffer size then you should be ok.
Also bear in mind that this is 'shared' memory so your 'zmc' process might look like it's using 92Mb and your 'zma' and 'zms' process might look like they are using 92Mb but it will be the same 92Mb in each case, per monitor.
Phil,
This is addressed in the Troubleshooting section of the README as well as in various other threads here but in essence the amount of shared memory required is as follows
M = ((Ih * Iw * Id) * Br) + Oh
where Ih is image height, Iw is image width, Id is colour depth (usually 3, colour images), Br is the ring buffer size you defined for your monitor (default 100) and Oh is an additional small overhead. So if you have a colour image of 640x480 and have the default 100 as your buffer size then you would need around 92Mb per camera. The easiest way to reduce this is to either capture smaller images or to reduce the ring buffer size. So long as the RBS is say double the pre-event buffer size then you should be ok.
Also bear in mind that this is 'shared' memory so your 'zmc' process might look like it's using 92Mb and your 'zma' and 'zms' process might look like they are using 92Mb but it will be the same 92Mb in each case, per monitor.
Phil,
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Why is zmc using so much memory ?
I would also add that you do not want to be using swap memory for ZM, it will not be able to keep up and will kill performance as it's accessed all the time.
Phil,
Phil,