Page 1 of 1

memory tweaks

Posted: Thu Sep 03, 2009 1:00 pm
by gian
does v.1.24.2 need the same memory tweaks as v.1.23.x?

-G

Posted: Thu Sep 03, 2009 8:38 pm
by cordel
If you configure ZM to use shared memory, yes.
Mapped memory does not require adjusting shared memory.

Posted: Fri Sep 04, 2009 6:43 am
by gian
I guess I overlooked this, when I launched ./configure...

Now it is too late to switch, am I correct?

I can't seem to be able to use the highest rez of my Axis 211M even with:
kernel.shmall = 268435456
kernel.shmmax = 268435456

Just wanted to try the other memory management to see if the problem is there.

Posted: Fri Sep 04, 2009 8:00 am
by cordel
It should not really make to much of a difference. You could make clean, then rerun configure and make install it. You don't have to reload the DB, only adjust the ZM_PATH_MAP path or create a ramdisk at the given path. But yes you do have to rebuild with the appropriate switch for the method you want to use.

Posted: Fri Nov 06, 2009 1:10 am
by alecano23
How can I know if I have configured SHARED MEMORY or MAPPED MEMORY option?

Posted: Sat Nov 07, 2009 9:37 pm
by johnnytolengo
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, mapped memory. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is 'mapped' into memory space for easy and fast access.

To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options->paths->PATH_MAP. It uses a filesystem type called tmpfs. If you type 'df' you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.<monitor> in the mapped memory filesystem.

Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.