Project

General

Profile

Bug #18909

Host searches slow and consume excessive amounts of ram

Added by Patrick Hurrelmann over 5 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Host search seem to be slow and consume an excessive amount of ram.
Searching for an realm (realm=EXAMPLE.COM) with 31 hosts assigned to that realm and 32 hosts in total consumes 5GB of swap on a foreman 1.14.2/katello 3.3.0 installation with 16GB RAM.

SQL-Debugging show this following slow query:

2017-03-15 11:29:04 091b6b30 [sql] [D]   SQL (19366.4ms)  SELECT "hosts"."id" AS t0_r0, "hosts"."name" AS t0_r1, "hosts"."last_compile" AS t0_r2, "hosts"."last_report" AS t0_r3, "hosts"."updated_at" AS t0_r4, "hosts"."created_at" AS t0_r5
, "hosts"."root_pass" AS t0_r6, "hosts"."architecture_id" AS t0_r7, "hosts"."operatingsystem_id" AS t0_r8, "hosts"."environment_id" AS t0_r9, "hosts"."ptable_id" AS t0_r10, "hosts"."medium_id" AS t0_r11, "hosts"."build" AS t0_r12, "hosts" 
."comment" AS t0_r13, "hosts"."disk" AS t0_r14, "hosts"."installed_at" AS t0_r15, "hosts"."model_id" AS t0_r16, "hosts"."hostgroup_id" AS t0_r17, "hosts"."owner_id" AS t0_r18, "hosts"."owner_type" AS t0_r19, "hosts"."enabled" AS t0_r20, " 
hosts"."puppet_ca_proxy_id" AS t0_r21, "hosts"."managed" AS t0_r22, "hosts"."use_image" AS t0_r23, "hosts"."image_file" AS t0_r24, "hosts"."uuid" AS t0_r25, "hosts"."compute_resource_id" AS t0_r26, "hosts"."puppet_proxy_id" AS t0_r27, "ho
sts"."certname" AS t0_r28, "hosts"."image_id" AS t0_r29, "hosts"."organization_id" AS t0_r30, "hosts"."location_id" AS t0_r31, "hosts"."type" AS t0_r32, "hosts"."otp" AS t0_r33, "hosts"."realm_id" AS t0_r34, "hosts"."compute_profile_id" A
S t0_r35, "hosts"."provision_method" AS t0_r36, "hosts"."grub_pass" AS t0_r37, "hosts"."content_view_id" AS t0_r38, "hosts"."lifecycle_environment_id" AS t0_r39, "hosts"."global_status" AS t0_r40, "hosts"."lookup_value_matcher" AS t0_r41,
 "hosts"."pxe_loader" AS t0_r42, "realms"."id" AS t1_r0, "realms"."name" AS t1_r1, "realms"."realm_type" AS t1_r2, "realms"."realm_proxy_id" AS t1_r3, "realms"."created_at" AS t1_r4, "realms"."updated_at" AS t1_r5, "katello_content_views" 
