gnocchixyz / gnocchi

Timeseries database
Apache License 2.0
302 stars 85 forks source link

The performance of gnocchi list resource interface is not good #1369

Open magiceses opened 10 months ago

magiceses commented 10 months ago

Before reporting an issue on Gnocchi, please be sure to provide all necessary information.

Which version of Gnocchi are you using

v4.6

How to reproduce your problem

SQLAlchemy version is 1.4.36, SQLAlchemy-Utils version is 0.36.6, test code in SQLAlchemy package :

    def all(self):
        print datetime.datetime.now()
        a = self._iter().all()
        print datetime.datetime.now()
        return a
()[root@busybox-openstack-74899fb545-kp5r4 /]# gnocchi resource list -t volume --max-width=9999| wc -l
6033

[Mon May 09 20:38:27.600971 2022] [:error] [pid 76] all-- 2022-05-09 20:38:27.600942
... ...
[Mon May 09 20:39:03.488344 2022] [:error] [pid 76] all-- 2022-05-09 20:39:03.488269

it takes 36s+ when i list all resources;

What is the result that you get

it takes 36s+ when i list all resources;

What is result that you expected

I wish it takes less than 5s.