Page 1 of 1
mmap
Posted: Tue Sep 20, 2011 5:00 pm
by marculin
Hy, how I can see if my zoneminder use mmap or shared memory?
Thank you
Re: mmap
Posted: Tue Sep 20, 2011 8:07 pm
by nightcrawler
Marculin,
please first do an search in the famus ZM wiki and
google "linux mmap howto" or atleast read the last post from 1 week ago:
http://www.zoneminder.com/forums/viewto ... 29&t=18238
If anserd an simular question there how to increase your mmap / shared memory.
Re: mmap
Posted: Tue Sep 20, 2011 8:48 pm
by marculin
nightcrawler, I've already read the post mentioned but don't solve my question,
I use opensuse 11.4 and zoneminder 1.25. I've installed from rpm.
How I can see if my RPM it's compiled with mmap or not?
Thank you
Re: mmap
Posted: Wed Sep 21, 2011 2:29 am
by whatboy
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.
http://www.zoneminder.com/wiki/index.php/FAQ
If there's nothing in /dev/shm... then???
Re: mmap
Posted: Wed Sep 21, 2011 7:42 am
by nightcrawler
If you looking for /dev/shm and if it's not there you likely do not have an shared memmory map. /shm is the default for many linux distro's with mmap but it's possible to set it to another mount path.
in my post i wrote:
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 to add the
switch to your configure line.
IE: etc/zm/zm.conf[
<<< location depends on your install path! (/usr/zm/zm.conf is also an likely place)
So look if the -- enable mmap=yes it's there:
like this string in zm.conf
Code: Select all
./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --enable-debug=yes --with-webgroup=www-data --with-webuser=www-data --enable-mmap
If you don't have MMAP in your distro. you can instal from your
admin command shell with this commands:
Code: Select all
LC_ALL=C perl -MCPAN -e shell
install Sys::Mmap
exit
Re: mmap
Posted: Sat Sep 24, 2011 9:21 am
by marculin
Thank you.
I thought we could see with a command on rpm installed.
In my zm.conf not have mmap enabled then I use shared memory.
When I start zoneminder, it create more "Shared Memory Segments" (see with ipcs).
It's raccomanded switch to mmap from zoneminder 1.25 right?
With mmap optimized system load?
Thank you
Re: mmap
Posted: Sun Sep 25, 2011 11:41 am
by nightcrawler
Mmap is more flexible than the fixed shared memory method. But in the end it's the same RAM memory that you will use.
The nice part from MMAP is that it only takes the memory that's needed for your actual config. so it don't has useless free spaces.
The downside of MMAP is that when you change an setting in your device settings. or an other memory taken option than the device will go off-line.
You have to restart ZoneMinder after an change in your device settings (like: image size, buffers, collor pallet that kind of settings).
But when your done with "playing settings" the MMAP is stable and running perfectly.
So yeah, I will prefer to use MMAP but it isn't necessary.