Wanted to post another update. Updated to 6893 this morning. Removed my sleep and service stop commands from rc.local and rebooted. CPU seems to be in check again. Thanks for all your hard work!
Posts made by baggar11
-
RE: HIGH CPU Fog Services after update r5029 v6759
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott said:
@baggar11 Okay, I’ve added a sleep time of 10 seconds, just in case of these situations where the int returned is 0. We must have at least 1 second sleeptime ( I believe ), and this just isn’t happening.
The only word of caution I can think of, now, is while this might help with CPU Cycles, it will not make the FOG Services actually work properly as from Ubuntu’s standpoint the service is already running. While I could, potentially, come up with a way to restart the services more appropriately, I don’t know where to start at the moment.
I’m not a coder so take this with a grain of salt. The following is a similar approach to another open source project I use.
Make a script to run as a cron job every 5 minutes. On 1st boot, the script essentially checks for things like MySQL and network being up, and if all checks out starts the FOG services. All other times it runs, it would really only check for FOG services running and then exit. heh…
Of course, it’s probably a waste of time as I assume systemd will probably take care of these things more intelligently than regular init and/or upstart. Which Fedora is already using and Ubuntu’s next LTS will be running.
I really appreciate you taking a look into these things Tom. FOG is a very cool project.
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott said:
@baggar11 as I understand it, this is still potentially due to starting the services before its dependencies have started. This is different from the pegged on update, I think.
Can you simply try reinstall and see if it’s still happening? Or did update always work, only reboot caused these issues?
For my upgrades, anything after 6753 would peg my cpu after a reboot. During and after the upgrade process using the install.sh, everything was fine. It’s only after the reboot that the services would max out the cpu. Probably the infinite loop issue as you wrote about below.
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott said:
@baggar11, @Raymond-Bell I believe I may have fixed this now.
With any luck, this issue will be gone now. Please update and let me know.Just updated to 6795, removed my “restart” lines from rc.local and rebooted. CPU was pegged again. Restarting the services manually brought cpu back down to idle.
-
RE: HIGH CPU Fog Services after update r5029 v6759
I just realized after going through another git pull upgrade that the CPU spike will probably happen every time since the services are reinstalled. Here’s how I fixed my problem again, hopefully in a cleaner way. After upgrading to 6791, it seems to be working so far with a couple reboot tests.
Add this to your rc.local. Adjust sleep time based on your setup. My FOG setup is virtual, so 5 seconds seems to work well.
sleep 5 service FOGImageReplicator restart service FOGMulticastManager restart service FOGPingHosts restart service FOGScheduler restart service FOGSnapinReplicator restart
-
RE: HIGH CPU Fog Services after update r5029 v6759
Sorry guys! I have been rolling the dev version for so long without issue, I totally forgot about the startup services possibly being an issue. I’m all set now. Here’s what I did.
Ran this on each service
sudo update-rc.d FOG*service* disable
Then, as suggested, added these line to my rc.local
sleep 5 service FOG*service* start
-
RE: HIGH CPU Fog Services after update r5029 v6759
One thing that I noted was interesting was after an upgrade, cpu cycles are normal. System is idling. FOG WebUI works fine, no issues.
Once I restart the virtual machine and the FOG services start up on boot, that’s when those 3 services start consuming all of the cpu.
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott Uptime is now at 17 minutes and nothing has changed in CPU cycle regard.
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott For a full view of processes, I gave an output of ps aux | grep FOG down below. These are the top 3 though.
FOGImageReplicator
FOGMulticastManager
FOGSnapinReplicator -
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott Here’s what I’m seeing after stopping all services, clearing the logs and then rebooting.
cat error.log [Wed Mar 16 16:10:53.258602 2016] [mpm_prefork:notice] [pid 946] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations [Wed Mar 16 16:10:53.258795 2016] [core:notice] [pid 946] AH00094: Command line: '/usr/sbin/apache2' [Wed Mar 16 16:11:35.735081 2016] [:error] [pid 950] [client 192.168.10.15:53300] PHP Strict Standards: Only variables should be passed by reference in /var/www/fog/lib/pages/dashboardpage.class.php on line 71, referer: http://192.168.10.14/fog/management/index.php
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Wayne-Workman Here you go. 500 lines of logs.
EDIT: Forgot to select Image Replicator. Here it is.
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Wayne-Workman My screen wrapped in my terminal. The “G” is in fact there when I full screen and grep the ps output again.
-
RE: HIGH CPU Fog Services after update r5029 v6759
I’m still seeing the issue on the newly pushed 6775. ImageReplicator, MulticastManager and SnapinReplicator seem to be taking all of the cpu load at around 31.6%
ps aux | grep FOG root 814 31.6 2.3 196196 23976 ? R 15:39 0:44 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FO ImageReplicator root 846 31.6 2.3 196244 24116 ? R 15:39 0:44 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager root 869 31.5 2.3 196196 24068 ? R 15:39 0:44 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator root 916 0.0 1.8 274228 19244 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGImageReplicator/FO ImageReplicator root 918 0.0 1.9 274404 19344 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGMulticastManager/FOGMulticastManager root 939 0.0 1.8 274096 19172 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGSnapinReplicator/FOGSnapinReplicator root 1001 0.1 2.3 196200 24092 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler root 1031 0.1 2.3 196200 24136 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts root 1127 0.0 1.9 274696 19620 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler root 1150 0.0 1.9 274436 19652 ? S 15:39 0:00 /usr/bin/php -q /opt/fog/service/FOGPingHosts/FOGPingHosts
-
RE: HIGH CPU Fog Services after update r5029 v6759
@Tom-Elliott Thanks Tom. Have these changes been pushed to Git too? That’s what I’m using…
-
RE: HIGH CPU Fog Services after update r5029 v6759
I can confirm the 100% cpu usage issue. I don’t have any storage nodes in my setup and have a c2750 based atom processor running my FOG virtual machine. I only have 2 test images, each around 1G.
I found that when I downgraded to version 6753, the high cpu usage disappeared. 6755, 6757 and up all produced the issue.
The next git commit has this in the log.
Author: Tom Elliott <tommygunsster@gmail.com> Date: Wed Mar 16 00:42:03 2016 +0000 Ensure variables are set even on initial startup (init.php). git-svn-id: https://svn.code.sf.net/p/freeghost/code/trunk@5027 71f96598-fa45-0410-b640-bcd6f8691b32
Hope that helps!
-baggar11
-
RE: FOG Git Installation on Ubuntu 14.04
Can you be more specific on where to enable the “size on server” setting? I’ve looked in the FOG settings and am not seeing it.
EDIT: Nevermind, found it! FOG_FTP_IMAGE_SIZE. Thanks!
-
FOG Git Installation on Ubuntu 14.04
Hi Guys,
I recently installed FOG from Git and ran into a couple things. Hope this is in the right section.
-
The Apache portion of the installation on Ubuntu 14.04 fails. The FOG web stuff is installed correctly into /var/www/html/fog, but the /etc/apache2/sites-enabled/001-fog.conf points to /var/www.
-
Previously on v1.2.0 when viewing “images” via the webgui, there was a column for “size on server” which was pretty handy. Is there a configuration setting that I can enable to bring this back?
Everything else seems to be working great. Thanks!
-
-
RE: BTRFS Support?
I’ll start a new thread about the ext4 issues on trunk. I’ll poke around a little bit more. I doubt the HD is going bad though, all of my test machines and FOG server are virtual machines.
-
RE: BTRFS Support?
Thanks Tom. I just got around to building up a Fog Trunk based installation. BTRFS file systems are recognized now and take much less time. Thanks!
A couple things I’ve noticed though.
- On installation, the apache config points to /var/www, which on ubuntu 14.04 is now /var/www/html. The v1.2.0 installation didn’t seem to do this.
- Under images, there is no “size on server” listed. That was kind of handy to see. Especially since there is a compression setting for images now.
- Testing an ext4 based system, I get a kernel panic when I try to run a Full or Quick registration.