_make_firewall_dict_with_rules gets FW rules one by one from db

Bug #1658817 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Cedric Brandily

Bug Description

_make_firewall_dict_with_rules returns a firewall and its rules by calling get_firewall, get_firewall_policy and get_firewall_rule for each rule ... which implies a db query for each rule and slowness (on my deploiement 12s to get a firewall with 1000 rules).

It seems possible to get all FW rules in one db query.

tags: added: mitaka-backport-potential newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/424361

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-fwaas (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/424875

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/424361
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=8a97921783cc4b7aae2b0c2fd764813fa0aa2821
Submitter: Jenkins
Branch: master

commit 8a97921783cc4b7aae2b0c2fd764813fa0aa2821
Author: Cedric Brandily <email address hidden>
Date: Mon Jan 23 23:37:48 2017 +0100

    Optimize _make_firewall_dict_with_rules db queries

    This change optimizes _make_firewall_dict_with_rules implementation by
    getting rules for a firewall in one db query instead of one db query per
    rule (previous implementation). It improves performance: typically on
    my deployment _make_firewall_dict_with_rules for a firewall with 1000
    rules takes 0.2s instead of 12s with previous implementation.

    Change-Id: Ia5cd39ec4ee388fab21884d08e2b19f6f6c484d5
    Closes-Bug: #1658817

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/425061

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/425075

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-fwaas 10.0.0.0b3

This issue was fixed in the openstack/neutron-fwaas 10.0.0.0b3 development milestone.

Changed in neutron:
milestone: none → ocata-rc1
tags: added: ocata-rc-potential
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/424875
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=0565b488b1c3dd18b927690237ebbe90c510eb4c
Submitter: Jenkins
Branch: master

commit 0565b488b1c3dd18b927690237ebbe90c510eb4c
Author: Cedric Brandily <email address hidden>
Date: Tue Jan 24 23:08:43 2017 +0100

    Optimize _make_firewall_group_dict_with_rules

    This change optimizes _make_firewall_group_dict_with_rules
    implementation by getting rules for a firewall in one db query (through
    the new method _get_policy_ordered_rules) instead of one db query per
    rule (previous implementation) in order to improve performance.

    Related-Bug: #1658817
    Change-Id: Ibf13a9c0a4d504d47bd92fbd958c2d5e24abfdad

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-fwaas (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/427508

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (stable/mitaka)

Reviewed: https://review.openstack.org/425075
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=651069db85a9e793470a5deb198b08ed2a76eab2
Submitter: Jenkins
Branch: stable/mitaka

commit 651069db85a9e793470a5deb198b08ed2a76eab2
Author: Cedric Brandily <email address hidden>
Date: Mon Jan 23 23:37:48 2017 +0100

    Optimize _make_firewall_dict_with_rules db queries

    This change optimizes _make_firewall_dict_with_rules implementation by
    getting rules for a firewall in one db query instead of one db query per
    rule (previous implementation). It improves performance: typically on
    my deployment _make_firewall_dict_with_rules for a firewall with 1000
    rules takes 0.2s instead of 12s with previous implementation.

    Change-Id: Ia5cd39ec4ee388fab21884d08e2b19f6f6c484d5
    Closes-Bug: #1658817
    (cherry picked from commit 8a97921783cc4b7aae2b0c2fd764813fa0aa2821)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (stable/newton)

Reviewed: https://review.openstack.org/425061
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=b3abd7dfafbff913eb94e7640a2656774699a9a3
Submitter: Jenkins
Branch: stable/newton

commit b3abd7dfafbff913eb94e7640a2656774699a9a3
Author: Cedric Brandily <email address hidden>
Date: Mon Jan 23 23:37:48 2017 +0100

    Optimize _make_firewall_dict_with_rules db queries

    This change optimizes _make_firewall_dict_with_rules implementation by
    getting rules for a firewall in one db query instead of one db query per
    rule (previous implementation). It improves performance: typically on
    my deployment _make_firewall_dict_with_rules for a firewall with 1000
    rules takes 0.2s instead of 12s with previous implementation.

    Change-Id: Ia5cd39ec4ee388fab21884d08e2b19f6f6c484d5
    Closes-Bug: #1658817
    (cherry picked from commit 8a97921783cc4b7aae2b0c2fd764813fa0aa2821)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-fwaas (stable/newton)

Reviewed: https://review.openstack.org/427508
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=6b5a4ee0db410817e5263b04dc7cb3762eb5bf41
Submitter: Jenkins
Branch: stable/newton

commit 6b5a4ee0db410817e5263b04dc7cb3762eb5bf41
Author: Cedric Brandily <email address hidden>
Date: Tue Jan 24 23:08:43 2017 +0100

    Optimize _make_firewall_group_dict_with_rules

    This change optimizes _make_firewall_group_dict_with_rules
    implementation by getting rules for a firewall in one db query (through
    the new method _get_policy_ordered_rules) instead of one db query per
    rule (previous implementation) in order to improve performance.

    Related-Bug: #1658817
    Change-Id: Ibf13a9c0a4d504d47bd92fbd958c2d5e24abfdad
    (cherry picked from commit 0565b488b1c3dd18b927690237ebbe90c510eb4c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-fwaas 9.0.1

This issue was fixed in the openstack/neutron-fwaas 9.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.