mmap

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
marculin
Posts: 58
Joined: Fri May 11, 2007 8:12 pm

mmap

Post by marculin » Tue Sep 20, 2011 5:00 pm

Hy, how I can see if my zoneminder use mmap or shared memory?
Thank you

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: mmap

Post by nightcrawler » Tue Sep 20, 2011 8:07 pm

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.
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

marculin
Posts: 58
Joined: Fri May 11, 2007 8:12 pm

Re: mmap

Post by marculin » Tue Sep 20, 2011 8:48 pm

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

whatboy
Posts: 304
Joined: Mon Aug 31, 2009 10:31 pm

Re: mmap

Post by whatboy » Wed Sep 21, 2011 2:29 am

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???

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: mmap

Post by nightcrawler » Wed Sep 21, 2011 7:42 am

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

Code: Select all

--enable-mmap=yes
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
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

marculin
Posts: 58
Joined: Fri May 11, 2007 8:12 pm

Re: mmap

Post by marculin » Sat Sep 24, 2011 9:21 am

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

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: mmap

Post by nightcrawler » Sun Sep 25, 2011 11:41 am

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.
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests