i just did a new setup of katello 3.0.2. After setting up everything i
started registering hosts (both for contents and configuration management).
At the moment ~300 servers are registered. Now logging into katello is very
slow (requires about 30s) due to dashboard.
While waiting the dashboard to appear i see that there is a postgresql
SELECT process that is using 100% of CPU for several time.
However accessing directly to /hosts is very fast and so as far as i can
experiment is related only to dashboard tasks.
What can i do? Some parts of dashboard can be useful, but not if is this
slow.
It is set in /var/lib/pgsql/data/postgresql.conf, setting
log_min_duration_statement to 100 or 250 should do the trick. Once it is
set, you will need to do a "service postgresql reload" to pick up the
change, then try to load the dashboard again.
The log should be in /var/lib/pgsql/data/pg_log/postgresql-<day of week>.log
The issue you hit might be fixed in Katello 3.1, but if we get the SQL
then we can know for sure.
Thanks!
···
On 09/02/2016 05:11 AM, Luca Lorenzetto wrote:
> Hello,
>
> i just did a new setup of katello 3.0.2. After setting up everything i
> started registering hosts (both for contents and configuration management).
> At the moment ~300 servers are registered. Now logging into katello is very
> slow (requires about 30s) due to dashboard.
> While waiting the dashboard to appear i see that there is a postgresql
> SELECT process that is using 100% of CPU for several time.
> However accessing directly to /hosts is very fast and so as far as i can
> experiment is related only to dashboard tasks.
>
> What can i do? Some parts of dashboard can be useful, but not if is this
> slow.
>
> Luca
>
> It is set in /var/lib/pgsql/data/postgresql.conf, setting
> log_min_duration_statement to 100 or 250 should do the trick. Once it is
> set, you will need to do a "service postgresql reload" to pick up the
> change, then try to load the dashboard again.
>
> The log should be in /var/lib/pgsql/data/pg_log/postgresql-<day of week>.log
>
LOG: duration: 188745.456 ms execute <unnamed>: SELECT DISTINCT
"katello_errata".* FROM "katello_errata" INNER JOIN
"katello_content_facet_errata" ON
"katello_content_facet_errata"."erratum_id" = "katello_errata"."id"
INNER JOIN "katello_content_facet_errata"
"content_facet_errata_katello_errata_join" ON
"content_facet_errata_katello_errata_join"."erratum_id" =
"katello_errata"."id" INNER JOIN "katello_content_facets" ON
"katello_content_facets"."id" =
"content_facet_errata_katello_errata_join"."content_facet_id" WHERE
"katello_content_facets"."host_id" IN (SELECT "hosts"."id" FROM
"hosts" WHERE "hosts"."type" IN ('Host::Managed') AND
"hosts"."organization_id" IN (3)) ORDER BY updated desc LIMIT 6
> The issue you hit might be fixed in Katello 3.1, but if we get the SQL
> then we can know for sure.
Can you tell if it's so?
Luca
···
On Fri, Sep 2, 2016 at 2:32 PM, Chris Duryee wrote:
–
"E’ assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)
> [cut]
>> Can you enable slow sql logging?
>>
>
> Yes, done.
>
>> It is set in /var/lib/pgsql/data/postgresql.conf, setting
>> log_min_duration_statement to 100 or 250 should do the trick. Once it is
>> set, you will need to do a "service postgresql reload" to pick up the
>> change, then try to load the dashboard again.
>>
>> The log should be in /var/lib/pgsql/data/pg_log/postgresql-<day of week>.log
>>
>
>
> LOG: duration: 188745.456 ms execute <unnamed>: SELECT DISTINCT
> "katello_errata".* FROM "katello_errata" INNER JOIN
> "katello_content_facet_errata" ON
> "katello_content_facet_errata"."erratum_id" = "katello_errata"."id"
> INNER JOIN "katello_content_facet_errata"
> "content_facet_errata_katello_errata_join" ON
> "content_facet_errata_katello_errata_join"."erratum_id" =
> "katello_errata"."id" INNER JOIN "katello_content_facets" ON
> "katello_content_facets"."id" =
> "content_facet_errata_katello_errata_join"."content_facet_id" WHERE
> "katello_content_facets"."host_id" IN (SELECT "hosts"."id" FROM
> "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND
> "hosts"."organization_id" IN (3)) ORDER BY updated desc LIMIT 6
>
>
>
>
>> The issue you hit might be fixed in Katello 3.1, but if we get the SQL
>> then we can know for sure.
>
> Can you tell if it's so?
···
On Fri, Sep 2, 2016 at 2:53 PM, Chris Duryee wrote:
>
> ya, it should be fixed by http://projects.theforeman.org/issues/15389
> which is marked for 3.1.0.
>
>>
–
"E’ assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)
–
"E’ assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)