CPU optimization - video went idle?
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
CPU optimization - video went idle?
I'm using the LiveCD installed to hard drive, updated to .3, delightfully. Athlon 1GHz with 1G RAM, a quad-BT878 card. CPU usage seems to sit at 50% with one camera. Haven't tried camera two yet, but will be doing so shortly, I would like to see how many cameras I can pack into one 1GHz box. Thought I would attempt CPU optimization of the C/C++ code first (kernel already done). So I got the source, unpacked, set CFLAGS and CXXFLAGS at "-march=athlon -O2" as part of the configure, did it, no errors, then 'make'; no errors. Found the ELF binaries (zma, zmu, etcetera). Shut down the zoneminder service. Copied my Athlon-optimized binaries to the working locations manually, in order to not mess things up beyond my ability to repair! Started the zoneminder service. The web service worked fine, but my video device was listed as "Idle", even though it was still "Enabled". I also could not "Disable" the device in order to "Enable" it again. Also could not figure out why this was happening. Anyone have an answer?
I ended up shutting the service down again, running rpm -U --force on the .3 RPM file, and doing a reboot, which got everything up again, albeit non-optimized.
I ended up shutting the service down again, running rpm -U --force on the .3 RPM file, and doing a reboot, which got everything up again, albeit non-optimized.
Try it this way.
Snag the src.rpm here:
http://www.fairpoint.net/~rdmelin/RPMS/SRPM/
rebuild it with:
"sudo rpm --rebuild --target=athlon zm-1.22.3-4_20060mdk.src.rpm"
And install with rpm -U --force
I think you will see a greater performance boost by installing the jpeg-mmx enabled rpms found here:
http://www.fairpoint.net/~rdmelin/RPMS/ ... jpeg-simd/
Have fun
Snag the src.rpm here:
http://www.fairpoint.net/~rdmelin/RPMS/SRPM/
rebuild it with:
"sudo rpm --rebuild --target=athlon zm-1.22.3-4_20060mdk.src.rpm"
And install with rpm -U --force
I think you will see a greater performance boost by installing the jpeg-mmx enabled rpms found here:
http://www.fairpoint.net/~rdmelin/RPMS/ ... jpeg-simd/
Have fun
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
Well, I know a little bit...just enough to get myself into lots of trouble and do some good
I just installed the MMX-enabled jpeg libraries. Very interesting result. CPU usage is just a tad lower, but memory usage is half. Half! Quite an advantage! Thanks much!
I'll try the other shortly
I just installed the MMX-enabled jpeg libraries. Very interesting result. CPU usage is just a tad lower, but memory usage is half. Half! Quite an advantage! Thanks much!
I'll try the other shortly
Last edited by jonathanbrickman0000 on Thu Feb 01, 2007 8:25 pm, edited 1 time in total.
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
Help? Also, --rebuild itself doesn't seem to be an option published in the rpm man file?
Code: Select all
[avscshop Desktop]$ sudo rpm --rebuild --target=athlon zm-1.22.3-4_20060mdk.src.rpm
--target=athlon: unknown option
[avscshop Desktop]$
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
rd, are there any other system optimizations you might recommend? There used to be kernel optimizations for heavy PCI bandwidth, and maybe other things similar. I wonder also what would happen if I switched to Gnome or XFCE. Gnome packages seem to exist for this Mandrake, but not XFCE, I imagine I would have some trouble getting that to work.
Sorry, it should be "sudo rpmbuild --rebuild ..."
I put up a athlon zm RPM at the same site if you just want to grab it.
You can reduce load alot by not running an X server. If you need to run the frontend on the same box I find I can reduce load by switching to mpeg streaming. Konqueror with kmplayer works better for this than firefox with mplayer-plugin. Konq doesn't do streaming mjpeg though.
I put up a athlon zm RPM at the same site if you just want to grab it.
If you're going for performance the lightest window manager would be icewm which is installed already. Either gnome or xfce could be installed using the package manager.I wonder also what would happen if I switched to Gnome or XFCE.
You can reduce load alot by not running an X server. If you need to run the frontend on the same box I find I can reduce load by switching to mpeg streaming. Konqueror with kmplayer works better for this than firefox with mplayer-plugin. Konq doesn't do streaming mjpeg though.
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
That's astonishing, I would have thought the MPEG overhead would be highest of all. I'll hopefully have time to try it today.
It seems that my 1GHz / 0.5G RAM box is something akin to one-camera-sufficient horsepower, I'm not certain I can optimize it enough for two cameras unless I go down to 5 fps each. What do you think?
It seems that my 1GHz / 0.5G RAM box is something akin to one-camera-sufficient horsepower, I'm not certain I can optimize it enough for two cameras unless I go down to 5 fps each. What do you think?
-
- Posts: 8
- Joined: Wed Jan 31, 2007 3:49 pm
- Location: Topeka, Kansas, USA
One more speed increase: Just updated my glibc and related libraries, automatically using urpmi (I did have to set update repository names). Cut one-camera CPU modect no-alarm from 50% to 25%. Apparently they really worked on that glibc for the updates. I might try to optimize that for athlon and see what happens.