."id" AS t2_r0, "katello_content_views"."name" AS t2_r1, "katello_content_views"."label" AS t2_r2, "katello_content_views"."description" AS t2_r3, "katello_content_views"."organization_id" AS t2_r4, "katello_content_views"."default" AS t2
_r5, "katello_content_views"."created_at" AS t2_r6, "katello_content_views"."updated_at" AS t2_r7, "katello_content_views"."composite" AS t2_r8, "katello_content_views"."next_version" AS t2_r9, "katello_content_views"."force_puppet_enviro
nment" AS t2_r10, "katello_environments"."id" AS t3_r0, "katello_environments"."name" AS t3_r1, "katello_environments"."description" AS t3_r2, "katello_environments"."library" AS t3_r3, "katello_environments"."organization_id" AS t3_r4, " 
katello_environments"."created_at" AS t3_r5, "katello_environments"."updated_at" AS t3_r6, "katello_environments"."label" AS t3_r7, "katello_subscription_facets"."id" AS t4_r0, "katello_subscription_facets"."host_id" AS t4_r1, "katello_su
bscription_facets"."uuid" AS t4_r2, "katello_subscription_facets"."last_checkin" AS t4_r3, "katello_subscription_facets"."service_level" AS t4_r4, "katello_subscription_facets"."release_version" AS t4_r5, "katello_subscription_facets"."au
toheal" AS t4_r6, "katello_subscription_facets"."registered_at" AS t4_r7, "katello_subscription_facets"."registered_through" AS t4_r8, "katello_subscription_facets"."user_id" AS t4_r9, "katello_errata"."id" AS t5_r0, "katello_errata"."uui
d" AS t5_r1, "katello_errata"."errata_id" AS t5_r2, "katello_errata"."created_at" AS t5_r3, "katello_errata"."updated_at" AS t5_r4, "katello_errata"."issued" AS t5_r5, "katello_errata"."updated" AS t5_r6, "katello_errata"."errata_type" AS
 t5_r7, "katello_errata"."severity" AS t5_r8, "katello_errata"."title" AS t5_r9, "katello_errata"."solution" AS t5_r10, "katello_errata"."description" AS t5_r11, "katello_errata"."summary" AS t5_r12, "katello_errata"."reboot_suggested" AS
 t5_r13, "content_facets_hosts"."id" AS t6_r0, "content_facets_hosts"."host_id" AS t6_r1, "content_facets_hosts"."uuid" AS t6_r2, "content_facets_hosts"."content_view_id" AS t6_r3, "content_facets_hosts"."lifecycle_environment_id" AS t6_r
4, "content_facets_hosts"."kickstart_repository_id" AS t6_r5, "content_facets_hosts"."content_source_id" AS t6_r6, "katello_repositories"."id" AS t7_r0, "katello_repositories"."name" AS t7_r1, "katello_repositories"."pulp_id" AS t7_r2, "k
atello_repositories"."created_at" AS t7_r3, "katello_repositories"."updated_at" AS t7_r4, "katello_repositories"."major" AS t7_r5, "katello_repositories"."minor" AS t7_r6, "katello_repositories"."gpg_key_id" AS t7_r7, "katello_repositorie
s"."cp_label" AS t7_r8, "katello_repositories"."library_instance_id" AS t7_r9, "katello_repositories"."content_id" AS t7_r10, "katello_repositories"."arch" AS t7_r11, "katello_repositories"."label" AS t7_r12, "katello_repositories"."conte
nt_view_version_id" AS t7_r13, "katello_repositories"."relative_path" AS t7_r14, "katello_repositories"."url" AS t7_r15, "katello_repositories"."unprotected" AS t7_r16, "katello_repositories"."content_type" AS t7_r17, "katello_repositorie
s"."product_id" AS t7_r18, "katello_repositories"."environment_id" AS t7_r19, "katello_repositories"."checksum_type" AS t7_r20, "katello_repositories"."docker_upstream_name" AS t7_r21, "katello_repositories"."distribution_version" AS t7_r
22, "katello_repositories"."distribution_arch" AS t7_r23, "katello_repositories"."distribution_bootable" AS t7_r24, "katello_repositories"."distribution_family" AS t7_r25, "katello_repositories"."distribution_variant" AS t7_r26, "katello_
repositories"."distribution_uuid" AS t7_r27, "katello_repositories"."mirror_on_sync" AS t7_r28, "katello_repositories"."download_policy" AS t7_r29, "katello_repositories"."verify_ssl_on_sync" AS t7_r30, "katello_repositories"."upstream_us
ername" AS t7_r31, "katello_repositories"."upstream_password" AS t7_r32, "applicable_errata_katello_content_facets"."id" AS t8_r0, "applicable_errata_katello_content_facets"."uuid" AS t8_r1, "applicable_errata_katello_content_facets"."err
ata_id" AS t8_r2, "applicable_errata_katello_content_facets"."created_at" AS t8_r3, "applicable_errata_katello_content_facets"."updated_at" AS t8_r4, "applicable_errata_katello_content_facets"."issued" AS t8_r5, "applicable_errata_katello
_content_facets"."updated" AS t8_r6, "applicable_errata_katello_content_facets"."errata_type" AS t8_r7, "applicable_errata_katello_content_facets"."severity" AS t8_r8, "applicable_errata_katello_content_facets"."title" AS t8_r9, "applicab
le_errata_katello_content_facets"."solution" AS t8_r10, "applicable_errata_katello_content_facets"."description" AS t8_r11, "applicable_errata_katello_content_facets"."summary" AS t8_r12, "applicable_errata_katello_content_facets"."reboot
_suggested" AS t8_r13, "content_views_katello_content_facets"."id" AS t9_r0, "content_views_katello_content_facets"."name" AS t9_r1, "content_views_katello_content_facets"."label" AS t9_r2, "content_views_katello_content_facets"."descript
ion" AS t9_r3, "content_views_katello_content_facets"."organization_id" AS t9_r4, "content_views_katello_content_facets"."default" AS t9_r5, "content_views_katello_content_facets"."created_at" AS t9_r6, "content_views_katello_content_face
ts"."updated_at" AS t9_r7, "content_views_katello_content_facets"."composite" AS t9_r8, "content_views_katello_content_facets"."next_version" AS t9_r9, "content_views_katello_content_facets"."force_puppet_environment" AS t9_r10, "lifecycl
e_environments_katello_content_facets"."id" AS t10_r0, "lifecycle_environments_katello_content_facets"."name" AS t10_r1, "lifecycle_environments_katello_content_facets"."description" AS t10_r2, "lifecycle_environments_katello_content_face
ts"."library" AS t10_r3, "lifecycle_environments_katello_content_facets"."organization_id" AS t10_r4, "lifecycle_environments_katello_content_facets"."created_at" AS t10_r5, "lifecycle_environments_katello_content_facets"."updated_at" AS 
t10_r6, "lifecycle_environments_katello_content_facets"."label" AS t10_r7, "hostgroups"."id" AS t11_r0, "hostgroups"."name" AS t11_r1, "hostgroups"."created_at" AS t11_r2, "hostgroups"."updated_at" AS t11_r3, "hostgroups"."environment_id" 
 AS t11_r4, "hostgroups"."operatingsystem_id" AS t11_r5, "hostgroups"."architecture_id" AS t11_r6, "hostgroups"."medium_id" AS t11_r7, "hostgroups"."ptable_id" AS t11_r8, "hostgroups"."root_pass" AS t11_r9, "hostgroups"."puppet_ca_proxy_i
