memory tweaks

Forum for questions and support relating to the 1.24.x releases only.
Locked
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

memory tweaks

Post by gian »

does v.1.24.2 need the same memory tweaks as v.1.23.x?

-G
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

If you configure ZM to use shared memory, yes.
Mapped memory does not require adjusting shared memory.
gian
Posts: 73
Joined: Sun Mar 22, 2009 7:51 pm

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
alecano23
Posts: 22
Joined: Thu Oct 23, 2008 1:47 pm

Post by alecano23 »

How can I know if I have configured SHARED MEMORY or MAPPED MEMORY option?
johnnytolengo
Posts: 184
Joined: Tue Oct 14, 2008 5:59 pm

Post 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.
Locked