Relation between Server Load and reliability

Support and queries relating to all previous versions of ZoneMinder
Locked
jethro10
Posts: 35
Joined: Thu May 10, 2007 10:28 am

Relation between Server Load and reliability

Post by jethro10 »

Hi,

When typing uptime, I get my server load figures.

at what level of load (i'm guessing '1') can I expect to start to see reliability issues?

Adding ram is a cheap and easy option. Is this really likely to help.

I am running the MMX jpeg libraries.

Thanks
Jeff
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

It depends on the CPU. Dual core hyper threaded can go to 4! However, you want to get close, but not actually hit that limit. And yes, ram is much cheaper than CPU.
jethro10
Posts: 35
Joined: Thu May 10, 2007 10:28 am

Post by jethro10 »

So an AMD Athlon 3800+ is hyperthreaded ? can go to approximately, but just below 2 ? Pardon me my knowledge of processors is a little limited.

And a few gig's of ram will help?

Thanks

Jeff
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

I do not know. If you are in Gnome, you can look in the device manager and see how many processors it sees. That is the number you can target.

And yes, bumping the ram and reserving more shared memory can help when you have a lot of video.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

a 3800 (if not an x2) is a single core / processor so a load above 1 means there is always 1 thing in the queue.

If your always at 1 ir above you will have issues and they may not be ram issues, linux needs less ram to work well than windows

what are you asking of this machine
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jethro10
Posts: 35
Joined: Thu May 10, 2007 10:28 am

Post by jethro10 »

jameswilson wrote:a 3800 (if not an x2) is a single core / processor so a load above 1 means there is always 1 thing in the queue.

If your always at 1 ir above you will have issues and they may not be ram issues, linux needs less ram to work well than windows

what are you asking of this machine
Thanks.

I'm on 6 camera now, at 1/2 pal size, cant remember its numbers, i'm not there now( something x288 ?)
monitoring and capturing at 2fps.
we're up to about 0.6 load when modetect and was trying to 'guess' how many more cameras I could get on it.
We were hoping for 11-12.
There would be no issue in buying another server, except it's one more box which I was trying to avoid.

Thanks
Jeff
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Wikipedia has an excellent description of what load actually /is/ - http://en.wikipedia.org/wiki/Load_%28computing%29

Adding more memory can help, but only if that's causing disk swapping.

"htop" is a much better program to monitor, realtime, load (including multi processor load) memory usage (know what cached memory is before you panic that it's all in use)

Server balancing is an art...

(FWIW, I have a x2 amd 4600 running my server. It's loads are typically in the 1.5 to 4 region (normally slightly above or below 2.0) and has proved very reliable. Almost a year uptime for the box, and well over six months continuous running for ZM)
jethro10
Posts: 35
Joined: Thu May 10, 2007 10:28 am

Post by jethro10 »

Flash_ wrote:
(FWIW, I have a x2 amd 4600 running my server. It's loads are typically in the 1.5 to 4 region (normally slightly above or below 2.0) and has proved very reliable. Almost a year uptime for the box, and well over six months continuous running for ZM)
Yeah,
thanks
J
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

reducing load

Post by darkpaw »

Here's a few other tips that may be of value. Remember that it's not just load/activity that kills it, it's context switching. So even if something isn't really CPU intensive, the fact that it runs at all can cause load to increase.

1. Shut off any hardware in the BIOS you don't need. Some things off the top of my head would be sound card and modem on the motherboard, if you have them. If you have a PCI soundcard, rip it out. Having these in can cause daemons like kgameportd and ac97 to run and waste performance for nothing. This is a video capture / web server, not a system for playing games. :) Shut off anything not related to what you need.
2. Remove all daemons you don't need. Right off the bat you can nuke anything with bluetooth in it (unless you are using it, which is unlikely in most cases with a ZM server) :) hardware detection (hald), and ACPI (acpid) -- the system will likely be running 24/7, so it doesn't need to suspend via ACPI.
3. CUPS and cups-config-server can be shut off unless you intend on printing a capture. In that case, you can manually start the daemon when you need to print. Same thing goes for stuff like hplip for printers, as well.
4. If you have the ability to run it in text mode only, do it. Change your run-level from 5 to 3 in inittab, and lose X-windows. Everything in ZM can be done remotely, and having X/Xorg running when not doing anything eats up a lot of cycles (usually in top 5-10 processes if following it in top, even when it is sitting idle). Then if for some reason you need the UI on the console, run "init 5" from the console shell when you login.

I was able to reduce the load on my server by almost .5 by just doing these few steps that I forgot about after I reinstalled my setup on Fedora Core 5. Other Linux variations will likely be similar. A ton of processes are often started that you won't need...just shut them off, it helps.

Also, if you have a SCSI RAID card, do all writing via cached write instead of direct, and chuck the biggest RAM chip you can on the controller.
jethro10
Posts: 35
Joined: Thu May 10, 2007 10:28 am

Post by jethro10 »

I was just thinking.

jpeg compression. If space is not an issue, which it isn't for what we want, is setting a less compression figure better as it may use less processing power?
any thoughts ?

Thanks
Jeff
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i think its the opposite, ie the higher the compressin the more it strips from the image and thus less work it has to do. but thats only from crude tests, and the diffrence is minimal
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Locked