d" AS t11_r10, "hostgroups"."use_image" AS t11_r11, "hostgroups"."image_file" AS t11_r12, "hostgroups"."ancestry" AS t11_r13, "hostgroups"."vm_defaults" AS t11_r14, "hostgroups"."subnet_id" AS t11_r15, "hostgroups"."domain_id" AS t11_r16,
 "hostgroups"."puppet_proxy_id" AS t11_r17, "hostgroups"."title" AS t11_r18, "hostgroups"."realm_id" AS t11_r19, "hostgroups"."compute_profile_id" AS t11_r20, "hostgroups"."content_source_id" AS t11_r21, "hostgroups"."grub_pass" AS t11_r2
2, "hostgroups"."content_view_id" AS t11_r23, "hostgroups"."lifecycle_environment_id" AS t11_r24, "hostgroups"."lookup_value_matcher" AS t11_r25, "hostgroups"."kickstart_repository_id" AS t11_r26, "hostgroups"."subnet6_id" AS t11_r27, "ho
stgroups"."pxe_loader" AS t11_r28, "compute_resources"."id" AS t12_r0, "compute_resources"."name" AS t12_r1, "compute_resources"."description" AS t12_r2, "compute_resources"."url" AS t12_r3, "compute_resources"."user" AS t12_r4, "compute_
resources"."password" AS t12_r5, "compute_resources"."uuid" AS t12_r6, "compute_resources"."type" AS t12_r7, "compute_resources"."created_at" AS t12_r8, "compute_resources"."updated_at" AS t12_r9, "compute_resources"."attrs" AS t12_r10, " 
compute_resources"."email" AS t12_r11, "operatingsystems"."id" AS t13_r0, "operatingsystems"."major" AS t13_r1, "operatingsystems"."name" AS t13_r2, "operatingsystems"."minor" AS t13_r3, "operatingsystems"."nameindicator" AS t13_r4, "oper
atingsystems"."created_at" AS t13_r5, "operatingsystems"."updated_at" AS t13_r6, "operatingsystems"."release_name" AS t13_r7, "operatingsystems"."type" AS t13_r8, "operatingsystems"."description" AS t13_r9, "operatingsystems"."password_ha
sh" AS t13_r10, "operatingsystems"."title" AS t13_r11, "environments"."id" AS t14_r0, "environments"."name" AS t14_r1, "environments"."created_at" AS t14_r2, "environments"."updated_at" AS t14_r3, "environments"."katello_id" AS t14_r4, "m
odels"."id" AS t15_r0, "models"."name" AS t15_r1, "models"."info" AS t15_r2, "models"."created_at" AS t15_r3, "models"."updated_at" AS t15_r4, "models"."vendor_class" AS t15_r5, "models"."hardware_model" AS t15_r6, "host_status"."id" AS t
16_r0, "host_status"."type" AS t16_r1, "host_status"."status" AS t16_r2, "host_status"."host_id" AS t16_r3, "host_status"."reported_at" AS t16_r4, "tokens"."id" AS t17_r0, "tokens"."value" AS t17_r1, "tokens"."expires" AS t17_r2, "tokens" 
."host_id" AS t17_r3 FROM "hosts" LEFT OUTER JOIN "realms" ON "realms"."id" = "hosts"."realm_id" AND (realms.id IN (1)) LEFT OUTER JOIN "katello_content_facets" ON "katello_content_facets"."host_id" = "hosts"."id" LEFT OUTER JOIN "katello
_content_views" ON "katello_content_views"."id" = "katello_content_facets"."content_view_id" LEFT OUTER JOIN "katello_content_facets" "content_facets_hosts_join" ON "content_facets_hosts_join"."host_id" = "hosts"."id" LEFT OUTER JOIN "kat
ello_environments" ON "katello_environments"."id" = "content_facets_hosts_join"."lifecycle_environment_id" LEFT OUTER JOIN "katello_subscription_facets" ON "katello_subscription_facets"."host_id" = "hosts"."id" LEFT OUTER JOIN "katello_co
ntent_facets" "content_facets_hosts_join_2" ON "content_facets_hosts_join_2"."host_id" = "hosts"."id" LEFT OUTER JOIN "katello_content_facet_errata" ON "katello_content_facet_errata"."content_facet_id" = "content_facets_hosts_join_2"."id" 
 LEFT OUTER JOIN "katello_errata" ON "katello_errata"."id" = "katello_content_facet_errata"."erratum_id" LEFT OUTER JOIN "katello_content_facets" "content_facets_hosts" ON "content_facets_hosts"."host_id" = "hosts"."id" LEFT OUTER JOIN "k
