Weathermap high CPU Utilization

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
gben
Posts: 10
Joined: Fri Apr 03, 2009 7:42 am

Weathermap high CPU Utilization

#1 Post by gben » Thu Apr 26, 2018 2:05 am

Hi All,

I am trying to migrate one cacti installation to a new server
Old server : Ubuntu - mem 8Gig 4CPU
New server: Centos - mem 8Gig 8PU
Everything is working fine except the time that takes weathermap to create the map/png :(
When the weathermap runs the CPU utilization is 100%, memory is normal
Whith a simple map, 2 routers with some links between them ,everything is OK.
At the OLD server with 3maps it takes 8 sec:

04/26/2018 09:40:12 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.98 run complete - Thu, 26 Apr 18 09:40:12 +0300: 3 maps were run in 8 seconds with 0 warnings.
04/26/2018 09:40:12 AM - WEATHERMAP: Poller[0] [Map 15] Athens-LAN.conf: Wrote map to /usr/share/cacti/site/plugins/weathermap/output/4fc4a269e9163e1a6f66.png and /usr/share/cacti/site/plugins/weathermap/output/4fc4a269e9163e1a6f66.thumb.png
04/26/2018 09:40:11 AM - WEATHERMAP: Poller[0] [Map 15] Athens-LAN.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
04/26/2018 09:40:11 AM - WEATHERMAP: Poller[0] [Map 15] Athens-LAN.conf: Map: /usr/share/cacti/site/plugins/weathermap/configs/Athens-LAN.conf -> /usr/share/cacti/site/plugins/weathermap/output/4fc4a269e9163e1a6f66.html & /usr/share/cacti/site/plugins/weathermap/output/4fc4a269e9163e1a6f66.png
04/26/2018 09:40:10 AM - WEATHERMAP: Poller[0] [Map 8] OTEglobe_PoPs.conf: Wrote map to /usr/share/cacti/site/plugins/weathermap/output/8ba005f0669b326003f6.png and /usr/share/cacti/site/plugins/weathermap/output/8ba005f0669b326003f6.thumb.png
04/26/2018 09:40:09 AM - WEATHERMAP: Poller[0] [Map 8] OTEglobe_PoPs.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
04/26/2018 09:40:08 AM - WEATHERMAP: Poller[0] [Map 8] OTEglobe_PoPs.conf: Map: /usr/share/cacti/site/plugins/weathermap/configs/OTEglobe_PoPs.conf -> /usr/share/cacti/site/plugins/weathermap/output/8ba005f0669b326003f6.html & /usr/share/cacti/site/plugins/weathermap/output/8ba005f0669b326003f6.png
04/26/2018 09:40:07 AM - WEATHERMAP: Poller[0] [Map 7] OTE.conf: Wrote map to /usr/share/cacti/site/plugins/weathermap/output/ec6d92f5049b9a8dd735.png and /usr/share/cacti/site/plugins/weathermap/output/ec6d92f5049b9a8dd735.thumb.png
04/26/2018 09:40:06 AM - WEATHERMAP: Poller[0] [Map 7] OTE.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
04/26/2018 09:40:04 AM - SYSTEM DSSTATS STATS: Type:HOURLY, Time:0.0429
04/26/2018 09:40:04 AM - WEATHERMAP: Poller[0] [Map 7] OTE.conf: Map: /usr/share/cacti/site/plugins/weathermap/configs/OTE.conf -> /usr/share/cacti/site/plugins/weathermap/output/ec6d92f5049b9a8dd735.html & /usr/share/cacti/site/plugins/weathermap/output/ec6d92f5049b9a8dd735.png

At the NEW server with only one map activated it takes 54sec:

04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:212] [Map 18] simple.conf: Wrote HTML to /var/www/html/cacti-0.8.8h/plugins/weathermap/output/e62ad041c4bc05347d47.html
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:538] [Map 18] simple.conf: Trace: ProcessString(XXXXXXXXX BGP, map)
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:274] [Map 18] simple.conf: TIME: /var/www/html/cacti-0.8.8h/plugins/weathermap/configs/simple.conf took 72 seconds.
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:11] [Map 18] simple.conf: MEM after 0: memory_get_usage() says 11.6MBytes used. Limit is 1024M
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:293] Iterated all 1 maps.
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] DEBUG: [[email protected]:11] MEM Final: memory_get_usage() says 11.6MBytes used. Limit is 1024M
04/26/2018 09:51:19 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.98 run complete - Thu, 26 Apr 18 09:51:19 +0300: 1 maps were run in 72 seconds with 0 warnings.

The only strange think is the below:
memory_get_usage() says 11.6MBytes used. Limit is 1024M <--
Any thoughts/help ???
Attached i have put the output of log debug...

Best regards,
George
Attachments
cacti-log.zip
(158.91 KiB) Downloaded 33 times

netniV
Cacti Guru User
Posts: 2885
Joined: Sun Aug 27, 2017 12:05 am

Re: Weathermap high CPU Utilization

#2 Post by netniV » Thu Apr 26, 2018 2:07 am

I believe that Howie outputs the memory usage all the time so that you know how much it takes to display the maps. Yours is apparently using about 1% of your total memory, so I wouldn't worry about that part. Howie should be able to give you more pointers on what to look at next.

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap high CPU Utilization

#3 Post by Howie » Thu Apr 26, 2018 4:08 am

I'd be interested in getting a PMed (I don't share) copy of the map, actually... 1.0.0 has a lot of performance changes, and I'm curious to see if they'd help.

In general though:

in 0.98a and earlier, scaled icons are not cached, so if you are in a situation where every node is a scaled version of a bigger/smaller image, you will see a speed-up by making an icon that's the right size to start with.

The PNG-writing part of GD (the php graphics library) is just not that fast, so there's a hard limit on how fast maps (especially large maps) go. It's only a few seconds though, not a minute!

What kind of targets are you using? Snmp? RRD files? rrd+poller_output? dsstats? For that kind of slowness, I assume it's a large map with lots of targets... snmp can be a performance problem, especially if a device is down and you read multiple ports on it (lots of timeouts).
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

gben
Posts: 10
Joined: Fri Apr 03, 2009 7:42 am

Re: Weathermap high CPU Utilization

#4 Post by gben » Thu Apr 26, 2018 4:34 am

Hi Howie,

First THANKS for this GREAT PLUGIN which make our life easier. :D :D :D
What kind of targets are you using? RRD files (interface utilization)
The map is very simple - NO fancy thinks as monitoring status of devices and change icon (up/down/recovery).
I have send you a pm with the configuration of the map.

BR,
George

Post Reply