General help for a noob

Forum for questions and support relating to the 1.24.x releases only.
Locked
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

General help for a noob

Post by troyy0206 »

After working with ZM for a few weeks (I admit I’m not a Linux guru) I have decided to ask some questions at the risk of being redundant. It seems that most people would have very similar questions, but I do not see a general FAQ that might help many of us who are unfamiliar with specifics of general items, not necessarily ZM. I will post my questions here in hopes of not getting flamed too much with RTFM responses. I have searched the forums, looked through the wiki and just can’t seem to find what I’m looking for. I will preface my questions with the configuration I’m looking for because I’m sure it has an impact on what I’m trying to do. Most people probably use ZM with just a few cameras and don’t encounter the issues I’m having, so I hope this helps. I would like to have a few servers set up with approximately 15-20 cameras per server. I have several Rackable Systems 1U servers that are dual 3.2GHz XEONs, 4GB RAM and a 1.5TB drive. The hard drive is SATA but the servers had PATA interfaces so I used a small adapter from Startech to interface the drive to the system. It seems to work well. The cameras are mostly going to be running 320 x 240 and about half of those or more can be B/W. A few will be 640 x 480 color (watching cash drawers). I’m planning to have a few cameras on each server recording 24/7 while others will be motion detection.

1. I am currently trying the ZMLarch distribution. It installs fine and after a couple tweaks that appear to be errors in the build, seems to work ok. I looked at the ZMLive DVD but it looks like it installs a lot more than is needed and I was fearful of performance issues, ZMLarch seems simpler and more lightweight. Am I right? Is there any stability or performance issues with one over the other? Remember, I’d like to run about 15-20 cameras on each server.

2. Not having tried the ZMLive DVD with several cameras, I cannot comment on how it works, but with ZMLarch I seem to have a lot of issues once I put more than a few cameras on, say more than 5-7. From what I can tell, the disk I/O seems to be high and what appears to be browser hangs might just be long wait times. Sometimes it times out and a refresh loads it back up. I’ll provide more details in my further questions about some settings that may affect this.

3. What are the differences between RTP, RTSP, and HTTP and how does that affect performance within ZM? What about MPEG-4, MJPEG and JPEG? I read some things that seem to indicate that MPEG-4, while other software vendors say it’s best, isn’t the best performance on ZM because it has to be converted to JPEGs, is that true? If so, why even have the presets for MPEG and MJPEG? I’m confused on this and about which one to use. My cameras are Axis 210, 209, 216, and P3343s. All of them support all methods but there doesn’t seem to be a good explanation out there that I can find that explains which is the best to use.

4. I was first experimenting with 15fps with motion detection on about 20 cameras. CPU was running about 45%, which should be ok, but the system was almost non-responsive, possibly because of disk i/o? I had set the pre/post event buffer to 45/90 respectively to get 3 seconds before the event and 6 seconds after the event (ring buffer at 90). After reflecting on this, it seems that might be one source of my disk i/o issue. With Motion Detection on, 20 cameras at 15fps meant 300 images per second written to disk and subsequently deleted at some point if they were not needed. Is that correct? For less important cameras I guess I should look at dropping them to 4-5fps and distribute the more important cameras with higher resolution and fps across the different servers to even the workload. Comments?

5. I was reading about the load value and it is said to be divisible by processors, so in this case where I have dual XEON, if the load is 6, it’s really 3 per cpu. The footnote says, “if SMP is enabled for your kernel build). Can anyone tell me if it’s enabled in the ZMLarch build? I can’t find any way that would indicate if it is or not using TOP or Conky, or maybe I just don’t know how.

6. Can someone point me to a good resource that explains the general guidelines for setting up motion detection zones and what each of the presets means? This is one area that aside from playing around with to see what seems to work, I haven’t been able to find much on.

7. The servers I have only have a bay for a single hard drive and adding in a card for external storage is probably not a possibility. It has a slot but I’d have to find a riser card and controller card that would fit, etc. I’m hoping no one responds with “no way a PATA interfaced SATA drive can handle more than a couple cameras.â€
Flasheart
Posts: 342
Joined: Thu Jul 06, 2006 2:27 pm

Post by Flasheart »

Not silly questions at all. The wiki also has a lot of info.

