what is causing this spike in neutron cpu usage?

asked 2015-06-07 22:21:50 -0600

don gravatar image

Juno, Ubuntu.

I have about 4400 neutron ports. About every 5 minutes, something polls all of them, spiking the neutron-server cpu usage, and causing other things to timeout.

I see this SQL query emitted by it. Although the query is relatively quick, its the large number of them that seems to be the issue.

This is causing my heat to timeout periodically (leaving a stranded object on delete, or a failed create). What periodic is doing this so i can lower its rate? i've tried all the ones i could think of.

SELECT ports.tenant_id AS ports_tenant_id, ports.id AS ports_id, ports.name AS ports_name, ports.network_id AS ports_network_id, ports.mac_address AS ports_mac_address, ports.admin_state_up AS ports_admin_state_up, ports.status AS ports_status, ports.device_id AS ports_device_id, ports.device_owner AS ports_device_owner, ipallocations_1.port_id AS ipallocations_1_port_id, ipallocations_1.ip_address AS ipallocations_1_ip_address, ipallocations_1.subnet_id AS ipallocations_1_subnet_id, ipallocations_1.network_id AS ipallocations_1_network_id, ml2_port_bindings_1.port_id AS ml2_port_bindings_1_port_id, ml2_port_bindings_1.host AS ml2_port_bindings_1_host, ml2_port_bindings_1.vnic_type AS ml2_port_bindings_1_vnic_type, ml2_port_bindings_1.profile AS ml2_port_bindings_1_profile, ml2_port_bindings_1.vif_type AS ml2_port_bindings_1_vif_type, ml2_port_bindings_1.vif_details AS ml2_port_bindings_1_vif_details, ml2_port_bindings_1.driver AS ml2_port_bindings_1_driver, ml2_port_bindings_1.segment AS ml2_port_bindings_1_segment, allowedaddresspairs_1.port_id AS allowedaddresspairs_1_port_id, allowedaddresspairs_1.mac_address AS allowedaddresspairs_1_mac_address, allowedaddresspairs_1.ip_address AS allowedaddresspairs_1_ip_address, ml2_dvr_port_bindings_1.port_id AS ml2_dvr_port_bindings_1_port_id, ml2_dvr_port_bindings_1.host AS ml2_dvr_port_bindings_1_host, ml2_dvr_port_bindings_1.router_id AS ml2_dvr_port_bindings_1_router_id, ml2_dvr_port_bindings_1.vif_type AS ml2_dvr_port_bindings_1_vif_type, ml2_dvr_port_bindings_1.vif_details AS ml2_dvr_port_bindings_1_vif_details, ml2_dvr_port_bindings_1.vnic_type AS ml2_dvr_port_bindings_1_vnic_type, ml2_dvr_port_bindings_1.profile AS ml2_dvr_port_bindings_1_profile, ml2_dvr_port_bindings_1.cap_port_filter AS ml2_dvr_port_bindings_1_cap_port_filter, ml2_dvr_port_bindings_1.driver AS ml2_dvr_port_bindings_1_driver, ml2_dvr_port_bindings_1.segment AS ml2_dvr_port_bindings_1_segment, ml2_dvr_port_bindings_1.status AS ml2_dvr_port_bindings_1_status, extradhcpopts_1.id AS extradhcpopts_1_id, extradhcpopts_1.port_id AS extradhcpopts_1_port_id, extradhcpopts_1.opt_name AS extradhcpopts_1_opt_name, extradhcpopts_1.opt_value AS extradhcpopts_1_opt_value, securitygroupportbindings_1.port_id AS securitygroupportbindings_1_port_id, securitygroupportbindings_1.security_group_id AS securitygroupportbindings_1_security_group_id
FROM ports LEFT OUTER JOIN ipallocations AS ipallocations_1 ON ports.id = ipallocations_1.port_id LEFT OUTER JOIN ml2_port_bindings AS ml2_port_bindings_1 ON ports.id = ml2_port_bindings_1.port_id LEFT OUTER JOIN allowedaddresspairs AS allowedaddresspairs_1 ON ports.id = allowedaddresspairs_1.port_id LEFT OUTER JOIN ml2_dvr_port_bindings AS ml2_dvr_port_bindings_1 ON ports.id = ml2_dvr_port_bindings_1.port_id LEFT OUTER JOIN extradhcpopts AS extradhcpopts_1 ON ports.id = extradhcpopts_1.port_id LEFT OUTER JOIN securitygroupportbindings AS securitygroupportbindings_1 ON ports.id = securitygroupportbindings_1.port_id
WHERE ports.id = '2dea2034-1bc6-4e3b-ac49-916de5bb97fa'

followed by

SELECT ml2_port_bindings.port_id AS ml2_port_bindings_port_id, ml2_port_bindings.host AS     ml2_port_bindings_host, ml2_port_bindings.vnic_type AS ml2_port_bindings_vnic_type, ml2_port_bindings.profile AS ml2_port_bindings_profile, ml2_port_bindings.vif_type AS ml2_port_bindings_vif_type, ml2_port_bindings.vif_details AS ml2_port_bindings_vif_details, ml2_port_bindings.driver AS ml2_port_bindings_driver, ml2_port_bindings.segment AS ml2_port_bindings_segment

FROM ml2_port_bindings WHERE (ml2_port_bindings.port_id LIKE concat('6dd69ddb-fc68-4c0e-b935-f28a71e37dc0', '%'))

edit retag flag offensive close merge delete