share server list slow

Bug #1964089 reported by Maurice Escher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Gireesh Awasthi

Bug Description

Hi,

listing share servers (on xena) is taking too long or even timing out.

$ time manila share-server-list
manila share-server-list 0.98s user 0.28s system 0% cpu 5:16.89 total

I see it in the slow-queries.log of my mariadb: https://paste.opendev.org/show/bWQWZKPi5TIezltlKkx2/

Some more numbers:
select count(id) from share_servers;
1199
select count(id) from network_allocations;
3515
select count(id) from share_instances;
16402
select count(id) from share_instance_export_locations;
42332
select count(id) from share_networks;
367
select count(id) from share_network_subnets;
557

It is always joining share instances and share instance export locations in there
https://opendev.org/openstack/manila/src/branch/stable/xena/manila/db/sqlalchemy/api.py#L4195-L4201
 - I think this is too heavy.

Can you help speeding this up?

Best regards,
Maurice

Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
Changed in manila:
assignee: nobody → Carlos Eduardo (silvacarlose)
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
status: New → Triaged
Changed in manila:
assignee: Carlos Eduardo (silvacarlose) → Felipe Rodrigues (felipefutty)
Revision history for this message
Helena (helenadantas) wrote :

Two scenarios were used to reproduce this bug:

For the first scenario, 1000 shares and 50 shares servers were created (using 50 shares networks). The running time to list the share-servers was:
0.12s user 0.0s system
For the second scenario, 2000 shares and 100 shares servers were created (using 100 shares network). The running time to list the share-servers was:
0.22s user 0.1s system

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/884592

Changed in manila:
status: Triaged → In Progress
Changed in manila:
milestone: none → bobcat-3
Changed in manila:
milestone: bobcat-3 → bobcat-rc1
Changed in manila:
milestone: bobcat-rc1 → caracal-1
Changed in manila:
milestone: caracal-1 → caracal-2
Changed in manila:
milestone: caracal-2 → caracal-3
Changed in manila:
milestone: caracal-3 → dalmation-1
Revision history for this message
Vida Haririan (vhariria) wrote :

See related comments in manila-dalmatian-m2-bugsquash ethercal https://ethercalc.net/o2qsmjpagsfb

Changed in manila:
milestone: dalmatian-1 → dalmatian-3
Changed in manila:
milestone: dalmatian-3 → dalmatian-rc1
Changed in manila:
milestone: dalmatian-rc1 → epoxy-1
Changed in manila:
assignee: Felipe Rodrigues (felipefutty) → Gireesh Awasthi (agireesh)
milestone: epoxy-1 → epoxy-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/957015

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by "Goutham Pacha Ravi <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/manila/+/884592
Reason: Addressed by https://review.opendev.org/c/openstack/manila/+/957015

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/957015
Committed: https://opendev.org/openstack/manila/commit/bfdbe0c50008a75fc8f48a12275c83c6d926d8b5
Submitter: "Zuul (22348)"
Branch: master

commit bfdbe0c50008a75fc8f48a12275c83c6d926d8b5
Author: Kiran Pawar <email address hidden>
Date: Mon Aug 11 12:41:08 2025 +0000

    improve listing share servers with search option

    Use search options in DB query to filter share servers. This should be
    faster than fetching all share server entries then filtering them in
    memory.

    Closes-bug: #1964089
    Change-Id: I770bcdd31a6c7b4561207299b85e28c47f07e2a8
    Co-Authored-By: Chuan Miao <email address hidden>
    Signed-off-by: Kiran Pawar <email address hidden>

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

Fix proposed to branch: stable/2025.2
Review: https://review.opendev.org/c/openstack/manila/+/972825

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/2025.2)

Reviewed: https://review.opendev.org/c/openstack/manila/+/972825
Committed: https://opendev.org/openstack/manila/commit/c1a7b09d712c47ea9fa63cb70dd6f9107f616f70
Submitter: "Zuul (22348)"
Branch: stable/2025.2

commit c1a7b09d712c47ea9fa63cb70dd6f9107f616f70
Author: Kiran Pawar <email address hidden>
Date: Mon Aug 11 12:41:08 2025 +0000

    improve listing share servers with search option

    Use search options in DB query to filter share servers. This should be
    faster than fetching all share server entries then filtering them in
    memory.

    Closes-bug: #1964089
    Change-Id: I770bcdd31a6c7b4561207299b85e28c47f07e2a8
    Co-Authored-By: Chuan Miao <email address hidden>
    Signed-off-by: Kiran Pawar <email address hidden>
    (cherry picked from commit bfdbe0c50008a75fc8f48a12275c83c6d926d8b5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 21.0.1

This issue was fixed in the openstack/manila 21.0.1 Flamingo 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.