Shared Memory - 16 Cameras

Forum for questions and support relating to the 1.24.x releases only.
Locked
quietas
Posts: 102
Joined: Wed May 23, 2007 5:30 pm

Shared Memory - 16 Cameras

Post by quietas »

Using the info I got here: What does a 'Can't shmget: Invalid argument ....
I ran through the calculations for shared memory and I think I am either way off or I need to get much more RAM.

I'm building up 16 cameras and would prefer to run them at 640x480 with 10fps and 24bit color. It seems 40 frames is the default image buffer, but 100 frames seems to be the recommended.

I've got 8gb RAM currently and a decent Core2 Quad processor along with a pair of striped 1tb hard drives along with a pair of 8 channel PV-981 cards (PV-150 equiv with PCI-E). The machine had been planed for 8 cameras but after it was ordered the instructions came down that I needed to plan for more overlapping coverage.

307200 = 640X480 pixels
7372800 = * 24 bit color
737280000 = * 100 frame ring buffer (image buffer)
11796480000 = * 16 cameras
11520000 = / 1024 for kilobytes Convert
11250 = / 1024 for megabytes convert

Is my math completely wrong in stating I need over 11 gigs of RAM? If so, what settings should I be looking at? Also how should I best tweak the settings to get the most out of the system?
quietas
Posts: 102
Joined: Wed May 23, 2007 5:30 pm

Post by quietas »

I forgot to mention, yes I am using a Ubunt 64bit and it is using all 8gb of RAM
quietas
Posts: 102
Joined: Wed May 23, 2007 5:30 pm

Post by quietas »

OK, I'm a putz. I was doing the conversion to Kb and Mb, but I had not done bits to bytes.

Code: Select all

(Width*Height*Depth*Buffer*Cameras+(1*overhead))/bytes/kilobytes/megabytes
(640  *480   *24   *80    *16     +(1*.10)     )/8    /1024     /1024       = 1,125 Mb RAM
Also, does the shmall and shmmax need to be the same as the the first example in the wiki shows? Or should the two be different as shown a bit below that? If so, what should the ratio be?

If I ./configure with the --enable-mmap=yes command does that just bypass the need fore the shared memory now?
Locked