I own a small computer store, one of the things we do is setup small businesses with Fedora Core 3 (Thinking about switching to debian) servers which usually act as a basic file/print/email/web server for their business.
We are going to be offering ZoneMinder solutions pre configured as an option with these same servers. They will basically be an all in one business server providing all the basics a small businees might require.
The specs on these servers usually isn't anything special, AMD 3000+/1GB DDR/250GB HD.
Something I have noticed during my testing of the zoneminder setup in the office is that doing a print job either via a smb print share over the network OR from the server machine itself is VERY slow IF a camera is recording at the same time as the print job. If no cameras are recording it is fast as can be. This is easily remedied by adjusting the "nice" value of the zma processes to 19. This allows the other processes such as the cups printing service to do what it needs to then give it all back when done. Video quality/performance is not effected with this new value.
My Question... how to do this automatically during startup? I did this manually using top and adjusting the nice value after startup. I need this to be done automatically when zm starts up. This would seem to be done in the "zmpkg.pl" file but I can't seem to get anything to work.
Any help would be greatly appreciated.
Thank You!
adjusting zma process priority "nice" value
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
***UPDATE***
I made a temporary workaround, but I'm sure there is a much more eligant way to do this. Perhaps something where it is an adjustable value in the DB for "nice value"
I added this to the end of the init script in /etc/init.d/zm
I added this just above the exit command:
It Now Looks Like This:
I made a temporary workaround, but I'm sure there is a much more eligant way to do this. Perhaps something where it is an adjustable value in the DB for "nice value"
I added this to the end of the init script in /etc/init.d/zm
I added this just above the exit command:
Code: Select all
ps awx | grep "/usr/lib/zm/bin/zma -m" | grep -v grep | awk '{print $1}' | xargs -i renice 19 -p {}
It Now Looks Like This:
Code: Select all
esac
ps awx | grep "/usr/lib/zm/bin/zma -m" | grep -v grep | awk '{print $1}' | xargs -i renice 19 -p {}
exit $RETVAL
Last edited by gsrturbo on Wed Aug 10, 2005 5:24 pm, edited 1 time in total.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Thank you for your reply Phil, you just beat me to my update!
Yes after looking into it a bit more it does seem a little tougher than I thought to modify the nice value of JUST the zma process.
This does what I need it to so I guess all is well.
Just so you know we plan on donating a percentage of all zomeminder setup sales. It is well deserved for your hard work into this great piece of software! I encourage others setting up ZM for profit to do the same, it is the least we can do.
Thanks Again!!!
Yes after looking into it a bit more it does seem a little tougher than I thought to modify the nice value of JUST the zma process.
This does what I need it to so I guess all is well.
Just so you know we plan on donating a percentage of all zomeminder setup sales. It is well deserved for your hard work into this great piece of software! I encourage others setting up ZM for profit to do the same, it is the least we can do.
Thanks Again!!!