Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

Troubleshooting slow page load time: profile_handlers 

Jun 09, 2014 01:15 PM

To get more information about why AWMS web pages load slowly, you can turn on profile_handlers. 

For AMP Versions 7.x and newer (7.4.7 at time of this update)

Get the current value of profile_handlers (should be default = 3 or something similar)

# dbc 'select profile_handlers from seas_config;'

Enable all profile handlers by setting the value to 15

# dbc 'update seas_config set profile_handlers = 15;'

View the contents of /var/log/httpd/profiling for log files that correspond to various page loads

use "sqlprof" to interpret the file contents

***IMPORTANT*** - Remember to reset the profile_handlers value to the default before you changed it!!!

Example output (what you want to look for is the Time and particular select statement involved, it should sort with the slowest select statement first):

DBI Profile Data (DBI::ProfileDumper 2.009894)

Program : /opt/airwave/sbin/httpd______________________________________
Path : [ !Statement, !MethodName ]
Total Records : 203 (showing 203, sorted by total)
Total Count : 5659
Total Runtime : 43.687503 seconds

#####[ 1 ]###########################################################
Count : 1
Time : 42.839006 seconds
Key 1 :

SELECT * FROM (
SELECT
client_historical.id, client_historical.ap_id, client_historical.ap_folder_id, client_historical.connect_time, client_historical.ap_radio_index, client_historical.ap_radio_description, client_historical.ssid, client_historical.vlan, client_historical.ht_mode, client_historical.security_mode, client_historical.authen_subtype, client_historical.cipher, client_historical.interface_index, client_historical.from_snmp_trap, client_historical.aruba_retry_rate, client_historical.aruba_low_speed_rate, client_historical.aruba_non_unicast_rate, client_historical.aruba_fragmentation_rate, client_historical.aruba_retry_error_rate, client_historical.aruba_receive_error_rate, client_historical.forward_mode, client_historical.tunneled_device_id, client_historical.username, client_historical.disconnect_time, client_historical.bytes_used, client_historical.average_bandwidth, client_historical.avg_signal_quality, client_historical.avg_goodput, client_historical.avg_speed, client_historical.old_client_id, client_historical.radio_mode, client_historical.mac, client_historical.authen_type, client_historical.role, client_historical.is_guest_user, client_historical.aruba_device_type,
(client_historical.disconnect_time - client_historical.connect_time) AS duration,
1 AS is_authorized,
0 AS connected,

ARRAY_AGG(CASE
WHEN chip.start_time is NULL THEN ''

ELSE chip.ip_address
END ORDER BY chip.start_time DESC) AS lan_ips,

ARRAY_AGG(CASE
WHEN chip.start_time is NULL THEN ''

ELSE chip.hostname
END ORDER BY chip.start_time DESC) AS lan_hostnames

FROM
client_historical
left join (
SELECT
client_historical_id, ip_address, hostname, MAX(start_time) AS start_time
FROM
client_historical_ip
WHERE
start_time IS NOT NULL AND
ip_address != '' AND
ip_address != '0.0.0.0'
GROUP BY
client_historical_id, ip_address, hostname
) chip on chip.client_historical_id = client_historical.id
GROUP BY
chip.client_historical_id, client_historical.id, client_historical.ap_id, client_historical.ap_folder_id, client_historical.connect_time, client_historical.ap_radio_index, client_historical.ap_radio_description, client_historical.ssid, client_historical.vlan, client_historical.ht_mode, client_historical.security_mode, client_historical.authen_subtype, client_historical.cipher, client_historical.interface_index, client_historical.from_snmp_trap, client_historical.aruba_retry_rate, client_historical.aruba_low_speed_rate, client_historical.aruba_non_unicast_rate, client_historical.aruba_fragmentation_rate, client_historical.aruba_retry_error_rate, client_historical.aruba_receive_error_rate, client_historical.forward_mode, client_historical.tunneled_device_id, client_historical.username, client_historical.disconnect_time, client_historical.bytes_used, client_historical.average_bandwidth, client_historical.avg_signal_quality, client_historical.avg_goodput, client_historical.avg_speed, client_historical.old_client_id, client_historical.radio_mode, client_historical.mac, client_historical.authen_type, client_histor


For AMP Versions 6.1 and older:

* * * * * * * * * * * * * * * * * * * * * * * * * * * 
NOTE: When you are finished profiling, don't forget to turn off profile handling (see note at end of article.)
* * * * * * * * * * * * * * * * * * * * * * * * * * * 

In AMP 6.1 and earlier, you could do this:

# echo "update seas_config set profile_handlers =1" | db

Beginning with AMP 6.2 it's become a little more flexible. 

profile_handlers is now a bitmask -- not a simple on/off switch. The default value shows page load time and SQL cpu time statistics. These statistics are rather valuable and inexpensive to collect. We benchmarked internally and found that it didn't have a performance impact. 

In case you want to collect more/other information, here are the valid values. If you want more than one category you can add them together. Set the field to 15 to get all stats available.

Pageload times: 1
SQL CPU time: 2
Memory stats: 4
SQL profiling: 8

Example:
To get SQL CPU time (2) and Memory stats (4):

# dbc 'update seas_config set profile_handlers = 6;'

The syntax to get the most verbose logging is this:

# dbc 'update seas_config set profile_handlers = 15;'

Once you've done this, there will be high-level data in:

/var/log/httpd/error_log

and very detailed logs in this directory:

/var/log/httpd/profiling/


* * * * * * * * * * * * * * * * * * * * * * * * * * * 
NOTE: To turn off profile handling when you are done, use one of these two commands:

In AMP 6.2 and later:

# dbc 'update seas_config set profile_handlers = 0;'

In AMP 6.1 and earlier:

# echo "update seas_config set profile_handlers =0" | db

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.