atello_content_facet_repositories" ON "katello_content_facet_repositories"."content_facet_id" = "content_facets_hosts"."id" LEFT OUTER JOIN "katello_repositories" ON "katello_repositories"."id" = "katello_content_facet_repositories"."repo
sitory_id" LEFT OUTER JOIN "katello_content_facet_errata" "content_facet_errata_katello_content_facets_join" ON "content_facet_errata_katello_content_facets_join"."content_facet_id" = "content_facets_hosts"."id" LEFT OUTER JOIN "katello_e
rrata" "applicable_errata_katello_content_facets" ON "applicable_errata_katello_content_facets"."id" = "content_facet_errata_katello_content_facets_join"."erratum_id" LEFT OUTER JOIN "katello_content_views" "content_views_katello_content_
facets" ON "content_views_katello_content_facets"."id" = "content_facets_hosts"."content_view_id" LEFT OUTER JOIN "katello_environments" "lifecycle_environments_katello_content_facets" ON "lifecycle_environments_katello_content_facets"."i
d" = "content_facets_hosts"."lifecycle_environment_id" LEFT OUTER JOIN "hostgroups" ON "hostgroups"."id" = "hosts"."hostgroup_id" AND (hostgroups.id IN (14,17,8,12,15,1,2,3,10,11,4,5,13,9,16,7,6)) LEFT OUTER JOIN "compute_resources" ON "c
ompute_resources"."id" = "hosts"."compute_resource_id" AND 1=0 LEFT OUTER JOIN "operatingsystems" ON "operatingsystems"."id" = "hosts"."operatingsystem_id" LEFT OUTER JOIN "environments" ON "environments"."id" = "hosts"."environment_id" A
ND (environments.id IN (8,12,17,2,15,3,10,23,11,4,18,5,22,9,24,7,16,6)) LEFT OUTER JOIN "models" ON "models"."id" = "hosts"."model_id" LEFT OUTER JOIN "host_status" ON "host_status"."host_id" = "hosts"."id" LEFT OUTER JOIN "tokens" ON "to
kens"."host_id" = "hosts"."id" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" = 3 AND (("realms"."name" = 'EXAMPLE.COM')) AND "hosts"."id" IN (15, 20, 26, 4, 28, 27, 2, 3, 16, 11, 29, 23, 24, 25, 21, 19, 17, 31
, 32, 22, 18, 7, 8, 13, 14, 30, 5, 9, 12, 10, 6)  ORDER BY "hosts"."name" ASC