3) MPEG4 is the newer standard amongst IP camera manufacturers, and on the cheaper end is often the only option available. It was added to zm purely to support such cameras. If your camera can support jpg/mjpeg you may well get better performance using that.

4) Hard to say, but 20 cams could indicate an io issue. You really need to do some digging with linux tools. htop can be set to show where the cpu load is going (iowait is a big performance killer) - and other tools like iotop can help here.

5) run htop, it'll give you a cpu bar per "cpu". And yes, each core = 1 cpu to linux, so a 4 core machine running at a load of 4.0 is roughly 100%. However, cpu is just one aspect of load - wikipedia has a good article of what load actually is that might be worth a read.

8) If guides exist, they are specific to individual cameras.

Your final para - stick with it. You have the right approach to succeed and show a willingness to learn. You'll get there soon enough. ZM will save you/your company a lot of money. Plenty of professional users run it (I'm not as such, but I run 40 odd cams on 3 servers) and setting up commercial software is no picnic either.
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

Flasheart wrote:Not silly questions at all. The wiki also has a lot of info.

3) MPEG4 is the newer standard amongst IP camera manufacturers, and on the cheaper end is often the only option available. It was added to zm purely to support such cameras. If your camera can support jpg/mjpeg you may well get better performance using that.

4) Hard to say, but 20 cams could indicate an io issue. You really need to do some digging with linux tools. htop can be set to show where the cpu load is going (iowait is a big performance killer) - and other tools like iotop can help here.

5) run htop, it'll give you a cpu bar per "cpu". And yes, each core = 1 cpu to linux, so a 4 core machine running at a load of 4.0 is roughly 100%. However, cpu is just one aspect of load - wikipedia has a good article of what load actually is that might be worth a read.

8) If guides exist, they are specific to individual cameras.

Your final para - stick with it. You have the right approach to succeed and show a willingness to learn. You'll get there soon enough. ZM will save you/your company a lot of money. Plenty of professional users run it (I'm not as such, but I run 40 odd cams on 3 servers) and setting up commercial software is no picnic either.
Makes sense on MPEG-4. Thanks for the encouragement. I, of course, feel more comfortable on Windows based software because I understand it better, so the commercial windows apps don't scare me much except for the price . :shock:

I've never been one to pooh on Linux just because I don't understand the inner workings, I know it's my weakness and not the OS. I read about LFS last night and think I'll take on that project as soon as I have time. I figure that will help me a lot, as I'm a learn-by-doing kind of person.

If anyone has any advice on these or the other questions, I'm all ears. I found a lot of useful information the past 24 hours or so about how the standalone DVRs are rated in total fps and such. I feel more comfortable than I did last night after all that research, but more input is certainly welcome from the community on my questions.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

Hi,

I wouldn't use ZoneMinder if it was a windows software, i don't trust windows as much as i trust linux.. registry corruptions and many other problems.
Linux may seem very difficult and scary when you look at it from a distance, but its really not that hard, and doing certain things in windows is much harder.
I use gentoo in both desktop computer and ZM computer. I recommend you install gentoo using the handbook, Its a great distro and you will learn a lot about linux and its inner workings just by installing it from the handbook.
All you need is to download and burn the minimal CD and follow the handbook (online) carefully.

mastertheknife
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Setup basics questions

Post by troyy0206 »

I'm using the ZMLarch build for 1.24.2 and trying to learn the best way to set it up. The servers are dual 3.2GHz XEON, 4GB, with a single 1.5TB drive. Again, I'm not real familiar with the "proper" way to set up a system. The first system was set up more or less blind--I had just a very basic understanding, so I set it up with a 1.45TB root partition, put /home on a 25GB partition and about a 5GB swap partition. The first two partitions were defaulted to EXT3. Once I put 10-15 cameras on it, the performance was horrible. Load stayed around 5-6 and shot up as high as 10-12 and disk I/O seemed to be extremely high.

After doing a great deal of research, reading posts, etc, I took a different approach with the second server. I set it up with a 25GB root partition, put /var on a 1.45TB second partition and the 5GB swap partition. However, in addition to the different partition arrangements and putting /var instead of /home on it's own partition, I used reiserfs instead of EXT3. This server seems light years ahead of the other one with performance. I haven't had time to rebuild the first one to see if there is any type of hardware problem or if it's simply a bad configuration.

Any advice on the basic configuration? Am I doing the right thing on the second config?
Locked