An analyse of that query shows the following execution plan:

"Nested Loop Left Join  (cost=64.85..149273.97 rows=181568 width=22081) (actual time=1.069..1833.994 rows=295116 loops=1)" 
"  ->  Nested Loop Left Join  (cost=64.85..114302.29 rows=37975 width=22031) (actual time=1.047..1352.679 rows=59024 loops=1)" 
"        Join Filter: (tokens.host_id = hosts.id)" 
"        Rows Removed by Join Filter: 59023" 
"        ->  Nested Loop Left Join  (cost=64.85..113731.65 rows=37975 width=21978) (actual time=1.036..1278.841 rows=59024 loops=1)" 
"              Join Filter: (models.id = hosts.model_id)" 
"              Rows Removed by Join Filter: 1" 
"              ->  Nested Loop Left Join  (cost=64.85..85239.77 rows=37975 width=20378) (actual time=1.022..1200.770 rows=59024 loops=1)" 
"                    Join Filter: (environments.id = hosts.environment_id)" 
"                    Rows Removed by Join Filter: 1003408" 
"                    ->  Nested Loop Left Join  (cost=64.85..74974.20 rows=37975 width=19326) (actual time=0.991..941.589 rows=59024 loops=1)" 
"                          Join Filter: (operatingsystems.id = hosts.operatingsystem_id)" 
"                          Rows Removed by Join Filter: 59024" 
"                          ->  Nested Loop Left Join  (cost=64.85..63571.45 rows=37975 width=16120) (actual time=0.981..851.493 rows=59024 loops=1)" 
"                                Join Filter: false" 
"                                ->  Nested Loop Left Join  (cost=64.85..63571.45 rows=37975 width=13392) (actual time=0.978..792.149 rows=59024 loops=1)" 
"                                      Join Filter: (hostgroups.id = hosts.hostgroup_id)" 
"                                      Rows Removed by Join Filter: 944424" 
"                                      ->  Nested Loop Left Join  (cost=64.85..53877.16 rows=37975 width=9389) (actual time=0.950..539.969 rows=59024 loops=1)" 
"                                            Join Filter: (lifecycle_environments_katello_content_facets.id = content_facets_hosts.lifecycle_environment_id)" 
"                                            Rows Removed by Join Filter: 177072" 
"                                            ->  Nested Loop Left Join  (cost=64.85..13992.54 rows=37975 width=8300) (actual time=0.943..439.186 rows=59024 loops=1)" 
"                                                  Join Filter: (content_views_katello_content_facets.id = content_facets_hosts.content_view_id)" 
"                                                  Rows Removed by Join Filter: 944384" 
"                                                  ->  Nested Loop Left Join  (cost=64.85..4877.34 rows=37975 width=8202) (actual time=0.924..199.688 rows=59024 loops=1)" 
"                                                        ->  Nested Loop Left Join  (cost=0.00..1222.36 rows=350 width=4925) (actual time=0.256..6.536 rows=366 loops=1)" 
"                                                              ->  Nested Loop Left Join  (cost=0.00..277.97 rows=350 width=4621) (actual time=0.239..3.506 rows=366 loops=1)" 
"                                                                    ->  Nested Loop Left Join  (cost=0.00..142.51 rows=30 width=4621) (actual time=0.186..1.927 rows=31 loops=1)" 
"                                                                          Join Filter: (content_facets_hosts_join_2.host_id = hosts.id)" 
"                                                                          Rows Removed by Join Filter: 930" 
"                                                                          ->  Nested Loop Left Join  (cost=0.00..127.17 rows=30 width=4617) (actual time=0.172..1.655 rows=31 loops=1)" 
"                                                                                Join Filter: (katello_subscription_facets.host_id = hosts.id)" 
"                                                                                Rows Removed by Join Filter: 900" 
"                                                                                ->  Nested Loop Left Join  (cost=0.00..112.30 rows=30 width=3492) (actual time=0.160..1.350 rows=31 loops=1)" 
"                                                                                      Join Filter: (katello_environments.id = content_facets_hosts_join.lifecycle_environment_id)" 
"                                                                                      Rows Removed by Join Filter: 93" 
"                                                                                      ->  Nested Loop Left Join  (cost=0.00..69.92 rows=30 width=2407) (actual time=0.141..1.210 rows=31 loops=1)" 
"                                                                                            Join Filter: (content_facets_hosts_join.host_id = hosts.id)" 
"                                                                                            Rows Removed by Join Filter: 930" 
"                                                                                            ->  Nested Loop Left Join  (cost=0.00..54.58 rows=30 width=2403) (actual time=0.123..0.947 rows=31 loops=1)" 
"                                                                                                  Join Filter: (katello_content_views.id = katello_content_facets.content_view_id)" 
"                                                                                                  Rows Removed by Join Filter: 496" 
"                                                                                                  ->  Nested Loop Left Join  (cost=0.00..46.18 rows=30 width=2309) (actual time=0.102..0.726 rows=31 loops=1)" 
"                                                                                                        Join Filter: (katello_content_facets.host_id = hosts.id)" 
"                                                                                                        Rows Removed by Join Filter: 930" 
"                                                                                                        ->  Nested Loop  (cost=0.00..30.85 rows=30 width=2305) (actual time=0.082..0.432 rows=31 loops=1)" 
"                                                                                                              ->  Index Scan using index_hosts_on_name on hosts  (cost=0.00..22.20 rows=30 width=1249) (actual time=0.031..0.318 rows=31 loops=1)" 
"                                                                                                                    Filter: ((realm_id = 1) AND ((type)::text = 'Host::Managed'::text) AND (organization_id = 3) AND (id = ANY ('{15,20,26,4,28,27,2,3,16,11,29, (...)" 
"                                                                                                                    Rows Removed by Filter: 1" 
"                                                                                                              ->  Materialize  (cost=0.00..8.28 rows=1 width=1056) (actual time=0.002..0.002 rows=1 loops=31)" 
"                                                                                                                    ->  Index Scan using index_realms_on_name on realms  (cost=0.00..8.27 rows=1 width=1056) (actual time=0.042..0.044 rows=1 loops=1)" 
"                                                                                                                          Index Cond: ((name)::text = 'EXAMPLE.COM'::text)" 
"                                                                                                                          Filter: (id = 1)" 
"                                                                                                        ->  Materialize  (cost=0.00..1.47 rows=31 width=8) (actual time=0.000..0.003 rows=31 loops=31)" 
"                                                                                                              ->  Seq Scan on katello_content_facets  (cost=0.00..1.31 rows=31 width=8) (actual time=0.006..0.008 rows=31 loops=1)" 
"                                                                                                  ->  Materialize  (cost=0.00..1.24 rows=16 width=98) (actual time=0.000..0.002 rows=17 loops=31)" 
"                                                                                                        ->  Seq Scan on katello_content_views  (cost=0.00..1.16 rows=16 width=98) (actual time=0.006..0.012 rows=17 loops=1)" 
"                                                                                            ->  Materialize  (cost=0.00..1.47 rows=31 width=8) (actual time=0.000..0.003 rows=31 loops=31)" 
"                                                                                                  ->  Seq Scan on katello_content_facets content_facets_hosts_join  (cost=0.00..1.31 rows=31 width=8) (actual time=0.002..0.007 rows=31 loops=1)" 
"                                                                                      ->  Materialize  (cost=0.00..11.05 rows=70 width=1089) (actual time=0.000..0.001 rows=4 loops=31)" 
"                                                                                            ->  Seq Scan on katello_environments  (cost=0.00..10.70 rows=70 width=1089) (actual time=0.004..0.004 rows=4 loops=1)" 
"                                                                                ->  Materialize  (cost=0.00..1.45 rows=30 width=1125) (actual time=0.000..0.004 rows=30 loops=31)" 
"                                                                                      ->  Seq Scan on katello_subscription_facets  (cost=0.00..1.30 rows=30 width=1125) (actual time=0.005..0.007 rows=30 loops=1)" 
"                                                                          ->  Materialize  (cost=0.00..1.47 rows=31 width=8) (actual time=0.000..0.003 rows=31 loops=31)" 
"                                                                                ->  Seq Scan on katello_content_facets content_facets_hosts_join_2  (cost=0.00..1.31 rows=31 width=8) (actual time=0.002..0.007 rows=31 loops=1)" 
"                                                                    ->  Index Only Scan using katello_content_facet_errata_eid_caid on katello_content_facet_errata  (cost=0.00..4.39 rows=13 width=8) (actual time=0.013..0.035 rows=12 loops=31)" 
"                                                                          Index Cond: (content_facet_id = content_facets_hosts_join_2.id)" 
"                                                                          Heap Fetches: 360" 
"                                                              ->  Index Scan using katello_errata_pkey on katello_errata  (cost=0.00..2.69 rows=1 width=308) (actual time=0.004..0.006 rows=1 loops=366)" 
"                                                                    Index Cond: (id = katello_content_facet_errata.erratum_id)" 
"                                                        ->  Hash Left Join  (cost=64.85..73.80 rows=130 width=3277) (actual time=0.150..0.432 rows=161 loops=366)" 
"                                                              Hash Cond: (katello_content_facet_repositories.repository_id = katello_repositories.id)" 
"                                                              ->  Hash Right Join  (cost=40.42..47.59 rows=130 width=373) (actual time=0.143..0.277 rows=161 loops=366)" 
"                                                                    Hash Cond: (katello_content_facet_repositories.content_facet_id = content_facets_hosts.id)" 
"                                                                    ->  Seq Scan on katello_content_facet_repositories  (cost=0.00..4.88 rows=288 width=8) (actual time=0.004..0.034 rows=288 loops=366)" 
"                                                                    ->  Hash  (cost=40.26..40.26 rows=13 width=369) (actual time=0.102..0.102 rows=17 loops=366)" 
"                                                                          Buckets: 1024  Batches: 1  Memory Usage: 9kB" 
"                                                                          ->  Nested Loop Left Join  (cost=0.00..40.26 rows=13 width=369) (actual time=0.024..0.083 rows=17 loops=366)" 
"                                                                                ->  Nested Loop Left Join  (cost=0.00..5.18 rows=13 width=65) (actual time=0.019..0.031 rows=17 loops=366)" 
"                                                                                      ->  Index Scan using katello_content_facets_host_id on katello_content_facets content_facets_hosts  (cost=0.00..0.67 rows=1 width=61) (actual time=0.005..0.006 rows=1 loo (...)" 
"                                                                                            Index Cond: (host_id = hosts.id)" 
"                                                                                      ->  Index Only Scan using katello_content_facet_errata_eid_caid on katello_content_facet_errata content_facet_errata_katello_content_facets_join  (cost=0.00..4.39 rows=13 (...)" 
"                                                                                            Index Cond: (content_facet_id = content_facets_hosts.id)" 
"                                                                                            Heap Fetches: 6202" 
"                                                                                ->  Index Scan using katello_errata_pkey on katello_errata applicable_errata_katello_content_facets  (cost=0.00..2.69 rows=1 width=308) (actual time=0.002..0.002 rows=1 loops=6 (...)" 
"                                                                                      Index Cond: (id = content_facet_errata_katello_content_facets_join.erratum_id)" 
"                                                              ->  Hash  (cost=21.41..21.41 rows=241 width=2908) (actual time=0.371..0.371 rows=254 loops=1)" 
"                                                                    Buckets: 1024  Batches: 1  Memory Usage: 63kB" 
"                                                                    ->  Seq Scan on katello_repositories  (cost=0.00..21.41 rows=241 width=2908) (actual time=0.008..0.176 rows=254 loops=1)" 
"                                                  ->  Materialize  (cost=0.00..1.24 rows=16 width=98) (actual time=0.000..0.001 rows=17 loops=59024)" 
"                                                        ->  Seq Scan on katello_content_views content_views_katello_content_facets  (cost=0.00..1.16 rows=16 width=98) (actual time=0.003..0.006 rows=17 loops=1)" 
"                                            ->  Materialize  (cost=0.00..11.05 rows=70 width=1089) (actual time=0.000..0.000 rows=4 loops=59024)" 
"                                                  ->  Seq Scan on katello_environments lifecycle_environments_katello_content_facets  (cost=0.00..10.70 rows=70 width=1089) (actual time=0.001..0.001 rows=4 loops=1)" 
"                                      ->  Materialize  (cost=0.00..10.71 rows=17 width=4003) (actual time=0.000..0.001 rows=17 loops=59024)" 
"                                            ->  Seq Scan on hostgroups  (cost=0.00..10.62 rows=17 width=4003) (actual time=0.010..0.019 rows=17 loops=1)" 
"                                                  Filter: (id = ANY ('{14,17,8,12,15,1,2,3,10,11,4,5,13,9,16,7,6}'::integer[]))" 
"                                                  Rows Removed by Filter: 1" 
"                                ->  Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=59024)" 
"                                      One-Time Filter: false" 
"                          ->  Materialize  (cost=0.00..10.30 rows=20 width=3206) (actual time=0.000..0.000 rows=2 loops=59024)" 
"                                ->  Seq Scan on operatingsystems  (cost=0.00..10.20 rows=20 width=3206) (actual time=0.003..0.004 rows=2 loops=1)" 
"                    ->  Materialize  (cost=0.00..12.37 rows=18 width=1052) (actual time=0.000..0.001 rows=18 loops=59024)" 
"                          ->  Seq Scan on environments  (cost=0.00..12.28 rows=18 width=1052) (actual time=0.011..0.017 rows=18 loops=1)" 
"                                Filter: (id = ANY ('{8,12,17,2,15,3,10,23,11,4,18,5,22,9,24,7,16,6}'::integer[]))" 
"                                Rows Removed by Filter: 1" 
"              ->  Materialize  (cost=0.00..10.75 rows=50 width=1600) (actual time=0.000..0.000 rows=1 loops=59024)" 
"                    ->  Seq Scan on models  (cost=0.00..10.50 rows=50 width=1600) (actual time=0.005..0.005 rows=1 loops=1)" 
"        ->  Materialize  (cost=0.00..1.01 rows=1 width=53) (actual time=0.000..0.000 rows=1 loops=59024)" 
"              ->  Seq Scan on tokens  (cost=0.00..1.01 rows=1 width=53) (actual time=0.006..0.007 rows=1 loops=1)" 
"  ->  Index Scan using index_host_status_on_host_id on host_status  (cost=0.00..0.87 rows=5 width=50) (actual time=0.002..0.003 rows=5 loops=59024)" 
"        Index Cond: (host_id = hosts.id)" 
"Total runtime: 1853.526 ms"

This may also be related to the following mailing list thread: https://groups.google.com/forum/#!topic/foreman-users/rgwmjY-sif4


Related issues

Is duplicate of Katello - Bug #18883: Passenger RackApp out of memoryDuplicate2017-03-13

History

#1 Updated by Justin Sherrill over 5 years ago

  • Category set to Hosts
  • Status changed from New to Duplicate
  • Legacy Backlogs Release (now unused) set to 226

#2 Updated by Justin Sherrill over 5 years ago

  • Is duplicate of Bug #18883: Passenger RackApp out of memory added

#3 Updated by Klaas D about 5 years ago

Also available in: Atom PDF